Syncronus is a Realtime Chat App. which features message channels & direct messages to other users including emoji, upload files, download files in realtime.
Frontend
-react-router-dom: For routing
-tailwind for stayling
-fetch: For making HTTP requests
-context API: For state management SocketJS
-Redux Toolkit : For State management feature
-cookie : For authentication
Backend
-express: For creating the server
-mongoose: For interacting with MongoDB
-cors: For handling Cross-Origin Resource Sharing
-dotenv: For managing environment variables
-zod: For validation user
-bcryptjs: For hashing passwords
-jsonwebtoken: For authentication
-nodemon: For automatic server restarts during development
Before you begin, ensure you have the following installed on your machine:
- Node.js: Download and install Node.js
- npm: Node.js package manager (comes with Node.js installation)
-
Clone the repository:
git clone https://github.com/anwarhakim31/Realtime-Chat.git Syncronus
-
Navigate to front project directory:
cd Syncronus
-
Navigate to backend directory and install depedencies
cd backend npm install
-
Navigate to frontend directory and install depedencies
cd .. cd frontend npm install
-
Create a .env file in the root backend of your project.
PORT="8080"
JWT_KEY=
ORIGIN="http://localhost:5173"
DATABASE_URL=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=
AWS_S3_BUCKET=
-
Create a .env file in the root frontend of your project.
VITE_SERVER_URL = "http://localhost:2001"
-
To start the server, run:
npm run dev
-
To start the frontend, run :
npm run dev
Deploy the dist
directory to your hosting platform of choice.