How krutarth3238/crewmate works
Crewmate is a gamified AI co-founder console: a founder signs in, sets up a workspace and teammate, connects Google, then uses the console to submit missions and review outcomes. The backend plans and executes agent tasks, gates restricted actions for approval, records missions, and awards XP through a server-authoritative trust engine. The README documents simulated Google Workspace tools and the major product capabilities; source-index references and excerpts support the specific internal links shown. Unsampled implementation details are omitted where their connections are not established.
Main entry points: database.py SQL database · main.py FastAPI app · engine.py Execution engine · App.tsx App views
Components 26
Console and identity
- App views
frontend/src/App.tsx - Auth context
frontend/src/context/AuthContext.tsx - Gamified console
frontend/src/components/Console.tsx - Workspace setup
frontend/src/components/OnboardingModal.tsx - Google connect
frontend/src/components/GoogleConnectView.tsx - API client
frontend/src/lib/api.ts
Workspace and progression
- Workspace API
backend/app/workspaces/router.py - Workspace service
backend/app/workspaces/service.py - Teammate API
backend/app/teammates/router.py - Trust engine
backend/app/teammates/service.py - Mission audit API
backend/app/missions/router.py - Skill catalog
backend/app/skills/router.py
Agent and approvals
- Agent API
backend/app/agent/router.py - Execution engine
backend/app/agent/engine.py - Simulated tools
backend/app/agent/tools.py - Approval API
backend/app/quests/router.py - Approval service
backend/app/quests/service.py
API and persistence
- Account API
backend/app/auth/router.py - Google OAuth
backend/app/google_oauth/router.py - FastAPI app
backend/app/main.py - Auth guard
backend/app/middleware/auth_guard.py - SQL database
backend/app/database.py - Domain records
backend/app/models
Other components
- Founder
- Firebase Auth
- Groq inference
Connections 43
- Founder → App views: uses console
- App views → Auth context: reads auth state
frontend/src/App.tsx - App views → Gamified console: shows workspace
frontend/src/App.tsx - App views → Workspace setup: starts setup
frontend/src/App.tsx - App views → Google connect: shows connection
frontend/src/App.tsx - Auth context → Firebase Auth: subscribes to auth
frontend/src/context/AuthContext.tsx - Auth context → API client: syncs identity
frontend/src/context/AuthContext.tsx - Gamified console → API client: calls API
frontend/src/components/Console.tsx - Workspace setup → API client: submits setup
frontend/src/components/OnboardingModal.tsx - Google connect → API client: starts OAuth
- API client → FastAPI app: sends requests
- FastAPI app → Account API: dispatches auth
backend/app/main.py - FastAPI app → Workspace API: dispatches workspace
backend/app/main.py - FastAPI app → Teammate API: dispatches teammate
backend/app/main.py - FastAPI app → Mission audit API: dispatches missions
backend/app/main.py - FastAPI app → Skill catalog: dispatches skills
backend/app/main.py - FastAPI app → Agent API: dispatches agent
backend/app/main.py - FastAPI app → Approval API: dispatches approvals
backend/app/main.py - FastAPI app → Google OAuth: dispatches OAuth
backend/app/main.py - Workspace API → Workspace service: delegates to
backend/app/workspaces/router.py - Teammate API → Trust engine: uses progression
backend/app/teammates/router.py - Agent API → Execution engine: invokes execution
backend/app/agent/router.py - Execution engine → Simulated tools: runs tool steps
backend/app/agent/engine.py - Execution engine → Groq inference: plans with
- Execution engine → Trust engine: awards XP
backend/app/agent/engine.py - Execution engine → Approval service: creates approvals
- Approval API → Approval service: handles resolution
backend/app/quests/router.py - Approval service → Simulated tools: executes approved plan
backend/app/quests/service.py - Approval service → Trust engine: awards XP
backend/app/quests/service.py - Auth guard → Firebase Auth: verifies tokens
backend/app/middleware/auth_guard.py - Account API → Auth guard: uses identity
backend/app/auth/router.py - Google OAuth → SQL database: stores tokens
backend/app/google_oauth/router.py - Google OAuth → Auth guard: requires identity
backend/app/google_oauth/router.py - SQL database → Domain records: maps records
backend/app/database.py - Mission audit API → SQL database: reads missions
backend/app/missions/router.py - Skill catalog → SQL database: reads and updates
backend/app/skills/router.py - Workspace API → SQL database: uses sessions
backend/app/workspaces/router.py - Teammate API → SQL database: uses sessions
backend/app/teammates/router.py - Agent API → SQL database: uses sessions
backend/app/agent/router.py - Approval API → SQL database: uses sessions
backend/app/quests/router.py - Account API → SQL database: uses sessions
backend/app/auth/router.py - Execution engine → SQL database: records run and mission
- Approval service → SQL database: records approvals