The text-wave directory contains the following directories and files:
-
src/: Backend source codecontrollers/: Handles API route logicdb/: Handles the setup and configuration of the database connectionmodels/: MongoDB database modelsroutes/: Defines API routesmiddleware/: API route middlewareutils/generateToken.js: Generates a JWT for authorizationsocket/socket.js: Manages WebSocket connections for real-time communicationserver.js: Main entry point for the backend Express server
-
frontend/: Frontend source codesrc/:components/: Reusable UI componentscontext/: Manages Global state using React's Context APIzustand/useConversation.js: State management for Conversations using Zustandhooks/: Custom React hooksutils/: Utility functionsemoji.js: Emoji data handlingextractTime.js: Extracts and formats time from date strings
pages/: Page componentshome/: Home pagelogin/: Login pagesignup/: Signup page
App.js: Main React app component with routingindex.js: Entry point for the React app
-
vite.config.js: Sets up a React project with a proxy that redirects API requests fromlocalhost:3000/apitolocalhost:5000, enabling backend communication during development.