Getting Started
Set up your local development environment and start running STORM DAY in minutes.
Prerequisites
Environment Variables
Each service requires specific environment variables. Here are the key configurations:
Gateway
NATS_URL=nats://localhost:4222
JWT_SECRET=your-secret-key
HTTP_PORT=8080User Service
DB_HOST=localhost
DB_PORT=5432
DB_NAME=storm_user_db
DB_USER=postgres
DB_PASSWORD=postgres
JWT_SECRET=your-secret-keyMessage Service
STORAGE=postgres # or "memory" for testing
HTTP_PORT=8081
NATS_URL=nats://localhost:4222
DATABASE_URL=postgres://postgres:postgres@localhost:5432/storm_chat_dbLocal Development Setup
Follow these steps in order to start the full stack locally:
Start Infrastructure
Start the required infrastructure services using Docker Compose:
docker compose up -d postgres-user postgres-chat nats redisStart User Service
Start the NestJS user service on port 3000:
cd services/user
DB_NAME=storm_user_db npm run start:devStart Gateway
Start the Go gateway on port 8080:
cd services/gateway
go run ./cmd/main.goStart Message Service
Start the Go message service on port 8081:
cd services/message
STORAGE=postgres HTTP_PORT=8081 go run ./cmd/main.goStart Frontend
Start the Vue.js frontend on port 5174:
cd STORM_DAY_Project_Front
pnpm install
pnpm devVite Proxy Configuration
The Vite dev server is configured to proxy API requests to the Gateway:
// vite.config.ts
export default defineConfig({
server: {
port: 5174,
proxy: {
'/api': 'http://localhost:8080',
'/auth': 'http://localhost:8080',
'/users': 'http://localhost:8080',
'/ws': {
target: 'ws://localhost:8080',
ws: true
}
}
}
})Production Environment
Azure AKS Deployment
The backend is currently deployed on Azure AKS at http://51.138.200.66:8080
For frontend-only development, point the Vite proxy to the production backend and only run pnpm dev.
Troubleshooting
NATS connection refused
Ensure NATS is running: docker ps | grep nats
Database connection failed
Check PostgreSQL is running and DB_NAME matches your environment
WebSocket not connecting
Verify the JWT token is valid and the Gateway is running on port 8080