How novanhleonard-sys/pln works
Peta LN is a folklore-story platform for discovering stories on a map, reading or listening to them, and submitting contributions; staff manage content and its AI-assisted processing. The web app routes users into discovery, reading, contribution, profile, and administration features. A worker polls Supabase jobs and dispatches registered processing stages through an AI provider registry. The graph preserves documented stages and major features, but source excerpts are incomplete and the README is empty; unverified runtime links are omitted.
Main entry points: main.tsx Web routes · AdminCenter.tsx Admin workspace · Baca.tsx Story reader · ContributeForm.tsx Contribution form
Components 31
Story experience
- Web routes
apps/web/src/main.tsx - Map discovery
apps/web/src/features/map - Story search
apps/web/src/features/search/Search.tsx - Story cards
apps/web/src/features/story-card/StoryCard.tsx - Story reader
apps/web/src/features/reader/baca/Baca.tsx - Reader preferences
apps/web/src/features/reader/store/useReaderStore.ts - Adaptation experience
apps/web/src/features/reader/adapt - Story audio mode
apps/web/src/features/reader/dongeng/DongengMode.tsx - Reader profile
apps/web/src/features/profile
Community contributions
- Contribution form
apps/web/src/features/contribute/ContributeForm.tsx - Story matching
apps/web/src/features/contribute/SimilarStoriesCheck.tsx - Contribution tracking
apps/web/src/features/contribute/MyContributions.tsx
Content administration
- Admin workspace
apps/web/src/features/admin/AdminCenter.tsx - Admin dashboard
apps/web/src/features/admin/AdminDashboard.tsx - Content editing
apps/web/src/features/admin/AdminEditKonten.tsx - AI style controls
apps/web/src/features/admin/AdminGayaAI.tsx - Region groups
apps/web/src/features/admin/AdminKelompokDaerah.tsx - Voice library
apps/web/src/features/admin/AdminPustakaSuara.tsx
AI processing
- Job worker
apps/worker/src/core/runner.ts - Processing stages
apps/worker/src/stages - AI provider registry
apps/worker/src/providers/registry.ts - Gemini provider
apps/worker/src/providers/gemini.ts - AI budget guard
apps/worker/src/core/budget.ts - Tier calculation
apps/worker/src/jobs/tier/calculate.ts
Shared platform
- Authentication state
apps/web/src/features/auth/AuthStore.ts - Web data client
apps/web/src/lib/supabase.ts - Supabase data
- Reading analytics
apps/web/src/features/analytics/useReadSessionTracker.ts - Adaptation requests
supabase/functions/request_adaptation/index.ts - Contribution submission
supabase/functions/submit_contribution/index.ts
Other components
- Reader / contributor
Connections 35
- Reader / contributor → Web routes: opens
apps/web/src/main.tsx - Web routes → Map discovery: routes to
apps/web/src/main.tsx - Web routes → Story reader: routes to
apps/web/src/main.tsx - Web routes → Contribution form: routes to
apps/web/src/main.tsx - Web routes → Reader profile: routes to
apps/web/src/main.tsx - Web routes → Admin workspace: routes to
apps/web/src/main.tsx - Web routes → Authentication state: initializes
apps/web/src/main.tsx - Map discovery → Supabase data: queries stories
apps/web/src/features/map/useStories.ts - Reader preferences → Supabase data: syncs preferences
apps/web/src/features/reader/store/useReaderStore.ts - Reader preferences → Supabase data: loads preferences
- Story reader → Reading analytics: tracks reading
- Reading analytics → Supabase data: upserts sessions
apps/web/src/features/analytics/useReadSessionTracker.ts - Story reader → Reader preferences: uses preferences
- Story reader → Adaptation experience: offers adaptation
- Story reader → Story audio mode: offers audio mode
- Contribution form → Story matching: checks matches
apps/web/src/features/contribute/ContributeForm.tsx - Contribution form → Supabase data: submits contribution
- Contribution form → Contribution submission: requests submission
- Contribution tracking → Supabase data: reads submissions
- Admin workspace → Admin dashboard: renders
apps/web/src/features/admin/AdminCenter.tsx - Admin workspace → Content editing: renders
apps/web/src/features/admin/AdminCenter.tsx - Admin workspace → AI style controls: renders
apps/web/src/features/admin/AdminCenter.tsx - Admin workspace → Region groups: renders
apps/web/src/features/admin/AdminCenter.tsx - Admin workspace → Voice library: renders
apps/web/src/features/admin/AdminCenter.tsx - Content editing → Supabase data: manages content
- Job worker → Processing stages: dispatches jobs
apps/worker/src/index.ts - Job worker → Tier calculation: runs tier check
apps/worker/src/index.ts - Processing stages → AI provider registry: requests generation
apps/worker/src/stages/story-visual-bible/index.ts - AI provider registry → AI budget guard: checks budget
apps/worker/src/providers/registry.ts - AI provider registry → Gemini provider: dispatches generation
- Job worker → Supabase data: polls jobs
- Processing stages → Supabase data: reads and writes records
apps/worker/src/stages/story-visual-bible/index.ts - Adaptation experience → Adaptation requests: requests adaptation
- Authentication state → Web data client: authenticates through
apps/web/src/features/auth/AuthStore.ts - Web data client → Supabase data: connects to
apps/web/src/lib/supabase.ts