-
Install dependencies in both workspaces:
npm install cd client && npm install cd ../server && npm install
-
Configure environment variables:
- Create
client/.envif needed for frontend configuration. - For the backend, do not commit service account JSON files. Instead set one of:
FIREBASE_SERVICE_ACCOUNT: base64 encoded Firebase service account JSON.GOOGLE_APPLICATION_CREDENTIALS: absolute path to a local service account JSON file (ignored by git).
- Optionally set
FIREBASE_STORAGE_BUCKETif different from the default bucket. - Include other secrets such as
GEMINI_API_KEYinserver/.env(ignored by git).
- Create
-
Start the development servers:
# In one terminal cd server npm run dev # In another terminal cd client npm run dev
client: usenpm run dev,npm run build,npm run preview.server: usenpm run dev(with nodemon) ornpm start.
- Never commit credential files. They are ignored by
.gitignoreand loaded from environment variables. - Rotate any keys that may have been exposed before these changes.*** End Patch