This project is a real-time chat application that utilizes GraphQL, Redis, Prisma, NestJS, and React.
The application is structured with the following components:
- GraphQL API (NestJS): Provides the GraphQL API using NestJS.
- Prisma: Serves as an ORM for accessing the database.
- Redis: Utilized for real-time updates and subscriptions.
- React Frontend: A React-based frontend for the chat application.
Ensure you have the following prerequisites installed:
- Node.js
- npm (Node Package Manager)
- Redis Server
- Prisma CLI (
npm install -g prisma
)
-
Clone the Repository:
git clone https://github.com/your-username/realtime-chat-app.git cd realtime-chat-app
-
Install Dependencies
cd backend npm install cd ../frontend npm install
-
Configure Prisma: Copy
.env.example
to.env
in the backend directory and configure the database connection. -
Run Prisma Migrations and Generate Prisma Client:
cd backend npm run prisma:apply
-
Start the NestJS Server
npm start
The GraphQL API will be accessible at http://localhost:3000/graphql.
-
Configure Backend API Endpoint: Update the GraphQL API endpoint in the frontend/src/config.js file.
-
Start the React Application:
cd frontend npm start
The React application will be available at http://localhost:3001.