From 8ef31bc2034c45834ab740a68dedaf6664573d4e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 14 Mar 2026 07:30:23 +0000 Subject: [PATCH 1/2] Add .env.example for development environment setup --- .env.example | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..a7f9cb3 --- /dev/null +++ b/.env.example @@ -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= From 7ee706ea61cbd5eac01bcdcd4e19099c2a725639 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 14 Mar 2026 07:40:20 +0000 Subject: [PATCH 2/2] Add Development Environment Setup section to Cursor rules for repeatable setup --- .cursorrules | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.cursorrules b/.cursorrules index 3e87d06..1af8f86 100644 --- a/.cursorrules +++ b/.cursorrules @@ -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