Go to file
isnowglobal-admin f112a14d60 Phase 1: Migrate from SQLite to PostgreSQL
- Provisioned PostgreSQL 16 droplet (2vCPU/4GB) on DO
- Converted Drizzle ORM from better-sqlite3 to node-postgres
- Updated schema to use pgTable, serial, timestamp
- Added initDb() startup function for table creation
- Configured connection pooling (max 20, idle timeout)
- Removed better-sqlite3 dependency
- Deployed and verified: auth create/read works on PostgreSQL
- DB: gammanexus@gammanexus-db (10.136.95.120 private network)
2026-05-21 19:50:37 -04:00
client Fix auth: hash routing bugs, proper error parsing from JSON responses 2026-05-21 16:24:39 -04:00
docs Docs: meeting notes and implementation plan from team call 2026-05-21 19:33:22 -04:00
script GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00
server Phase 1: Migrate from SQLite to PostgreSQL 2026-05-21 19:50:37 -04:00
shared Phase 1: Migrate from SQLite to PostgreSQL 2026-05-21 19:50:37 -04:00
.env.example GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00
.gitignore GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00
README.md GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00
components.json GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00
data.db GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00
drizzle.config.ts Phase 1: Migrate from SQLite to PostgreSQL 2026-05-21 19:50:37 -04:00
package-lock.json Phase 1: Migrate from SQLite to PostgreSQL 2026-05-21 19:50:37 -04:00
package.json Phase 1: Migrate from SQLite to PostgreSQL 2026-05-21 19:50:37 -04:00
postcss.config.js GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00
tailwind.config.ts GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00
tsconfig.json GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00
vite.config.ts GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00

README.md

GammaDesk

GammaDesk is an options-market analytics dashboard for TanukiTrade-style workflows built on a clean-room calculation engine. The MVP currently runs on deterministic mock ORATS-style data, with a server-side ORATS connector stub ready for live or delayed API wiring.

The product goal is to highlight the levels an active trader cares about:

  • GEX profile by strike
  • HVL / gamma flip
  • Call wall / call resistance
  • Put wall / put support
  • Selected-alone vs cumulative expiration views
  • IV rank, IVx, expected move, and skew
  • Symbol screener and presets

This is analytics software only. It is not financial advice and it should not be treated as a standalone trading signal.

Quick start

npm install
npm run dev

The development server runs the Express API and Vite frontend together.

Useful scripts:

npm run dev      # start local dev server
npm run build    # production build
npm run start    # run production server after build
npm run check    # TypeScript check

Environment

Copy .env.example to .env when wiring real ORATS data:

cp .env.example .env

The ORATS key must stay server-side. Do not expose it through Vite VITE_ variables or browser settings.

Project layout

client/
  src/
    components/        Reusable dashboard components and charts
    lib/               Formatting, API client, symbol/theme contexts
    pages/             Dashboard, Gamma Levels, Expiry Matrix, Screener, Settings

server/
  index.ts             Express server entrypoint
  routes.ts            API routes consumed by the frontend and NT8 connector
  marketData.ts        Mock ORATS-style data generation and gamma calculations
  oratsClient.ts       Future ORATS API client integration point

shared/
  schema.ts            Shared TypeScript types and Zod schemas

docs/
  architecture.md      Product architecture and data flow
  orats-field-map.md   ORATS field mapping and calculation plan
  implementation.md    Build roadmap and engineering notes

Current API routes

GET /api/symbols
GET /api/orats/status
GET /api/market/:symbol/summary
GET /api/market/:symbol/gex
GET /api/market/:symbol/expirations
GET /api/screener

These routes currently return mock data from server/marketData.ts. The route shape is intentionally stable so NinjaTrader, future TradingView adapters, and the frontend can keep the same contracts after ORATS is connected.

ORATS integration path

The intended production path is:

  1. Implement server/oratsClient.ts methods for ORATS strikes, summaries, monies implied, expirations, tickers, and IV rank.
  2. Normalize ORATS rows into the shared GammaDesk model.
  3. Feed normalized rows into the existing gamma engine.
  4. Keep mock fallback available for demos and local development.
  5. Add caching and rate-limit protection before using large screeners.

See docs/orats-field-map.md for exact field mapping.

Gamma calculation convention

Default Tanuki-style clean-room convention:

callGex = +gamma * callOpenInterest * 100 * spot ** 2 * 0.01;
putGex  = -gamma * putOpenInterest  * 100 * spot ** 2 * 0.01;
netGex  = callGex + putGex;

The sign convention should remain configurable internally because public vendors differ in dealer-positioning assumptions and TanukiTrade does not publicly disclose its proprietary formula.

  • NinjaTrader 8 indicator package: gammadesk-ninjatrader8
  • ORATS integration field-mapping spec: docs/orats-field-map.md