Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ pnpm build # Production build
pnpm seed # Seed test data
```

## Development Environment Setup
To start or restore the dev environment:
1. **Install deps**: `pnpm install`
2. **Env file**: Ensure `.env.local` exists with `NEXT_PUBLIC_USE_EMULATORS=true` (copy from `.env.example` if needed)
3. **Terminal 1**: `pnpm run firebase` (Auth:9099, Firestore:8082, Emulator UI:8081)
4. **Terminal 2**: `pnpm run dev` (Next.js at http://localhost:3000)
5. **Verify**: App at http://localhost:3000, Firebase UI at http://localhost:8081

## Environment
```
NEXT_PUBLIC_FIREBASE_PUBLIC_API_KEY, NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN, NEXT_PUBLIC_FIREBASE_PROJECT_ID
Expand Down
14 changes: 14 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copy to .env.local and adjust for your environment

# Enable Firebase emulators for local development
NEXT_PUBLIC_USE_EMULATORS=true

# Firebase project config (optional - fallbacks exist for emulator mode)
NEXT_PUBLIC_FIREBASE_PROJECT_ID=hemolog
NEXT_PUBLIC_FIREBASE_PUBLIC_API_KEY=your-api-key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=localhost

# Production only (required when NEXT_PUBLIC_USE_EMULATORS is not true)
# FIREBASE_PRIVATE_KEY=
# FIREBASE_CLIENT_EMAIL=
# NEXT_PUBLIC_FIREBASE_DATABASE_URL=