A financial activity dashboard that provides clear visibility into brokerage account activity — including trades, dividends, fees, and cash movement — in a single, easy-to-understand interface.
The dashboard is designed for safety, transparency, and scalability. It aggregates account activity from brokerage systems, stores it as a persistent event ledger, and presents both detailed history and high-level summaries without allowing any trading or account changes.
- 📊 Unified activity feed for trades, dividends, transfers, and fees
- 🔍 Read-only by design — no trading or account mutations
- 🧾 Persistent event history for reliable tracking and auditability
- 🔁 Broker-agnostic architecture using adapter interfaces
- 🧮 Derived analytics such as cash flow, income, and activity summaries
- ⚙️ Background ingestion independent of user interaction
- 🧪 Automated testing (unit, integration, and UI smoke tests)
- 🚀 CI/CD pipelines with staging, production, and health checks
- Investors who want a clear, organized view of account activity
- Engineers building financial dashboards or fintech tools
- Teams that need a safe, read-only financial reporting layer
- Anyone interested in modern, production-ready web architecture
- Language: TypeScript
- Front End: React / Next.js 14
- Back End: Node.js / Next.js API routes
- Database: SQLite (local), PostgreSQL (staging & production)
- ORM: Prisma
- CI/CD: GitHub Actions
This project intentionally separates data ingestion, persistence, analytics, and presentation.
By storing immutable activity events and deriving analytics dynamically, the system remains flexible, auditable, and easy to extend — including support for additional broker integrations in the future.
This project is designed to run locally with minimal setup and no external dependencies.
- Node.js 18+
- npm
- Git
=======
This repo is a mock-first starter for building an investment monitoring dashboard powered by the Public.com Trading API.
It ships with:
- Next.js 14 (App Router) + TypeScript
- TanStack Query for polling/caching
- Tailwind CSS for fast UI iteration
- Server-side Public API proxy routes (accounts, portfolio, quotes, options expirations/chain/greeks, history)
- Prisma + SQLite for watchlists, preferences, audit logs, and order tracking
- Order Blotter page (Public open orders + locally tracked submissions)
- Optional trading endpoints (preflight/place/status/cancel) behind strict safety gates
- A safe default MOCK mode so you can run the UI without any keys
Clone the repository: git clone https://github.com//public-dashboard.git
- Install
cd public-dashboard
npm install
- Configure env
npx prisma migrate dev --name init
cp .env.example .env.local
- Run
npm run dev
Open: http://localhost:3000
This repo uses SQLite by default.
npm run prisma:migrate
- Edit
.env.local:
-
Set
MOCK_PUBLIC_API=false -
Set
PUBLIC_SECRET_TOKEN=...
- Restart
npm run dev
- The secret token must never be exposed to the browser.
- Trading is off by default. To enable it, you must:
- set
ENABLE_TRADING=trueon the server - enable trading in the Settings page (DB toggle)
- if
TRADING_UNLOCK_CODEis set, store the matching unlock code locally in Settings
- set
GET /api/public/accountsGET /api/public/portfolio?accountId=POST /api/public/quotes?accountId=POST /api/public/options/expirations?accountId=POST /api/public/options/chain?accountId=GET /api/public/options/greeks?accountId=&osiSymbols=POST /api/public/options/greeks(batched; body:{ accountId, osiSymbols: string[] })GET /api/public/history?accountId=&start=&end=&pageSize=&nextToken=
POST /api/public/orders/preflight/singlePOST /api/public/orders/preflight/multiPOST /api/public/orders/placeGET /api/public/orders/status?accountId=&orderId=DELETE /api/public/orders/cancel?accountId=&orderId=
GET/POST /api/watchlistsDELETE /api/watchlists/[watchlistId]POST/DELETE /api/watchlists/[watchlistId]/itemsGET/POST /api/prefsGET /api/audit?limit=GET /api/order-tracking?limit=&accountId=
- Replace local single-user mode with real authentication
- Add risk controls (max order size, symbol allowlists, two-person rule)
- Add rate limiting and circuit breakers for upstream failures