Go to file
isnowglobal-admin 9b21b40da8 release: alpha2.0 — session persistence, Tanuki stability, login flow
Auth & Session:
- Add credentials: include to all frontend fetch calls (queryClient,
  auth-context, tanuki-trades, symbol-selector, settings, verify)
- Redis-backed session store with connect-redis, 7-day cookie expiry,
  sameSite=lax, httpOnly=true
- Add app.set('trust proxy', 1) so Express honors X-Forwarded-Proto from
  nginx — fixes secure cookies never being sent over HTTPS
- Cookie secure flag also checks APP_URL for reverse proxy deployments

Login Flow:
- Fix post-login redirect race condition: use full page reload
  (window.location.href) instead of hash navigation so auth cookie is
  established before ProtectedRoute checks session
- Disable SymbolSelector query when not authenticated to prevent blocking
  fetches on login page
- SymbolSelector returns null when not authenticated — no UI rendered

Tanuki Trades:
- Add ErrorBoundary component to isolate Tanuki page crashes
- Use unique queryKey ['tanuki-tickers'] to prevent React Query cache
  collision with symbol selector
- Defensive query syntax with async/await for error isolation

Testing:
- Verified login → redirect → refresh → session persists (no 401)
- Verified Tanuki page no longer crashes the entire app
- Verified /api/auth/me returns user data across requests with cookie
2026-07-01 14:53:24 -04:00
client release: alpha2.0 — session persistence, Tanuki stability, login flow 2026-07-01 14:53:24 -04:00
docs Docs: meeting notes and implementation plan from team call 2026-05-21 19:33:22 -04:00
script Fix production deployment: SQLite DB, externals, static path 2026-06-13 18:54:11 -04:00
server release: alpha2.0 — session persistence, Tanuki stability, login flow 2026-07-01 14:53:24 -04:00
shared feat: Tanuki gamma levels (ORATS-backed), custom ticker CRUD, futures levels 2026-06-29 22:53:35 -04:00
.dockerignore Security hardening: rate limit whitelist for home subnet, relaxed dev limits, ORATS fixes 2026-06-13 14:21:27 -04:00
.env.example GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00
.gitignore feat: Tanuki gamma levels (ORATS-backed), custom ticker CRUD, futures levels 2026-06-29 22:53:35 -04:00
Dockerfile Security hardening: rate limit whitelist for home subnet, relaxed dev limits, ORATS fixes 2026-06-13 14:21:27 -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
docker-compose.yml Security hardening: rate limit whitelist for home subnet, relaxed dev limits, ORATS fixes 2026-06-13 14:21:27 -04:00
drizzle.config.ts Phase 1: Migrate from SQLite to PostgreSQL 2026-05-21 19:50:37 -04:00
package-lock.json Redis-backed session store + session secret hardened + cookie sameSite=lax + 7d maxAge 2026-06-30 11:40:20 -04:00
package.json Redis-backed session store + session secret hardened + cookie sameSite=lax + 7d maxAge 2026-06-30 11:40:20 -04:00
postcss.config.js GammaDesk initial commit - Options Gamma Analytics platform 2026-05-21 01:41:11 -04:00
start-dev.sh release: alpha2.0 — session persistence, Tanuki stability, login flow 2026-07-01 14:53:24 -04:00
start.sh Security hardening: rate limit whitelist for home subnet, relaxed dev limits, ORATS fixes 2026-06-13 14:21:27 -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