App Setup

Set up an existing app for local development.

Overview

Before you start developing on an existing app, you need to:

  1. Pull the latest code from the repository
  2. Create and configure your environment file
  3. Verify your environment variables
  4. Run the app locally

Step 1: Pull Latest Code

First, make sure you have the latest code from the develop branch:

Ask Claude to pull the latest code
Claude prompt
Pull the latest code from the develop branch for my-app-name.
Or run it yourselfbash
# Make sure you're on develop branch
git checkout develop

# Pull latest changes
git pull origin develop

# Install any new dependencies
pnpm install

Step 2: Create Environment File

Each app has its own environment file (.env) located in its app folder, not at the repository root.

Ask Claude to create your env file
Claude prompt
Create the .env file for my-app-name based on the .env.example file. Show me what variables need to be configured.
Or run it yourselfbash
# 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 .env

Common Environment Variables

Most apps require these variables:

VariableDescriptionHow to Get
DATABASE_URLPostgreSQL connection stringAsk engineers
AUTH_UI_URLAuthentication service URLSet automatically in production
AUTH_REQUIREDEnable/disable authtrue or false

Getting DATABASE_URL

The DATABASE_URL contains sensitive database credentials. To get it:

  1. Ask an engineer on Slack or in your team channel
  2. They will provide you with a connection string that looks like:
    postgresql://user:password@host:5432/database
    
  3. Add it to your .env file

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:

Ask Claude about app-specific variables
Claude prompt
What environment variables does my-app-name need? Check the .env.example and README.md files.

Step 3: Verify Environment Setup

Before running the app, verify your environment is correctly configured:

Ask Claude to verify your setup
Claude prompt
Check if my .env file for my-app-name has all required variables set. Compare it with .env.example.
Manual verificationbash
# 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/.env

Verification Checklist

CheckStatus
.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:

Ask Claude to run the app
Claude prompt
Start the development server for my-app-name.
Or run it yourselfbash
# From the repository root
pnpm dev:my-app-name

# The app will start at http://localhost:3000

Expected Output

You should see output like:

Expected terminal outputtext
▲ Next.js 15.x.x
- Local: http://localhost:3000
- Environments: .env

✓ Ready in 2s

Open http://localhost:3000 in your browser to see the app.

Troubleshooting

"Missing environment variable" error

If you see an error about missing environment variables:

  1. Check your .env file exists in apps/my-app-name/
  2. Verify all required variables are set
  3. Restart the development server
Ask Claude for help
Claude prompt
I'm getting a "Missing environment variable" error when running my-app-name. Help me fix it.

"Database connection failed" error

If you can't connect to the database:

  1. Verify your DATABASE_URL is correct
  2. Ask an engineer if the database is accessible
  3. Check if you're on a VPN (some databases require it)

Port already in use

If port 3000 is already in use:

Use a different portbash
# Run on a different port
PORT=3001 pnpm dev:my-app-name

App Setup Quiz

Quiz

Where should the .env file be located for an app?

Next Steps

Once your app is running locally:

  • Review the app's README.md for app-specific documentation
  • Check CLAUDE.md for AI development guidelines
  • Read PLAN.md to understand current development status
  • Start with the Basic Workflow to make your first contribution