Skip to main content
Copy each package’s .env.example to .env and fill in the values before starting the application.
cp packages/backend/.env.example packages/backend/.env
cp packages/mobile/.env.example packages/mobile/.env
cp packages/desktop/.env.example packages/desktop/.env

Backend

Server settings

PORT
number
default:"3001"
The port the Express API server listens on.
NODE_ENV
string
default:"development"
Runtime environment. Accepted values: development, production, test.
DB_SYNC
boolean
default:"false"
When true, Prisma synchronises the database schema on startup. Equivalent to running db:sync manually. Keep false in production and use migrations instead.
DB_SEED
boolean
default:"true"
When true, the seed script runs on startup and populates the database with initial data.

Database

DATABASE_URL
string
Full Prisma-compatible connection URL. This takes precedence over the individual DB_* variables for Prisma operations.
DB_HOST
string
default:"127.0.0.1"
Hostname or IP address of the PostgreSQL server.
DB_PORT
number
default:"5432"
Port of the PostgreSQL server.
DB_NAME
string
default:"fleet_management"
Name of the target database.
DB_USER
string
default:"postgres"
PostgreSQL username.
DB_PASSWORD
string
default:"postgres"
PostgreSQL password.

Authentication

JWT_SECRET
string
default:"change-me"
Secret key used to sign and verify JSON Web Tokens.
Change JWT_SECRET before deploying to production. The default value change-me is publicly known. Any attacker who knows the secret can forge valid tokens and gain full access to the API. Use a long, random string (at least 32 characters).
DEFAULT_LOGIN_PASSWORD
string
default:"changeme123"
Password assigned to seeded user accounts. Change this before running the seed in any environment that is accessible over a network.

Email / SMTP

SMTP_HOST
string
default:"127.0.0.1"
Hostname of the SMTP server. Defaults to the local Mailpit container.
SMTP_PORT
number
default:"1025"
SMTP port. Use 587 (STARTTLS) or 465 (TLS) for production providers.
SMTP_SECURE
boolean
default:"false"
Set to true to use TLS on the initial connection (port 465). Leave false for STARTTLS (port 587) or unencrypted local connections.
SMTP_USER
string
SMTP authentication username. Leave empty for the local Mailpit dev server.
SMTP_PASS
string
SMTP authentication password. Leave empty for the local Mailpit dev server.
EMAIL_FROM
string
The From address used on all outbound emails.

Mobile app

The mobile app is built with Expo. Variables must be prefixed with EXPO_PUBLIC_ to be bundled into the client.
EXPO_PUBLIC_API_URL
string
default:"http://localhost:3001/api"
Base URL of the backend API. Change this to your server’s address when building for a physical device or staging environment.
EXPO_PUBLIC_ENABLE_MOCKS
boolean
default:"false"
When true, the app uses local mock data instead of making real API calls. Useful for UI development without a running backend.

Desktop app

The desktop app is built with Vite. Variables must be prefixed with VITE_DESKTOP_.
VITE_DESKTOP_API_URL
string
default:"http://localhost:3001/api"
Base URL of the backend API. Update this when targeting a remote or staging backend.
VITE_DESKTOP_ENABLE_MOCKS
boolean
default:"false"
When true, the app uses local mock data instead of making real API calls.

Build docs developers (and LLMs) love