Local Development
Running frontend and backend without Docker for development.
Backend (Go)
cd Hallo-Stroke-Backend
go mod downloadcp .env.example .env
# fill DATABASE_URI, JWT secrets, API keys, WhatsApp creds, AES key, VAPID keysEither install Postgres 18 locally or start just the db service:
docker compose up -d dbgo run cmd/main.goAutoMigrate runs on startup. The scheduler goroutine starts automatically.
Open http://localhost:3001/swagger for interactive API docs.
Regenerating Swagger
Swagger artifacts live in docs/ (docs.go, swagger.json, swagger.yaml). Regenerate with swag init after annotating handlers.
Frontend (React)
cd hallo-stroke-bunny
npm installcp .env.development .env
# set REACT_APP_API_BASE_URL to your local backend (default :3001/api)npm start # CRA, http://localhost:3000The dev server proxies nothing — it calls the backend directly via REACT_APP_API_BASE_URL. Make sure the backend CORS allowlist includes http://localhost:3000 (it does by default).
Debugging tips
- 401 loop: the axios interceptor retries once then redirects. Check that
/api/refreshworks and thatJWT_REFRESH_SECRETmatches between sessions. - Images not loading: confirm
REACT_APP_MEDIA_BASEpoints to the backend host serving/uploads/*. - Push not working: service workers are unregistered on load (
src/index.js) — this is intentional cache-clearing, but it makes web push fragile in dev. - Reminders not firing: the scheduler ticks every 20s; check
logs/app.logand that the user'stimezoneis set (defaultAsia/Makassar).