How pangilproject/pangil-blog works
This is a multi-site publishing application for technical and faith-oriented posts, with a central hub. Readers browse published content and feeds; administrators authenticate, edit and publish posts; a crawler can submit QT drafts, while scheduled jobs handle monitoring, backups and digests. Public-site routing, content persistence, statistics and presentation are distinct parts of the runtime. The graph follows the sampled routes and SOURCE INDEX references; unsampled capabilities are represented where the tree establishes them, but uncertain implementation links are omitted.
Main entry points: prisma.ts Application database · tasks.ts Scheduled tasks · publicLists.ts Public lists · (public) Public sites
Components 27
Public publishing
- Public sites
app/(public) - Hub experience
app/(public)/hub/page.tsx - Record cards
components/record/RecordCard.tsx - Post detail data
lib/db/publicPosts.ts - Public lists
lib/db/publicLists.ts - Feeds and sitemap
app/(feeds)/rss.xml/route.ts
Editorial admin
- Admin workspace
app/admin/page.tsx - Post editor
components/editor - Post actions
lib/actions/posts.ts - Admin session
lib/auth/adminSession.ts
Automation and operations
- QT crawler
app/api/crawler/ingest/route.ts - Crawl records
lib/db/crawlRuns.ts - Scheduled tasks
lib/cron/tasks.ts - Weekly digest data
lib/db/weeklyDigest.ts - Slack notifications
lib/notify/slack.ts - Visit statistics
app/api/stat/route.ts - Stat events
lib/db/statEvents.ts - Backup storage
lib/storage/backups.ts
Shared platform
- Public URL rules
lib/site/publicUrl.ts - Site resolution
lib/site/resolveSite.ts - Content schema
lib/content/schema.ts - Application database
lib/db/prisma.ts - Cache revalidation
lib/revalidate/tags.ts
Other components
- Reader
- Supabase Auth
- Crawler runner
scripts/crawler/run.mts - Cron scheduler
Connections 31
- Reader → Public sites: browses
app/(public)/faith/page.tsx - Public sites → Public lists: loads lists
app/(public)/faith/page.tsx - Public sites → Post detail data: loads posts
- Public lists → Application database: queries
lib/db/publicLists.ts - Post detail data → Application database: queries
lib/db/publicPosts.ts - Public sites → Record cards: renders
app/(public)/hub/page.tsx - Hub experience → Public lists: counts posts
app/(public)/hub/page.tsx - Feeds and sitemap → Site resolution: resolves site
app/(feeds)/rss.xml/route.ts - Feeds and sitemap → Public lists: loads feed items
app/(feeds)/rss.xml/route.ts - Feeds and sitemap → Public URL rules: builds links
app/(feeds)/rss.xml/route.ts - Admin workspace → Admin session: checks session
app/admin/page.tsx - Admin session → Supabase Auth: checks identity
lib/auth/adminSession.ts - Admin workspace → Post editor: opens editor
- Post editor → Post actions: saves posts
- Post actions → Application database: writes posts
- Post actions → Cache revalidation: invalidates cache
- Crawler runner → QT crawler: submits results
- QT crawler → Crawl records: records outcome
app/api/crawler/ingest/route.ts - QT crawler → Slack notifications: notifies
app/api/crawler/ingest/route.ts - Crawl records → Application database: persists runs
lib/db/crawlRuns.ts - Cron scheduler → Scheduled tasks: invokes
- Scheduled tasks → Crawl records: checks run
lib/cron/tasks.ts - Scheduled tasks → Weekly digest data: loads weekly stats
lib/cron/tasks.ts - Weekly digest data → Application database: queries
- Scheduled tasks → Backup storage: uploads backup
lib/cron/tasks.ts - Scheduled tasks → Slack notifications: notifies
lib/cron/tasks.ts - Visit statistics → Site resolution: loads host config
app/api/stat/route.ts - Visit statistics → Stat events: records event
app/api/stat/route.ts - Stat events → Application database: persists events
- Public lists → Cache revalidation: uses cache tags
lib/db/publicLists.ts - Post detail data → Content schema: validates content
lib/db/publicPosts.ts