Own everything that makes the system stable, secure, and accessible via a live production URL. This includes authentication, APIs, data persistence, cost logic, report generation, and deployment. The goal is to ensure the frontend and AI layers run smoothly on top of a reliable backend that judges can access without failure.
- regenerate firebase service account key and remove any previously exposed keys
- add credentials to .gitignore and ensure they are never committed
- audit repository for any leaked secrets or sensitive configs
- enforce SKIP_AUTH=false for production environment
- implement safe development bypass inside auth middleware without affecting production flow
- remove /ws-test or any unsecured testing routes from backend
- verify firebase authentication works end-to-end with real tokens
- build docker image for backend service
- push image to container registry
- deploy backend to cloud run (region: asia-south1)
- configure environment variables for production (SKIP_AUTH, USE_OLLAMA, ENVIRONMENT)
- move sensitive values (gemini api key, firebase credentials) to secret manager
- connect cloud run service with secrets securely
- test all endpoints on deployed live url
- configure CORS properly
- allow all origins in development
- restrict to frontend domain in production using environment variable
- verify requests from frontend work without CORS issues
- create /india/defaults endpoint
- return repo rate, gst rules, stamp duty rates, and last updated timestamp
- connect endpoint to constants defined in backend
- ensure frontend and backend calculations stay consistent
- implement PMAY subsidy calculation logic based on income brackets
- compute subsidy impact (NPV or effective reduction)
- include eligibility flag and subsidy value in response
- integrate subsidy into affordability and cost calculations
- extend user input schema to include annual_income
- auto-derive from monthly income when not provided
- update all dependent calculations and validations
- persist analysis outputs (presentation, verdict) to firestore after processing
- ensure session data survives server restarts
- create helper function to save structured results
- update report generation flow to read from firestore instead of in-memory state
- ensure reports can be generated even after deployment restarts
- add direct PDF download endpoint returning raw file bytes
- set correct headers for file download in browser
- ensure frontend can trigger download instantly
- test PDF generation flow thoroughly across multiple sessions
- ensure no dependency on temporary or in-memory state
- write complete backend README
- include setup steps, environment variables, API documentation, and deployment instructions
- add architecture overview and link to live deployment
- test full backend integration with frontend
- validate /analyze, websocket roundtable, /report, and auth flows
- fix any response mismatches or errors
- ensure backend handles errors gracefully (invalid input, failed calls, missing data)
- return clean structured error responses
- verify system stability under repeated usage
- ensure no crashes, memory issues, or broken sessions during demo
- finalize backend readiness for demo video and judging (stable, secure, deployed, fully functional)
Own everything that makes the system stable, secure, and accessible via a live production URL. This includes authentication, APIs, data persistence, cost logic, report generation, and deployment. The goal is to ensure the frontend and AI layers run smoothly on top of a reliable backend that judges can access without failure.