- Send and receive messages
- Display current connection count
- Implement real-time communication with WebSockets
- Utilize Redis Pub/Sub for communication across multiple instances
- Employ Redis for storing data (connection count/messages)
- Containerize the application using Docker and docker-compose
- Implement Docker multi-stage builds
- Implement graceful shutdowns
- Fastify - Backend
- Websockets - Realtime communication
- Next.js - Frontend
- Tailwind & Shadcn UI - Styling
- Redis - Pub/Sub and data storage
- Docker/docker-compose - Containerization
- Vercel - Hosting the frontend
To initialize the Docker environment for this project, follow these steps:
-
Clone the project repository.
-
Navigate to the project directory.
-
Create a new file named
.env
in the root directory. -
Add the following line to the
.env
file, replacingUPSTASH_REDIS_REST_URL
with your Upstash URL:UPSTASH_REDIS_REST_URL=your_upstash_url
-
Save the
.env
file.
To run the project, use the following command:
docker-compose up
Feel free to explore and enhance this project.