How kartikmanral092006/weblog-production works
WeBlog lets readers discover and engage with posts and lets writers create, schedule, and manage them. The Next.js client presents these workflows and calls the Express API; route modules dispatch requests to controllers, which apply domain logic and use Prisma-backed PostgreSQL. Authentication uses JWT cookies, with Google OAuth as an external sign-in option. The map includes README-documented capabilities whose individual handlers were not excerpted; their internal call relationships are therefore omitted. The supplied tree does not expose a Prisma schema path.
Main entry points: index.js Express API · prisma.js Prisma client · page.tsx Next.js experience · api.ts API client
Components 25
Web client
- Next.js experience
frontend/app/page.tsx - Sign-in UI
frontend/components/auth-modal.tsx - Post editor
frontend/app/blog/new/page.tsx - Feeds and browsing
frontend/app/explore/page.tsx - Community views
frontend/app/profile/[id]/page.tsx - API client
frontend/lib/api.ts
API and identity
- Express API
backend/src/index.js - Auth routes
backend/src/routes/authRoutes.js - Authentication
backend/src/controllers/auth.controller.js - Session middleware
backend/src/middlewares/auth.middleware.js
Publishing and discovery
- Blog routes
backend/src/routes/blogRoutes.js - Post workflows
backend/src/controllers/blog.controller.js - Topic categorization
backend/src/services/blogCategorizationService.js
Reader community
- Community routes
backend/src/routes/commentRoutes.js - Community actions
backend/src/controllers/comment.controller.js - Bookmark routes
backend/src/routes/bookmarkRoutes.js - Bookmark management
backend/src/controllers/bookmark.controller.js - Notification service
backend/src/services/notificationService.js - Notification routes
backend/src/routes/notificationRoutes.js - Profiles and follows
backend/src/controllers/user.controller.js - Reading history
backend/src/controllers/history.controller.js
Persistence
- Prisma client
backend/src/lib/prisma.js - PostgreSQL
Other components
- Reader or writer
- Google OAuth
Connections 35
- Reader or writer → Next.js experience: uses
- Next.js experience → Sign-in UI: opens sign-in
- Next.js experience → Post editor: creates posts
- Next.js experience → Feeds and browsing: browses feeds
- Next.js experience → Community views: views community
- Sign-in UI → API client: requests auth
- Post editor → API client: submits posts
- Feeds and browsing → API client: requests feeds
- Community views → API client: requests community
- API client → Express API: calls API
- Express API → Auth routes: mounts routes
backend/src/index.js - Express API → Blog routes: mounts routes
backend/src/index.js - Express API → Community routes: mounts routes
backend/src/index.js - Express API → Bookmark routes: mounts routes
backend/src/index.js - Express API → Notification routes: mounts routes
backend/src/index.js - Express API → Profiles and follows: mounts user routes
backend/src/index.js - Express API → Reading history: mounts history routes
backend/src/index.js - Auth routes → Authentication: dispatches to
backend/src/routes/authRoutes.js - Auth routes → Session middleware: guards session
backend/src/routes/authRoutes.js - Blog routes → Post workflows: dispatches to
backend/src/routes/blogRoutes.js - Blog routes → Session middleware: guards requests
backend/src/routes/blogRoutes.js - Community routes → Community actions: dispatches to
backend/src/routes/commentRoutes.js - Bookmark routes → Bookmark management: dispatches to
backend/src/routes/bookmarkRoutes.js - Bookmark routes → Session middleware: guards requests
backend/src/routes/bookmarkRoutes.js - Notification routes → Session middleware: guards requests
backend/src/routes/notificationRoutes.js - Authentication → Prisma client: reads and writes users
backend/src/controllers/auth.controller.js - Session middleware → Prisma client: loads session user
backend/src/middlewares/auth.middleware.js - Post workflows → Prisma client: reads and writes posts
backend/src/controllers/blog.controller.js - Post workflows → Topic categorization: detects topics
backend/src/controllers/blog.controller.js - Post workflows → Notification service: notifies followers
backend/src/controllers/blog.controller.js - Bookmark management → Prisma client: stores bookmarks
backend/src/controllers/bookmark.controller.js - Profiles and follows → Prisma client: reads and updates profiles
backend/src/controllers/user.controller.js - Notification service → Prisma client: stores notifications
backend/src/services/notificationService.js - Prisma client → PostgreSQL: persists data
backend/src/lib/prisma.js - Google OAuth → Authentication: OAuth exchange
backend/src/controllers/auth.controller.js