Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ritulbhatnagar/scalable-chat-app
Majorly focus on scalabilty not on UI
https://github.com/ritulbhatnagar/scalable-chat-app
digitalocean docker fastify github-actions nextjs redis shadcn-ui tailwindui vercel websockets
Last synced: 29 days ago
JSON representation
Majorly focus on scalabilty not on UI
- Host: GitHub
- URL: https://github.com/ritulbhatnagar/scalable-chat-app
- Owner: RitulBhatnagar
- Created: 2024-02-08T15:55:13.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-02-09T03:39:26.000Z (11 months ago)
- Last Synced: 2024-04-14T03:11:49.616Z (9 months ago)
- Topics: digitalocean, docker, fastify, github-actions, nextjs, redis, shadcn-ui, tailwindui, vercel, websockets
- Language: TypeScript
- Homepage: https://scalable-chat-app-ui.vercel.app/
- Size: 832 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## Build and Deploy a Chat Application That Scales Horizontally with WebSockets and Upstash Redis
### Ui repo link -> https://github.com/RitulBhatnagar/scalable-chat-app-ui/tree/master
## What I have use?
1. Fastify - Backend
1. Websockets - Realtime
1. Next.js - Frontend
1. Tailwind & Shadcn UI - Styling
1. Redis - Pub/Sub
1. Docker/docker-compose - Containerization
1. GitHub actions - CI/CD
1. DigitalOcean - Host the backend
1. Vercel - Host the frontend## System architecture
![Screenshot](system-arch.png)
## Data flow
![Screenshot](data-flow.png)## Debugging
### Websockets
1. Using `wss://` and not `ws://` in production
2. Use debug mode in Caddy server
```
{
debug
}
```### Docker
1. List our running docker containers
```bash
docker ps
```
1. Stop a running container
```bash
docker stop
```1. Remove a container
```bash
docker rm
```1. List out networks
```bash
docker network ls
```1. Remove a network
```bash
docker network rm
```