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
.env
file in theserver
directory 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
server
folder:yarn dev
- From the
-
Start the frontend client:
- From the
client
folder: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