Monorepo app for tracking crypto holdings with live prices, profit and loss, alerts, news, trade history, lightweight analytics, experimental technical signals, and paper (simulated) orders.
- Client: React 18, TypeScript, Vite, React Router, Recharts
- Server: Node.js, Express, TypeScript, Mongoose (MongoDB)
- Data: CoinGecko (spot prices and charts), CryptoCompare-style news endpoint (see
NEWS_API_URL)
- Portfolio: Per-user holdings (CoinGecko id, symbol, quantity, optional average cost in USD)
- Valuation: Live USD prices (cached on the server), totals, unrealized P/L when cost basis is set
- Alerts: Price above/below targets with a periodic evaluator (in-app state; rearm after trigger)
- News: Server-side fetch and JSON for the dashboard feed
- Trades: Append-only-style trade log (not auto-synced to holdings)
- Analytics: Allocation (pie) and simple benchmark hints from stored snapshots
- Signals: Experimental MA crossover / RSI from historical closes (not financial advice)
- Paper trading: Simulated limit orders vs. spot (no real exchange integration)
- Node.js 18+ (recommended)
- MongoDB (local or Atlas)
- Network access for CoinGecko and the configured news URL
-
Clone the repo and install dependencies from the repository root:
npm install
-
Copy environment variables and edit as needed:
cp .env.example .env
Place
.envin the repository root or underserver/(the server loads both locations). Set at leastMONGODB_URIand a strongJWT_SECRET(minimum length enforced by the server). -
Run API and UI together:
npm run dev
- API:
http://localhost:4000(seePORT) - App:
http://localhost:5173(Vite dev server proxies/apiand/healthto the API)
- API:
-
Register a user in the UI, then add holdings using CoinGecko ids (e.g.
bitcoin,ethereum).
| Command | Description |
|---|---|
npm run dev |
Runs server and client via concurrently |
npm run dev:server |
API only (tsx watch) |
npm run dev:client |
Vite dev server only |
npm run build |
tsc for server + production build for client |
See .env.example for MONGODB_URI, JWT_SECRET, PORT, CLIENT_URL, COINGECKO_BASE_URL, and NEWS_API_URL.
client/ # Vite + React SPA
server/ # Express API and background alert job
package.json
REST routes are mounted under /api (e.g. /api/auth, /api/holdings, /api/portfolio/summary, /api/market/prices, /api/alerts, /api/news, /api/trades, /api/analytics/overview, /api/signals/:coinGeckoId, /api/paper/orders). Health check: GET /health.
Authenticated routes expect Authorization: Bearer <JWT>.
Price and signal data depend on third-party APIs and simplified math. Nothing here is investment advice. Paper trading is simulation only.
Private / unspecified — add a LICENSE file if you publish this repository publicly.