A modern full-stack application for market exploration and real-time updates.
Nova consists of:
client/: React + TypeScript + Vite frontendserver/: Bun + Fastify backend (REST + WebSocket) with PostgreSQL (TypeORM) and Redis
- Market instruments browsing and search
- Historical candles (klines) proxied from Binance
- Real-time updates via WebSocket
- JWT authentication
- Favorites management (authenticated)
- Optional Google OAuth integration
- React + TypeScript
- Vite
- Tailwind CSS
- Zustand
- Axios
- Bun runtime
- Fastify (REST + WebSocket)
- Zod (validation)
- TypeORM
- PostgreSQL
- Redis
- JWT + Google OAuth
nova/
├── client/ # React + Vite app
│ ├── src/
│ └── package.json
├── server/ # Bun + Fastify API
│ ├── src/
│ ├── docker-compose.yml # Postgres + Redis
│ ├── .env.example
│ └── package.json
└── README.md
- Bun installed
- Docker (recommended for Postgres + Redis)
From server/:
docker compose up -dDefault ports:
- Postgres:
localhost:5432 - Redis:
localhost:6379(password-protected)
Create server/.env based on server/.env.example.
Important: the backend code expects DB_* environment variables for Postgres.
# Postgres (TypeORM)
DB_HOST=localhost
DB_PORT=5432
DB_USER=nova_user
DB_PASS=nova123
DB_NAME=nova_db
# JWT
JWT_SECRET=super_secret_dev_key_change_in_production
# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=nova123
# Google OAuth (optional)
GOOGLE_CLIENT_ID=your_google_client_id_here
GOOGLE_CLIENT_SECRET=your_google_client_secret_here
# Server
PORT=8080
NODE_ENV=developmentFrom server/:
bun install
bun run devBackend URLs:
- REST:
http://localhost:8080/api - Health:
http://localhost:8080/health - WebSocket:
ws://localhost:8080/ws
From client/:
bun install
bun run devFrontend URL:
- App:
http://localhost:5173
Dev proxy (already configured in client/vite.config.ts):
/api->http://localhost:8080/ws->ws://localhost:8080
bun run dev: start Fastify server (Bun)bun run build: build backendbun run start: run built output
bun run dev: start Vite dev serverbun run build: typecheck + buildbun run preview: preview production buildbun run lint: run ESLint
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/me(JWT required)GET /api/auth/google/callback(Google OAuth)
GET /api/market/instrumentsGET /api/market/search?q=...GET /api/market/klines?...
GET /api/favorites/POST /api/favorites/addDELETE /api/favorites/remove
GET /api/exchange/...
- DB connection errors
- Make sure containers are running and your
DB_*values match the Docker config.
- Make sure containers are running and your
- Redis errors
- Ensure
REDIS_PASSWORDmatches the Redis container password inserver/docker-compose.yml.
- Ensure
- API calls failing in the browser
- Use
http://localhost:5173and rely on the Vite proxy (/api,/ws) during development.
- Use
- Google OAuth not working locally
- Verify Google credentials and redirect/callback configuration.
