How gohwenzhe/cognita works
Cognita is a Next.js presentation hub for the owner’s software projects. Interviewers browse a featured/catalog home page, open system presentations, and access summaries, media, documents, and optional demo/source links. The owner signs in to administer systems and their assets; data is stored in PostgreSQL, with uploads served from S3-compatible storage or local files. The graph follows documented routes and indexed imports; unsampled details such as middleware behavior are not asserted.
Main entry points: page.tsx System presentation · actions.ts Admin actions · prisma.ts Prisma client · storage.ts Asset storage
Components 23
Public presentations
- Catalog home
src/app/page.tsx - System presentation
src/app/systems/[slug]/page.tsx - Resume page
src/app/resume/page.tsx - Contact page
src/app/contact/page.tsx - System card
src/components/system-card.tsx - Rich summary renderer
src/components/rich-html.tsx - Site navigation
src/components/site-header.tsx
Owner administration
- Admin pages
src/app/admin/page.tsx - System editor
src/components/system-form.tsx - Summary editor
src/components/summary-editor.tsx - Asset manager
src/components/asset-manager.tsx - Login form
src/components/login-form.tsx - Admin actions
src/app/admin/actions.ts - Auth routes
src/app/api/auth/login/route.ts - Logout route
src/app/api/auth/logout/route.ts
Application services
- Session and site config
src/lib/auth.ts - File delivery route
src/app/api/files/[...key]/route.ts
Data and files
- Prisma client
src/lib/prisma.ts - PostgreSQL
prisma/schema.prisma - Asset storage
src/lib/storage.ts - S3 or local files
Other components
- Interviewer
- Owner
Connections 27
- Interviewer → Catalog home: browses
README.md - Interviewer → System presentation: opens
README.md - Interviewer → Resume page: views
README.md - Interviewer → Contact page: visits
README.md - Catalog home → Prisma client: queries catalog
src/app/page.tsx - Catalog home → System card: renders
src/app/page.tsx - System presentation → Prisma client: loads system
src/app/systems/[slug]/page.tsx - System presentation → Rich summary renderer: renders summary
src/app/systems/[slug]/page.tsx - System presentation → Asset storage: builds file links
src/app/systems/[slug]/page.tsx - System presentation → Session and site config: reads site config
src/app/systems/[slug]/page.tsx - Prisma client → PostgreSQL: accesses
src/lib/prisma.ts - Owner → Login form: signs in
README.md - Login form → Auth routes: submits credentials
- Auth routes → Session and site config: checks and creates session
src/app/api/auth/login/route.ts - Logout route → Session and site config: clears session
src/app/api/auth/logout/route.ts - Owner → Admin pages: manages catalog
README.md - Admin pages → Prisma client: loads systems
src/app/admin/page.tsx - Admin pages → System editor: opens editor
- System editor → Summary editor: embeds editor
src/components/system-form.tsx - System editor → Admin actions: submits changes
src/components/system-form.tsx - Asset manager → Admin actions: submits asset changes
src/components/asset-manager.tsx - Asset manager → Asset storage: builds file links
src/components/asset-manager.tsx - Admin actions → Session and site config: checks owner session
src/app/admin/actions.ts - Admin actions → Prisma client: persists catalog
src/app/admin/actions.ts - Admin actions → Asset storage: stores uploads
src/app/admin/actions.ts - File delivery route → Asset storage: reads requested file
src/app/api/files/[...key]/route.ts - Asset storage → S3 or local files: reads and writes
src/lib/storage.ts