How dltkdgns00/duobible works
duobible is a daily Bible-reading web app for a church group. A reader opens the day’s chapter, views its text and community read-checks, and—when logged in—marks or unmarks it as read; the app also presents reading stats and reflection notes. Separate branches cover PIN-based accounts and admin progress management. The README documents the major capabilities; source-index references and sampled excerpts support the relationships shown, while component-to-API wiring not shown in the evidence is omitted.
Main entry points: ReadingView.tsx Reading view · db.ts Application database · route.ts Admin user API · session.ts Session access
Components 25
Daily reading
- Reading page
src/app/page.tsx - Past-day page
src/app/[offset]/page.tsx - Reading view
src/app/components/ReadingView.tsx - Chapter display
src/app/components/ChapterReader.tsx - Chapter navigation
src/app/components/ChapterNav.tsx - Read check
src/app/components/MarkReadButton.tsx
Accounts
- Login page
src/app/login/page.tsx - Sign-in and registration
src/app/components/AuthForm.tsx - Account API
src/app/api/auth/login/route.ts - Registration API
src/app/api/auth/register/route.ts - Change PIN API
src/app/api/auth/change-pin/route.ts - My reading record
src/app/me/page.tsx
Reading community
- Today’s readers
src/app/today/page.tsx - Reflection notes
src/app/components/CommentsSection.tsx - Comment API
src/app/api/comments/route.ts
Administration
- Admin page
src/app/admin/page.tsx - User management
src/app/components/AdminPanel.tsx - Admin user API
src/app/api/admin/users/route.ts
Domain and persistence
- Bible and calendar
src/lib/bible.ts - Reading offsets
src/lib/offset.ts - Read logs and stats
src/lib/reads.ts - Progress alignment
src/lib/progress.ts - Session access
src/lib/session.ts - Application database
src/lib/db.ts
Other components
- Church reader
Connections 42
- Church reader → Reading page: opens
- Reading page → Reading view: renders
src/app/page.tsx - Church reader → Past-day page: opens past day
src/app/[offset]/page.tsx - Past-day page → Reading view: renders
src/app/[offset]/page.tsx - Reading view → Bible and calendar: gets chapter
src/app/components/ReadingView.tsx - Reading view → Reading offsets: resolves day
src/app/components/ReadingView.tsx - Reading view → Read logs and stats: loads read data
src/app/components/ReadingView.tsx - Reading view → Session access: gets session
src/app/components/ReadingView.tsx - Reading view → Application database: loads note
src/app/components/ReadingView.tsx - Reading view → Chapter display: renders
src/app/components/ReadingView.tsx - Reading view → Chapter navigation: renders
src/app/components/ReadingView.tsx - Reading view → Read check: renders
src/app/components/ReadingView.tsx - Church reader → Today’s readers: views readers
- Church reader → Comment API: manages notes
- Comment API → Session access: checks login
src/app/api/comments/route.ts - Comment API → Application database: reads and writes
src/app/api/comments/route.ts - Church reader → Login page: opens account
- Login page → Sign-in and registration: renders
src/app/login/page.tsx - Church reader → Account API: signs in
- Church reader → Registration API: registers
- Account API → Application database: checks account
src/app/api/auth/login/route.ts - Account API → Session access: sets session
src/app/api/auth/login/route.ts - Registration API → Application database: creates account
src/app/api/auth/register/route.ts - Registration API → Session access: sets session
src/app/api/auth/register/route.ts - Church reader → Change PIN API: changes PIN
- Change PIN API → Session access: checks session
src/app/api/auth/change-pin/route.ts - Change PIN API → Application database: updates PIN
src/app/api/auth/change-pin/route.ts - Church reader → My reading record: views record
src/app/me/page.tsx - My reading record → Read logs and stats: loads stats
src/app/me/page.tsx - My reading record → Application database: loads notes
src/app/me/page.tsx - Church reader → Admin page: opens admin
- Admin page → User management: renders
src/app/admin/page.tsx - User management → Admin user API: manages users
- Admin user API → Session access: checks admin
src/app/api/admin/users/route.ts - Admin user API → Application database: reads and updates
src/app/api/admin/users/route.ts - Admin user API → Progress alignment: aligns progress
src/app/api/admin/users/route.ts - Admin user API → Read logs and stats: gets stats
src/app/api/admin/users/route.ts - Admin user API → Bible and calendar: resolves chapter
src/app/api/admin/users/route.ts - Read logs and stats → Application database: queries read logs
src/lib/reads.ts - Read logs and stats → Bible and calendar: maps chapters
src/lib/reads.ts - Progress alignment → Application database: aligns records
src/lib/progress.ts - Progress alignment → Bible and calendar: uses chapter data
src/lib/progress.ts