App Setup
Set up an existing app for local development.
Overview
Before you start developing on an existing app, you need to:
- Pull the latest code from the repository
- Create and configure your environment file
- Verify your environment variables
- Run the app locally
Step 1: Pull Latest Code
First, make sure you have the latest code from the develop branch:
# Make sure you're on develop branch
git checkout develop
# Pull latest changes
git pull origin develop
# Install any new dependencies
pnpm installStep 2: Create Environment File
Each app has its own environment file (.env) located in its app folder, not at the repository root.
# Navigate to the app directory
cd apps/my-app-name
# Copy the example env file
cp .env.example .env
# Open the file to edit
code .envCommon Environment Variables
Most apps require these variables:
| Variable | Description | How to Get |
|---|---|---|
DATABASE_URL | PostgreSQL connection string | Ask engineers |
AUTH_UI_URL | Authentication service URL | Set automatically in production |
AUTH_REQUIRED | Enable/disable auth | true or false |
Getting DATABASE_URL
The DATABASE_URL contains sensitive database credentials. To get it:
- Ask an engineer on Slack or in your team channel
- They will provide you with a connection string that looks like:
postgresql://user:password@host:5432/database - Add it to your
.envfile
Important: Never commit your .env file to git. It's already in .gitignore.
App-Specific Variables
Some apps have additional variables. Check the app's .env.example or README.md for details:
Step 3: Verify Environment Setup
Before running the app, verify your environment is correctly configured:
# Check your env file exists
ls -la apps/my-app-name/.env
# View your env file (be careful not to share this output)
cat apps/my-app-name/.envVerification Checklist
| Check | Status |
|---|---|
.env file exists in app folder | ⬜ |
DATABASE_URL is set (not empty) | ⬜ |
All variables from .env.example are present | ⬜ |
No placeholder values like your-value-here | ⬜ |
Step 4: Run the App Locally
Once your environment is configured, start the development server:
# From the repository root
pnpm dev:my-app-name
# The app will start at http://localhost:3000Expected Output
You should see output like:
▲ Next.js 15.x.x
- Local: http://localhost:3000
- Environments: .env
✓ Ready in 2sOpen http://localhost:3000 in your browser to see the app.
Troubleshooting
"Missing environment variable" error
If you see an error about missing environment variables:
- Check your
.envfile exists inapps/my-app-name/ - Verify all required variables are set
- Restart the development server
"Database connection failed" error
If you can't connect to the database:
- Verify your
DATABASE_URLis correct - Ask an engineer if the database is accessible
- Check if you're on a VPN (some databases require it)
Port already in use
If port 3000 is already in use:
# Run on a different port
PORT=3001 pnpm dev:my-app-nameApp Setup Quiz
Where should the .env file be located for an app?
Next Steps
Once your app is running locally:
- Review the app's
README.mdfor app-specific documentation - Check
CLAUDE.mdfor AI development guidelines - Read
PLAN.mdto understand current development status - Start with the Basic Workflow to make your first contribution