You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A full-stack real-time currency exchange tracker built with the @cleverbrush library suite. Demonstrates schema-first development with React 19, TypeScript 6, and PostgreSQL.
Architecture
currency-tracker/
├── shared/ # Wire contract + schemas (used by both backend & frontend)
├── backend/ # BFF server aggregating Frankfurter API
└── frontend/ # React 19 SPA with real-time updates
Tech Stack
Layer
Technology
Schemas
@cleverbrush/schema — single source of truth for validation, types, forms, DB, and OpenAPI
WebSockets — Live rate streaming and alert notifications
OpenAPI/AsyncAPI — Auto-generated API documentation from schema definitions
Prerequisites
Node.js 22+
PostgreSQL 16+ (or Docker)
Setup
# Install dependencies
npm install
# Copy environment config
cp .env.example .env
# Edit .env with your database URL, JWT secret, etc.# Start PostgreSQL (via Docker)
docker-compose up -d postgres
# Run backend (migrations run automatically on startup)cd backend && npm start
# Run frontend (in another terminal)cd frontend && npm run dev
Environment Variables
Variable
Description
Default
DATABASE_URL
PostgreSQL connection string
—
JWT_SECRET
Secret for JWT signing
—
JWT_EXPIRES_IN
Token expiration
7d
PORT
Backend server port
3000
POLL_INTERVAL_MINUTES
Rate polling interval
5
FRANKFURTER_BASE_URL
Frankfurter API base URL
https://api.frankfurter.dev
CORS_ORIGIN
Allowed CORS origin
http://localhost:5173
Scripts
# Lint all packages
npm run lint
# Auto-fix lint + formatting
npm run lint:fix
# Format code
npm run format
# Type-check all packages
npm run typecheck