https://finnacle-beta.vercel.app/
React + Vite frontend for a paper trading app. Uses a backend for data proxying (Finnhub/CMC/FX) and JWT auth for portfolio/watchlist.
- Install deps:
npm i
- Environment
Create .env and set your backend URL (defaults to the hosted backend) and optionally keys if you want to use the included Vercel serverless functions locally.
# Point frontend to the backend (Render instance by default)
VITE_BACKEND_URL=https://finnacle-backend.onrender.com
# Optional if using /api/* serverless functions locally instead of the backend
VITE_FINNHUB_API_KEY=...
VITE_CMC_API_KEY=...
VITE_FOREX_API_KEY=...
- Run dev server:
npm run dev
/Dashboard: search by symbol, see quote and chart (candles may be plan-limited; sparkline fallback)/optionsOptions: fetch option chain by symbol, filter by expiration, paper trade options (may be plan-limited)/portfolioPortfolio (client-only): see positions, cash, equity; close positions; data persists in localStorage/my-portfolioPortfolio (backend): create portfolio, add holdings, fetch holdings (requires login)/watchlistWatchlist (backend): manage multi-market watchlist (US, Crypto, Forex, India); live last price refresh
- Register/Login via backend JWT:
/api/auth/register,/api/auth/login - Token is stored in localStorage and attached as
Authorization: Bearer <token>to backend requests
- Production data calls are proxied via the backend to keep keys secret, rate-limit, and cache responses.
- Vercel serverless functions exist under
api/for Finnhub/CMC/FX if you prefer same-origin during local dev. - Some Finnhub endpoints (candles/options) may be unavailable on the current plan; the UI handles this gracefully.