How reda-trouki/chat-app works
Project type and purpose
• This is a full-stack real-time chat application built with Next.js (App Router) on the front end and Convex as a backend-as-a-service (data store + serverless functions).
• The README confirms it’s a Next.js project; the convex/ folder contains all backend logic (data schema, API functions, authentication config).
File structure
• Top-level directories:
• app/ – Next.js App Router routes and layouts
• components/ – Shared UI building blocks
• convex/ – Backend functions, schema, generated API
• public/ – Static assets
• src/hooks, src/lib, src/providers – Client-side logic, utilities, and context providers
• Key config files:
• next.config.mjs, postcss.config.mjs, tailwind.config.ts – Build & styling
• tsconfig.json, .eslintrc.json – TypeScript and linting
• Patterns & frameworks: React component hierarchy, custom hooks, Convex’s data-model plus query/mutation functions.
README for additional insights
• Confirms basic Next.js setup & dev workflow.
Detailed guidance
• Global layout & navigation (sidebar, header)
• Conversations list and conversation detail view
• Chat input and message list components
• Inside the backend segment, show how each Convex function maps to a use-case:
• conversations.ts ↔ fetch or create conversation
• messages.ts ↔ send & fetch messages
• friends.ts / requests.ts ↔ friend management
• Shared utilities (e.g., src/lib/utils.ts, src/hooks/useNavigation) if they coordinate cross-component logic.