Skip to content
/ nova Public

Full-stack market exploration app with real-time updates.

Notifications You must be signed in to change notification settings

krushodev/nova

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Nova Logo

Nova

A modern full-stack application for market exploration and real-time updates.

Overview

Nova consists of:

  • client/: React + TypeScript + Vite frontend
  • server/: Bun + Fastify backend (REST + WebSocket) with PostgreSQL (TypeORM) and Redis

Features

  • 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

Tech Stack

Frontend

  • React + TypeScript
  • Vite
  • Tailwind CSS
  • Zustand
  • Axios

Backend

  • Bun runtime
  • Fastify (REST + WebSocket)
  • Zod (validation)
  • TypeORM
  • PostgreSQL
  • Redis
  • JWT + Google OAuth

Project Structure

nova/
├── client/                 # React + Vite app
│   ├── src/
│   └── package.json
├── server/                 # Bun + Fastify API
│   ├── src/
│   ├── docker-compose.yml  # Postgres + Redis
│   ├── .env.example
│   └── package.json
└── README.md

Getting Started

Prerequisites

  • Bun installed
  • Docker (recommended for Postgres + Redis)

1) Start Postgres + Redis (Docker)

From server/:

docker compose up -d

Default ports:

  • Postgres: localhost:5432
  • Redis: localhost:6379 (password-protected)

2) Configure the backend (server/.env)

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=development

3) Run the backend

From server/:

bun install
bun run dev

Backend URLs:

  • REST: http://localhost:8080/api
  • Health: http://localhost:8080/health
  • WebSocket: ws://localhost:8080/ws

4) Run the frontend

From client/:

bun install
bun run dev

Frontend URL:

  • App: http://localhost:5173

Dev proxy (already configured in client/vite.config.ts):

  • /api -> http://localhost:8080
  • /ws -> ws://localhost:8080

Available Scripts

Backend (server/)

  • bun run dev: start Fastify server (Bun)
  • bun run build: build backend
  • bun run start: run built output

Frontend (client/)

  • bun run dev: start Vite dev server
  • bun run build: typecheck + build
  • bun run preview: preview production build
  • bun run lint: run ESLint

Main API Endpoints

Auth

  • POST /api/auth/register
  • POST /api/auth/login
  • GET /api/auth/me (JWT required)
  • GET /api/auth/google/callback (Google OAuth)

Market

  • GET /api/market/instruments
  • GET /api/market/search?q=...
  • GET /api/market/klines?...

Favorites (JWT required)

  • GET /api/favorites/
  • POST /api/favorites/add
  • DELETE /api/favorites/remove

Exchange rates

  • GET /api/exchange/...

Troubleshooting

  • DB connection errors
    • Make sure containers are running and your DB_* values match the Docker config.
  • Redis errors
    • Ensure REDIS_PASSWORD matches the Redis container password in server/docker-compose.yml.
  • API calls failing in the browser
    • Use http://localhost:5173 and rely on the Vite proxy (/api, /ws) during development.
  • Google OAuth not working locally
    • Verify Google credentials and redirect/callback configuration.

Releases

No releases published

Packages

No packages published

Languages