A full-stack chat application built with Next.js, TypeScript, React, Redux Toolkit for the client, and Node.js, Express.js, and MongoDB for the backend.
/client
βββ /components # Reusable React components
βββ /pages # Next.js pages
βββ /public # Static assets (images, icons, etc.)
βββ /slices # Redux slices
βββ /src # Source files
βββ /state_manager # Redux store and middleware
βββ /styles # Global styles (TailwindCSS, etc.)
βββ /thunks # Redux thunks for async logic
βββ /types # TypeScript types and interfaces
βββ tsconfig.json # TypeScript configuration file
βββ package.json # Client dependencies and scripts
βββ ...
/server
βββ /models # MongoDB models (schemas for collections)
βββ /controllers # Request handlers for routes
βββ /routes # Express routes
βββ /middleware # Middleware functions (authentication, etc.)
βββ server.ts # Main server file (Express setup and connection)
βββ package.json # Server dependencies and scripts
βββ ...
-
Frontend:
- Next.js
- TypeScript
- React
- Redux Toolkit
- SCSS (for styling)
-
Backend:
- Node.js
- Express.js
- MongoDB
To get started with this project, follow the steps below.
- Node.js (Recommended version: 16.x or higher)
- Yarn (for package management)
- MongoDB (either locally installed or via a cloud service like MongoDB Atlas)
-
Clone the repository:
git clone https://github.com/EmmanuelVictor62/chat-app.git
-
Navigate into the project directory:
cd chat-app -
Install dependencies for the client and server:
-
For the client:
cd client yarn install -
For the server:
cd ../server yarn install
-
-
Set up MongoDB:
-
Create a
.envfile in theserverdirectory and add your MongoDB connection string:MONGODB_URI=your-mongodb-connection-string
-
After setting up the project, you can run the client and server in development mode.
-
Start the backend server:
- From the
serverfolder:yarn dev
- From the
-
Start the frontend client:
- From the
clientfolder:yarn dev
- From the
The frontend will be accessible at http://localhost:3000, and the backend server will be running at http://localhost:5000.
- Fork the repository.
- Create a new branch for your feature (
git checkout -b feature-name). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature-name). - Create a new pull request.
Made with π by Emmanuel Victor