- Linux or macOS (preferred). On Windows, use WSL or dual boot.
- Docker
- Docker Compose
⚠️ Note: Your system may support eitherdocker-compose
ordocker compose
.
Use the same consistently. Prependsudo
if you encounter permission errors.
-
Fork the repositories on GitHub (backend, frontend, websocket) from the original organization:
- Backend: bitsacm/pollz-backend
- Frontend: bitsacm/pollz-frontend
- Websocket: bitsacm/pollz-websocket
-
Clone your forks into a single
pollz
folder (replace<your-github-username>
with yours):# Create a parent folder to keep all Pollz repos together mkdir pollz cd pollz # Clone backend git clone https://github.com/<your-github-username>/pollz-backend.git # Clone frontend git clone https://github.com/<your-github-username>/pollz-frontend.git # Clone websocket git clone https://github.com/<your-github-username>/pollz-websocket.git
-
Add upstream remotes to fetch updates from the official repos:
cd pollz-backend git remote add upstream https://github.com/bitsacm/pollz-backend.git cd .. cd pollz-frontend git remote add upstream https://github.com/bitsacm/pollz-frontend.git cd .. cd pollz-websocket git remote add upstream https://github.com/bitsacm/pollz-websocket.git cd ..
-
Fork the repository on GitHub.
-
Clone your fork (replace
<your-github-username>
):git clone https://github.com/<your-github-username>/pollz-websocket.git cd pollz-websocket
-
(Optional but recommended for contributors) Add the original repo as upstream:
git remote add upstream https://github.com/bitsacm/pollz-websocket.git git fetch upstream
- Install dependencies
go mod download
- Setup environment variables
cp .env.example .env
# Edit .env with your database credentials
- Run with Docker (Recommended)
docker-compose up --build
OR run locally:
# Ensure PostgreSQL and Redis are running
make run
Server will be available at ws://localhost:1401
ws://localhost:1401/ws/chat/live
- Main chat WebSocket