Laravel-like DX.
JavaScript Simplicity.

Node 20+ ESM Fastify

Altarie.js gives you a clean, predictable structure with Fastify, Nunjucks, and better-sqlite3 — no transpilers, just ESM.

Routing (Altarie)
// 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' }))
}
              

Quick Start

  1. 1

    Create a new app (npx)

    npx altarie new myapp
    cd myapp
  2. 2

    Install & configure

    npm install
    cp .env.example .env
    # edit .env as needed (APP_PORT, etc.)
  3. 3

    Run in development

    npm run dev
  4. 4

    Open Devtools

    /_altarie/routes
    /_altarie/env

Features

Fastify Core

Modern HTTP server with great performance and plugin ecosystem.

Nunjucks Templates

Blade-like views with reply.render() convenience.

SQLite by default

Embedded DB via better-sqlite3, simple and stable for local dev.

Autoloaded Routes

Drop files in routes/ and they are registered automatically.

Youch Error Pages

Pretty error pages in development, compact JSON in production.

Security & CORS

Helmet and CORS with safe defaults baked in.

Project Structure

Inside altarie/

  • server.js — entry point
  • bootstrap/app.js — kernel (env, view, routes, errors, providers)
  • config/ — app, view, database configuration
  • core/ — env, view, error, devtools, database
  • routes/web.js, api.js
  • app/ — controllers, middleware, models, providers, views
  • database/ — migrate runner, migrations, seeds
  • tests/ — smoke tests

Commands

npm run dev   # development with auto-reload
npm start     # production mode
npm test      # run smoke tests
npm run db:migrate  # run migrations