Skip to content

skydev92/Cryptocurrency-Portfolio-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cryptoport — Cryptocurrency Portfolio Tracker

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.

Tech stack

  • 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)

Features

  • 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)

Prerequisites

  • Node.js 18+ (recommended)
  • MongoDB (local or Atlas)
  • Network access for CoinGecko and the configured news URL

Quick start

  1. Clone the repo and install dependencies from the repository root:

    npm install
  2. Copy environment variables and edit as needed:

    cp .env.example .env

    Place .env in the repository root or under server/ (the server loads both locations). Set at least MONGODB_URI and a strong JWT_SECRET (minimum length enforced by the server).

  3. Run API and UI together:

    npm run dev
    • API: http://localhost:4000 (see PORT)
    • App: http://localhost:5173 (Vite dev server proxies /api and /health to the API)
  4. Register a user in the UI, then add holdings using CoinGecko ids (e.g. bitcoin, ethereum).

Scripts

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

Environment variables

See .env.example for MONGODB_URI, JWT_SECRET, PORT, CLIENT_URL, COINGECKO_BASE_URL, and NEWS_API_URL.

Repository layout

client/     # Vite + React SPA
server/     # Express API and background alert job
package.json

API overview

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>.

Disclaimer

Price and signal data depend on third-party APIs and simplified math. Nothing here is investment advice. Paper trading is simulation only.

License

Private / unspecified — add a LICENSE file if you publish this repository publicly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages