Skip to content

Developer Guide

This section is for engineers who run, extend or deploy N2E. End-user documentation lives under User Guide; this section assumes you are comfortable with the command line, Node.js and SQL.

Tech stack

LayerTech
Web clientNext.js 15 (App Router, React 19, TypeScript, Tailwind 4)
Backend servicesEncore.ts (TypeScript)
DatabasesPostgres (per-service, managed by Encore)
ORMDrizzle
EmailResend
Live telemetryEncore PubSub topics + Postgres
Maps & chartsLeaflet, Google Maps JS API, Recharts

Repository layout

n2e/web/
├── backend/                  # Encore.ts backend (one folder per service)
│   ├── auth/                 # users, sessions, password recovery
│   ├── driver/               # driver records
│   ├── truck/                # fleet assets
│   ├── dispatch/             # routes & trips
│   ├── maintenance/          # service tickets
│   ├── predictive-maintenance/  # AI risk engine
│   ├── telemetry-store/      # raw telemetry persistence
│   ├── iot/                  # device protocol bridge
│   ├── chat/                 # in-app messaging
│   ├── notification/         # multi-channel notifications
│   ├── email/                # transactional email
│   ├── exporter/             # CSV/XLSX export jobs
│   ├── cache/                # shared cache helpers
│   ├── seed/                 # local data seeding
│   ├── encore.app            # Encore app id and CORS config
│   └── *.config.ts           # Drizzle migration configs (one per database)
├── monitoring_dashboard/     # Next.js web client
│   ├── src/app/              # App Router routes
│   ├── src/views/            # Top-level page views
│   ├── src/components/       # Shared UI
│   ├── src/lib/              # Auth, query, theme providers
│   └── .env.example          # Frontend env template
└── docs/                     # This documentation site (VitePress)

Reading order

  1. Prerequisites — install the toolchain.
  2. Run the backend — boot Encore locally.
  3. Run the frontend — boot Next.js against the local backend.
  4. Seed data — populate the admin user and a sample fleet.
  5. Deploy to Encore Cloud — ship the backend.
  6. Deploy the frontend — ship the Next.js app.
  7. Environment variables — full reference.

N2E Fleet Management User Guide.