nciCloud Invoice

Quick Start

Run Cloud Invoice locally in minutes. Clone the repo, configure the environment, apply migrations, and start the dev server.

Quick Start

Get a local instance running in a few minutes.

Prerequisites

  • Node.js 20.9+ (required by Next.js 16)
  • npm 10+
  • PostgreSQL 15+ (local or hosted)
  • Git

1. Clone and install

git clone https://github.com/nexausm/ci.git
cd ci
npm install

Installation runs a postinstall step (prisma generate) that reads DATABASE_URL, so create .env before installing if the variable is not already exported.

2. Configure the environment

cp .env.example .env

Fill in at least the required variables:

VariableDescription
DATABASE_URLPostgreSQL connection string, e.g. postgresql://user:pass@localhost:5432/invoice
AUTH_SECRETSession signing secret. Generate: openssl rand -base64 32
AUTH_SESSION_MAX_AGESession lifetime in seconds (default 86400)

Optional features:

VariableDescription
SEED_USER_NAMEName of the seeded admin user
SEED_USER_EMAILEmail of the seeded admin user
SEED_USER_PASSWORDPassword of the seeded admin user
ALGOLIA_APP_IDEnable full-text search (empty disables it)
ALGOLIA_ADMIN_API_KEYAlgolia admin API key
ALGOLIA_SEARCH_API_KEYAlgolia search-only key
ALGOLIA_INDEX_NAMEAlgolia index name

3. Apply migrations

npm run db:migrate

4. Start the dev server

npm run dev

Open http://localhost:3000 to view the app.

5. Create your first user

npm run seed

This creates a user from SEED_USER_NAME, SEED_USER_EMAIL, and SEED_USER_PASSWORD. Sign in and you're ready to invoice.

Common scripts

CommandPurpose
npm run devStart the dev server
npm run buildProduction build
npm run startProduction start (migrations → Prisma → next start)
npm run lintRun ESLint
npm run typecheckType-check root + docs site
npm run db:deployApply pending migrations
npm run db:generateRegenerate the Prisma client
npm run seedCreate the first user
npm run index:algoliaRe-index records to Algolia (optional)
npm run formatFormat the codebase with Prettier

Last updated on

On this page