A real-time web-based chat application built with Angular and Go.
- Real-time messaging using WebSocket
- JWT-based authentication
- Message persistence with PostgreSQL
- User presence indicators
- Session management with Redis
- Message history on room entry
- Timestamp display for messages
- Frontend: Angular 17, WebSocket
- Backend: Go 1.23
- Databases: PostgreSQL 16, Redis
- DevOps: Docker, Docker Compose, GitHub Actions
- Testing: Python (pytest)
- Docker and Docker Compose
- Node.js 20+ (for local development)
- Go 1.23+ (for local development)
- PostgreSQL 16+ (for local development)
- Redis (for local development)
- Clone the repository
git clone https://github.com/hdngo/whisper.git
cd whisper- Create a .env file based on .env.example
cp Backend\.env.example Backend\.env- Start the application using Docker Compose
docker-compose up -dThe application will be available at http://localhost:80 (port can be changed via docker-compose.yml)
cd Backend
cp .env.example .env # Configure your environment variables
go mod download
go run cmd/server/main.goSince frontend assumes the same port for API requests, it is recommended you have nginx setup to forward requests to their appropriate place.
If not, just set the API URL in auth.service.ts and WS URL in websocket.service.ts accordingly.
cd Frontend
npm install
ng serveRun the test suite:
cd Backend/testing
python -m pip install -r requirements.txt
pytestRun load tests:
python stress_test.pywhisper/
├── Backend/ # Go backend service
├── Frontend/ # Angular frontend application
└── docker-compose.yml

