How krehantgajjar10/talkora works
Talkora is a community posting product with a Next.js interface and an Express API. Users register or log in, then can browse posts, view profiles, and submit or edit posts; authenticated actions use cookie-based sessions. The backend routes requests through validation and controllers into domain services, with Prisma-backed persistence. The excerpts establish API mounting and several controller/service calls; frontend-to-API behavior is directly visible for registration, while other frontend/API connections and unsampled integrations are left unasserted.
Main entry points: app.ts Express application · auth.controller.ts Authentication controller · posts.routes.ts Post routes · auth.service.ts Authentication service
Components 22
Web experience
- Registration page
frontend/src/app/register/page.tsx - Community feed
frontend/src/app/feed/page.tsx - Post detail
frontend/src/app/post/[postId]/page.tsx - User profile
frontend/src/app/u/[username]/page.tsx - Post submission
frontend/src/app/submit/page.tsx - Session context
frontend/src/context/auth-context.tsx - HTTP API client
frontend/src/lib/api.ts
API routing
- Express application
backend/src/app.ts - Authentication routes
backend/src/modules/auth/auth.routes.ts - Post routes
backend/src/modules/posts/posts.routes.ts - User routes
backend/src/modules/users/users.routes.ts
Domain services
- Authentication controller
backend/src/modules/auth/auth.controller.ts - Authentication service
backend/src/modules/auth/auth.service.ts - Post controller
backend/src/modules/posts/posts.controller.ts - Post service
backend/src/modules/posts/posts.service.ts - Profile controller
backend/src/modules/users/users.controller.ts - Profile service
backend/src/modules/users/users.service.ts
Shared infrastructure
- Database access
backend/src/config/prisma.ts - Token configuration
backend/src/config/auth.ts - Image upload handling
backend/src/middlewares/upload.middleware.ts - API response formatting
backend/src/utils/api-response.ts
Other components
- Community visitor
Connections 21
- Community visitor → Registration page: registers through
frontend/src/app/register/page.tsx - Registration page → HTTP API client: submits account data
frontend/src/app/register/page.tsx - HTTP API client → Express application: sends API requests
- Express application → Authentication routes: mounts at auth path
backend/src/app.ts - Express application → Post routes: mounts at posts path
backend/src/app.ts - Express application → User routes: mounts at users path
backend/src/app.ts - Authentication routes → Authentication controller: dispatches handlers
backend/src/modules/auth/auth.routes.ts - Post routes → Post controller: dispatches handlers
backend/src/modules/posts/posts.routes.ts - User routes → Profile controller: dispatches handlers
backend/src/modules/users/users.routes.ts - Authentication controller → Authentication service: calls auth operations
backend/src/modules/auth/auth.controller.ts - Post controller → Post service: calls post operations
backend/src/modules/posts/posts.controller.ts - Profile controller → Profile service: calls profile operations
backend/src/modules/users/users.controller.ts - Authentication service → Database access: reads and writes sessions
backend/src/modules/auth/auth.service.ts - Authentication service → Token configuration: uses token helpers
backend/src/modules/auth/auth.service.ts - Authentication controller → Token configuration: sets cookie options
backend/src/modules/auth/auth.controller.ts - Post routes → Image upload handling: runs upload middleware
backend/src/modules/posts/posts.routes.ts - Authentication controller → API response formatting: formats API responses
backend/src/modules/auth/auth.controller.ts - Post controller → API response formatting: formats API responses
backend/src/modules/posts/posts.controller.ts - Profile controller → API response formatting: formats API responses
backend/src/modules/users/users.controller.ts - Post service → Database access: uses database access
- Profile service → Database access: uses database access