Quickstart
Get your NimBuild Starter project running in minutes.
Prerequisites
1. Node.js
Node.js runs the Next.js dev server, local build scripts, and the project toolchain.
# Check whether Node.js is installed
node --version2. pnpm
This project uses pnpm as its package manager, and the repository is currently pinned to pnpm 10.
# Install pnpm
npm install -g pnpm
# Check the pnpm version
pnpm --version3. PostgreSQL connection details
PostgreSQL database
Installation
1. Get the project source
git clone git@github.com:hayley-sun/nimbuild-to-production.git
cd nimbuild-to-production2. Install dependencies
pnpm install3. Configure environment variables
Copy the example environment file to your local environment file:
cp .env.example .env.localThen edit .env.local and fill in your values.
At minimum, you need:
DATABASE_URL="postgresql://user:password@host/db?sslmode=require"
NEXT_PUBLIC_FIREBASE_API_KEY="your-firebase-api-key"
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN="your-project.firebaseapp.com"
NEXT_PUBLIC_FIREBASE_PROJECT_ID="your-firebase-project-id"
NEXT_PUBLIC_FIREBASE_APP_ID="your-firebase-app-id"
FIREBASE_PROJECT_ID="your-firebase-project-id"
FIREBASE_CLIENT_EMAIL="firebase-adminsdk-xxxxx@your-project.iam.gserviceaccount.com"
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
NEXT_PUBLIC_APP_URL="http://localhost:3000"See Environment Variables for the full list.
4. Set up the database
pnpm db:pushThis pushes the Drizzle schema to your database. For production, use migrations:
pnpm db:generate
pnpm db:migrate5. Start the dev server
pnpm devVisit http://localhost:3000 and sign in with the Google account you want to make an admin.
6. Promote your account to admin
ADMIN_EMAIL=admin@example.com pnpm admin:setupWhat's Next?
- Project Structure — Understand the codebase layout
- Authentication — Configure Firebase Google sign-in
- Payments — Set up billing and subscriptions
- Customization — Add product-specific workflows