First-Time Setup
Configure environment variables, database migrations, and local certificates.
First-Time Setup
Once you have installed the prerequisites and cloned a project repository, perform the initial environment configuration before launching services.
1. Environment Secrets
Copy the example environment template into your active .env.local:
cp .env.example .env.localFill in the required local configuration parameters:
# Local Application Port
PORT=3000
# Auth & Cryptography
NEXTAUTH_SECRET=development_secret_32_characters_long!
NEXIUM_API_KEY=nexium_sandbox_token_88252
# Database Connection (PostgreSQL)
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/nexium_dev"
# Razorpay Sandbox Credentials
RAZORPAY_KEY_ID="rzp_test_sampleKey"
RAZORPAY_KEY_SECRET="sampleSecretKey"
# Site Metadata
NEXT_PUBLIC_SITE_URL="https://www.nexiummedia.com"Never commit live production credentials, client Stripe/Razorpay live keys, or AWS tokens to git. Production keys are securely provisioned via Vercel and AWS Secrets Manager.
2. Boot Local Database
We use Docker Compose to start local PostgreSQL and Redis instances:
docker compose up -dVerify that the containers are healthy:
docker ps3. Run Database Migrations
Apply database schemas and seed realistic test accounts:
npm run db:migrate
npm run db:seed4. Start Development Server
Run the development command with Turbopack:
npm run devVisit http://localhost:3000 in your browser. You should see the application loaded with live hot-reloading!
Was this page helpful?
Let us know how we can make our documentation better.
Last updated on