How daegyu519/oops works
OOPS! is a chat app that privately analyzes how a draft may sound before it is sent, while keeping ordinary messaging independent of the analysis engine. The main flow is draft in the mobile app → authenticated engine request → tone analysis → private hint or detailed rewrite suggestion; chat messages and room features use Supabase separately. The README also describes mirror practice, feedback, attachments, presence, and push. Some route and mobile implementations were not sampled, so their internal call links are omitted or shown as documented integrations.
Main entry points: main.py FastAPI engine · pipeline.py Analysis pipeline · engine.ts Engine client · index.tsx Expo chat app
Components 23
Mobile app
- Expo chat app
apps/mobile/app/(tabs)/index.tsx - Rooms and messages
apps/mobile/lib/useRoomMessages.ts - Room interactions
apps/mobile/app/room/[id]/index.tsx - Mirror practice UI
apps/mobile/app/(tabs)/mirror.tsx - Report and stats UI
apps/mobile/app/(tabs)/report.tsx - Engine client
apps/mobile/lib/engine.ts - Supabase client
apps/mobile/lib/supabase.ts
Analysis engine
- FastAPI engine
engine/app/main.py - Analysis routes
engine/app/routes - Analysis pipeline
engine/pipeline.py - Gate and aggregation
engine/layers/gate.py - Rewrite suggestions
engine/layers/rewrite.py - Expert registry
engine/experts/registry.py - LLM experts
engine/experts/llm.py - Model router
engine/harness/router.py - PII masking
engine/harness/pii.py - Engine repository
engine/app/db.py - Mirror practice
engine/mirror.py - Feedback processing
engine/app/routes/feedback.py
Data and delivery
- Supabase services
- Model providers
engine/harness/providers.py - Web Push
engine/jobs/push.py
Other components
- Chat user
Connections 24
- Chat user → Expo chat app: uses
- Expo chat app → Rooms and messages: opens chat
- Rooms and messages → Supabase client: reads and writes
apps/mobile/lib/useRoomMessages.ts - Supabase client → Supabase services: uses services
- Expo chat app → Engine client: requests analysis
- Engine client → FastAPI engine: calls API
- FastAPI engine → Analysis routes: registers routes
engine/app/main.py - Analysis routes → Analysis pipeline: runs analysis
- Analysis pipeline → Gate and aggregation: scores and aggregates
engine/pipeline.py - Analysis pipeline → Expert registry: selects experts
engine/pipeline.py - Analysis pipeline → Rewrite suggestions: requests rewrites
engine/pipeline.py - Expert registry → LLM experts: creates experts
engine/experts/registry.py - LLM experts → Model router: submits prompts
engine/experts/llm.py - Model router → PII masking: masks payloads
engine/harness/router.py - Model router → Model providers: calls providers
engine/harness/router.py - FastAPI engine → Supabase services: receives message webhooks
- FastAPI engine → Engine repository: connects repository
engine/app/main.py - FastAPI engine → Web Push: sends notifications
- FastAPI engine → Mirror practice: serves mirror practice
engine/app/main.py - Mirror practice UI → Engine client: requests practice
- Report and stats UI → Engine client: requests stats
- Room interactions → Supabase client: uses chat services
- Analysis routes → Feedback processing: includes feedback route
engine/app/main.py - Feedback processing → Engine repository: stores patterns