Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind and Lucide icons π
npm i nitro-web -D @nitro-web/webpack- Copy
./packages/exampleinto your project - Copy
.env.exampleto.envand fill it in - Run
npm i
Env vars load from .env, then .env.local is merged over the top (handy for local-only overrides). Both are gitignored.
On the client, you can import components and page-components. See ./packages/example for further info.
import { SigninPage, Field } from 'nitro-web'On the server, you can import the express router, default models, and controllers. See ./packages/example.
import { setupRouter } from 'nitro-web/server'
const server = await setupRouter(config)
server.listen(3001, '0.0.0.0')On the client & server, you can import common utils.
import { deepCopy } from 'nitro-web/util'# Running in development (watching for changes)
npm run dev:server # run and watch the nodemon server
npm run dev:client # run and watch the webpack dev server
npm run dev # or run and watch both the server and client
# Building for production
npm run build
npm run startIn development, set placeholderEmail in .env to let the Claude browser auto-login as that user (skips the signin flow while testing).
The sendEmail utility compiles and sends Nunjuck templates with Mailgun.
- Templates are placed in
/server/email/, three are available by default: welcome, reset-password, invite-user - You can test the email templates at http://localhost:3000/email/welcome
- Update the
emailFrom,emailReplyTo,emailTestMode,mailgunKey,mailgunDomainin the your .env once you are ready to send
import config from './server/config.js'
import { sendEmail } from 'nitro-web/server'
const res = await sendEmail({
config: config,
data: { name: 'Test' },
template: 'welcome',
to: 'test@test.com',
})
console.log(res) // if config.emailTestMode=true, the template will be returned - Git clone Nitro
- Move your project into
./packages/MYPROJECT - Delete the
./MYPROJECT/package-lock.jsonfile (if it exists), and addpackage-lock=falseto./MYPROJECT/.npmrc. Workspaces only generate a singlepackage-lock.jsonat the root, if this file exists locally, npm may install outdated dependencies for your team or in production. - Ensure the same versions of
nitro-webandnitro-web/webpackare used, this is required for workspace linking to function correctly.
- Express
^4.17 - Monastery
^5.0(file plugin: image/file fields aretype: 'file') - Node
24(>=18supported) - React
^18.3 - Tailwind
^3.4 - Webpack
^5.92
pdf-to-imgpdfmakereact-chartjs-2jest: ^29.7.0migrate-mongo: ^10.0.0eslint-plugin-jest: ^28.9.0
Run the following command to add nitro based development skills:
npx skills add boycce/nitro-web -a claude-codeAs followed by https://github.com/shanraisshan/claude-code-best-practice