How dishit7/team-chat-app works
Project type and purpose
• This is a full-stack, real-time chat application built with Next.js 13+ (App Router).
• Key features: user authentication, server and channel management, direct messaging, file uploads, and real-time chat via WebSockets (Socket.IO).
• Data persistence via Prisma ORM and a relational database (PostgreSQL or similar). File storage through Uploadthing.
File structure
• Top-level directories:
• app/ – Next.js App Router. Contains nested layouts and route-handlers for pages under auth, invite, setup, main.
• app/api/ – Route handlers for RESTful operations (servers, channels, members, upload).
• pages/api/socket/ – Socket.IO endpoints for real-time messaging (directmessages, messages, io).
• components/ – React UI components organized by feature (chat, modals, navigation, ui primitives).
• hooks/ – Custom React hooks for sockets, queries, modals, origin.
• lib/ – Server-side utilities: Prisma client (db.ts), conversation and profile helpers, uploadthing config.
• prisma/ – Database schema and migration history.
• providers/ – React context providers: modal, React Query, socket.
• Config and build files: next.config.mjs, tsconfig.json, tailwind.config.ts, middleware.ts.
README
• Confirms Next.js bootstrap, development commands, font optimization.
Detail
• Sub-components where necessary (e.g., within Browser UI, show Providers layer and feature UIs).
• Avoid over-simplification: capture both REST and real-time flows, plus file and auth integrations.