Altarie.js gives you a clean, predictable structure with Fastify, Nunjucks, and better-sqlite3 — no transpilers, just ESM.
// routes/web.js
export default async function (app) {
const preAuth = app.mw.resolve(['auth'])
app.get('/', async (req, reply) => reply.render('home.njk'))
app.get('/dashboard', { preHandler: preAuth }, async (req, reply) => {
return reply.render('dashboard.njk')
})
app.get('/api/health', async () => ({ status: 'ok' }))
}
npx altarie new myapp
cd myapp
npm install
cp .env.example .env
# edit .env as needed (APP_PORT, etc.)
npm run dev
/_altarie/routes
/_altarie/env
Modern HTTP server with great performance and plugin ecosystem.
Blade-like views with reply.render()
convenience.
Embedded DB via better-sqlite3, simple and stable for local dev.
Drop files in routes/
and they are registered automatically.
Pretty error pages in development, compact JSON in production.
Helmet and CORS with safe defaults baked in.
altarie/
server.js
— entry pointbootstrap/app.js
— kernel (env, view, routes, errors, providers)config/
— app, view, database configurationcore/
— env, view, error, devtools, databaseroutes/
— web.js
, api.js
app/
— controllers, middleware, models, providers, viewsdatabase/
— migrate runner, migrations, seedstests/
— smoke testsnpm run dev # development with auto-reload
npm start # production mode
npm test # run smoke tests
npm run db:migrate # run migrations