How puviin/reddit-ai-judge works
DramaForge Scout is a web application for turning stories into analyzed courtroom narratives and generated audiovisual drama reels. The visible runtime includes a React client, tRPC API, AI/story routers, reel generation and caching, and storage helpers. The principal flow is supported at the router level, but the excerpts do not show the client’s calls into those procedures or the internal behavior of the Gemini and Scout routers; those connections are therefore omitted. Several client section components indicate distinct product stages, but their wiring is not established by the sampled source.
Main entry points: drama.ts Drama procedures · App.tsx App shell · routers.ts API router · storage.ts Media storage
Components 27
Client experience
- App shell
client/src/App.tsx - Story workspace
client/src/pages/Home.tsx - Story analysis
client/src/components/sections/StoryAnalysis.tsx - Character bible
client/src/components/sections/CharacterBible.tsx - Courtroom mode
client/src/components/sections/CourtroomMode.tsx - Theme selection
client/src/components/sections/ThemeSelection.tsx - Adaptation pipeline
client/src/components/sections/AdaptionPipeline.tsx - Drama reel
client/src/components/sections/DramaReel.tsx - Clip player
client/src/components/sections/ClipPlayer.tsx - Error boundary
client/src/components/ErrorBoundary.tsx - Theme provider
client/src/contexts/ThemeContext.tsx - tRPC client
client/src/main.tsx
API and story services
- API router
server/routers.ts - Gemini services
server/routers/gemini.ts - Scout services
server/routers/scout.ts - Auth middleware
server/_core/trpc.ts
Reel generation
- Drama procedures
server/routers/drama.ts
Persistence and storage
- Reel cache
drizzle/schema.ts - Database access
server/db.ts - Media storage
server/storage.ts - Storage proxy
server/_core/storageProxy.ts
Other components
- Story creator
- OpenAI API
- fal.ai
- ElevenLabs
- Forge storage API
- S3 object store
Connections 21
- Story creator → App shell: uses
- App shell → Story workspace: routes to
client/src/App.tsx - App shell → Error boundary: wraps
client/src/App.tsx - App shell → Theme provider: provides theme
client/src/App.tsx - tRPC client → App shell: renders
client/src/main.tsx - tRPC client → API router: calls API
- API router → Drama procedures: registers
server/routers.ts - API router → Gemini services: registers
server/routers.ts - API router → Scout services: registers
server/routers.ts - Drama procedures → Auth middleware: uses procedures
server/routers/drama.ts - Gemini services → Auth middleware: uses procedures
server/routers/gemini.ts - Scout services → Auth middleware: uses procedures
server/routers/scout.ts - Drama procedures → OpenAI API: requests prompts
server/routers/drama.ts - Drama procedures → fal.ai: generates media
server/routers/drama.ts - Drama procedures → ElevenLabs: generates voice
server/routers/drama.ts - Drama procedures → Media storage: stores media
server/routers/drama.ts - Drama procedures → Database access: reads and writes
server/routers/drama.ts - Database access → Reel cache: uses schema
server/db.ts - Media storage → Forge storage API: requests URLs
server/storage.ts - Media storage → S3 object store: uploads directly
server/storage.ts - Storage proxy → Forge storage API: requests signed URL
server/_core/storageProxy.ts