LifeOps Copilot is a student life copilot that brings inbox, career planning, calendar, and budget into one place. It targets university students who juggle email, deadlines, applications, and money in disconnected tools. The app uses a FastAPI backend and a Next.js frontend, with optional Google Cloud services for AI (Vertex AI / Gemini), storage, and Gmail OAuth.
Team: SparkUp
| Section | What you’ll find |
|---|---|
| Features | What the app does |
| Architecture | How pieces fit together |
| Local development | Run frontend and backend on your machine |
| Deploying on Google Cloud | Cloud Run, env vars, and integration notes |
| Environment variables | Backend and frontend configuration |
| Repository layout | Where code lives |
| API overview | Main HTTP endpoints |
| Team | Contributors |
| License | License information |
- Dashboard — Summary stats, animated module scenes, rotating quotes, upload drop zone, and a merged “today” feed (agents + API + fallbacks).
- Inbox — Gmail connection (OAuth), summaries, and human-in-the-loop send.
- Career — Job and application workflows aligned with the backend career APIs.
- Calendar — Events and study suggestions; optional link-out to Google Calendar in the UI.
- Budget — Income and expense tracking with insights when the API is enabled.
- Auth — Session-aware frontend with protected routes behind the app shell.
- Frontend — Next.js (App Router), TypeScript, Tailwind CSS v4, Framer Motion, Zustand. Calls the backend over HTTP (
NEXT_PUBLIC_API_URL). - Backend — FastAPI application (
app.main), modular routers underapp/api/, services for Gmail, agents, Firestore/Mongo, and optional Vertex AI. - Data — Document store (Firestore or MongoDB via
MONGODB_URI) for users, events, uploads metadata, and feed items. - AI — When
GOOGLE_CLOUD_PROJECTand credentials are configured, Vertex AI can power agent flows; otherwise the codebase falls back to deterministic or mock behavior where implemented.
For production on Google Cloud, a typical layout is: Cloud Run (or GKE) for the API container, Cloud Run or Firebase Hosting / Cloud CDN for the static/Next export or Node hosting, Firestore or MongoDB Atlas, Cloud Storage for uploads, Secret Manager for keys, and Vertex AI for Gemini.
- Node.js 20+ and npm
- Python 3.11+ and pip
- (Optional)
gcloudCLI and a GCP project for live AI and Gmail
cd backend
pip install -r requirements.txt
copy .env.example .env # Windows; use cp on macOS/Linux and fill values
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000API base URL: http://localhost:8000 (OpenAPI docs at /docs when enabled).
cd frontend
npm installCreate frontend/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:8000npm run devApp: http://localhost:3000
These steps describe a common pattern; adjust names and regions to match your project.
- Add a
Dockerfileinbackend/(if not already present) that installs dependencies and runsuvicornon the port Cloud Run expects (8080is typical; mapPORT). - Build and push to Artifact Registry:
gcloud auth configure-docker REGION-docker.pkg.dev
docker build -t REGION-docker.pkg.dev/PROJECT_ID/REPO/lifeops-api:TAG ./backend
docker push REGION-docker.pkg.dev/PROJECT_ID/REPO/lifeops-api:TAG- Create a Cloud Run service from that image.
- Set environment variables and secrets (Secret Manager) for everything in
.env.examplethat you use in production (Mongo/Firestore, OAuth client secret, Vertex settings, etc.). - Allow unauthenticated invocations only if you expose a public API; otherwise use IAM and/or an API gateway in front.
- Option A — Build a production Next.js image (standalone output) and deploy a second Cloud Run service; set
NEXT_PUBLIC_API_URLto your public API URL at build time. - Option B — Use Firebase Hosting, Cloud Storage + load balancer, or another static host for
next export/ static assets if your deployment model allows it.
- Configure the backend CORS
allow_originsto include your deployed frontend origin (exact scheme + host + port). - Use HTTPS everywhere in production.
- In Google Cloud Console, configure the OAuth consent screen and create OAuth 2.0 Web credentials.
- Set authorized JavaScript origins and redirect URIs to your production frontend and backend callback URL (e.g.
https://api.yourdomain.com/api/auth/google/callback). - Store
GOOGLE_CLIENT_SECRETin Secret Manager, not in source control.
See backend/.env.example for the authoritative list. Commonly:
| Area | Examples |
|---|---|
| GCP / AI | GOOGLE_CLOUD_PROJECT, VERTEX_LOCATION, VERTEX_MODEL_NAME |
| Data | MONGODB_URI, FIRESTORE_PROJECT_ID, GCS_BUCKET_NAME |
| OAuth | GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_REDIRECT_URI |
| App | JWT_SECRET (or equivalent), CORS origins |
Frontend:
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_API_URL |
Base URL for all API calls |
repository/
frontend/ Next.js app (LifeOps Copilot UI)
backend/ FastAPI app (app/main.py, app/api, app/services)
docs/ Optional diagrams and assets (add as needed)
demo-data/ Sample data for demos (if present)
infra/ GCP notes and setup helpers
Representative routes (see /docs on a running server for the full list):
GET /api/dashboard/summary— Dashboard aggregatesGET /api/dashboard/feed/today— Today feed itemsGET /api/auth/google/login— Start Gmail OAuthGET /api/inbox/gmail/messages— List messages (when connected)POST /api/calendar/events— Calendar CRUDPOST /api/budget/entries— Budget entries- Career, uploads, and agent routes under
app/api/
Built by SparkUp:
- Vriddhi — UI/UX
- Vidhi — Frontend, integrated backend endpoints, collaborated on AI and cloud Setup
- Aarav — Backend
- Nishit — AI and cloud integration