MicroAI Paygate
An x402-style payment gateway for AI requests. Sign EIP-712, get a signed receipt, verify the signature client-side.
Advanced stock analysis with candlestick charts and quadrant visualization
FinanceTypeScript · JavaScriptGitHub @mandacxOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗A modern stock analysis platform featuring interactive candlestick charts with put/call level indicators and 5-quadrant visualization for identifying trading opportunities.
This README gives an overview. CLAUDE.md is the maintained architecture guide (data sources, crons, gating), and docs/CHANGES.md records every change with what was and wasn't verified.
public.eod_usmkts_price tablegit clone <your-repo-url>
cd neon_trade
npm install
cp .env.example .env.local
Edit .env.local with your credentials:
# Neon Database
DATABASE_URL=postgresql://user:password@host/database?sslmode=require
# Alpaca API (for market data - OHLC, quotes, trades)
ALPACA_API_KEY=your_alpaca_api_key
ALPACA_SECRET_KEY=your_alpaca_secret_key
ALPACA_BASE_URL=https://data.alpaca.markets
npm run dev
neon_trade/
├── app/ # Next.js app router
│ ├── api/ # API routes (stocks, watchlists, earnings, oi-tracker, prefs, cron, admin, ...)
│ ├── stock/[symbol]/ # Stock detail page
│ ├── quadrant/ # Quadrant analysis page
│ ├── watchlists/ # Watchlists and the chart + list split view
│ ├── scan-alerts/ # Latest and historical scan alerts
│ ├── performance/ # How alerts played out by expiry
│ ├── earnings/ # Earnings tracker (Pro)
│ ├── oi-tracker/ # Options OI tracker (Pro)
│ ├── admin/, profile/, upgrade/, login/, guide/, diagnostics/
│ └── page.tsx # Home page
├── components/ # React components
│ ├── charts/ # Chart component with sanitization
│ ├── alpaca.ts # Alpacacomponents
│ └── ui/ # UI components
├── lib/ # Utilities and services
│ ├── db.ts # Database client
│ ├── tradier.ts # Tradier API client
│ ├── calculations.ts # Level calculations
│ └── utils.ts # Helper functions
├── types/ # TypeScript types
├── scripts/ # One-off DDL (bootstrap-*.mjs), backfills and fixture tests
├── docs/ # CHANGES.md (running change log), earnings.md, oi-tracker.md
├── CLAUDE.md # Working rules and an up-to-date architecture guide
└── PROJECT_MASTER_PLAN.md # Original project plan (predates the current code)
GET /api/stocks/search?q={query} - Search stocksGET /api/stocks/{symbol} - Get stock details with latest levelsGET /api/stocks/{symbol}/ohlc?from={date}&to={date} - Get OHLC data from AlpacaGET /api/stocks/{symbol}/levels?expiry={date}&range=true - Get levels with historical dataGET /api/stocks/{symbol}/expiry-dates - Get available expiry datesGET /api/quadrant/data - Get all stocks for quadrant chartGET /api/test-alpaca - Test Alpaca API connectionSigned-in routes (each checks the feature for the user's plan):
/api/watchlists/* - watchlists, items, quotes, levels, alerts, performance/api/scan-alerts/* - latest, historical and recent alerts/api/earnings/* - earnings list and levels/api/oi-tracker/* - meta, screen, strategies, per-stock OI, tracked positions (private to the user)/api/prefs/[key] - the user's saved UI preferences (table columns)/api/cron/* - protected jobs run by Railway (market catalog + option volume capture, earnings, Telegram alerts)For each stock, we calculate 5 levels based on the formula:
Level Value = (CLOSE - LEVEL_PRICE) / CLOSE
The level with the value closest to 0 is the "closest level" - indicating the price is near that level.
Level Types:
put_LOW - Lowest put support levelput_INT - Intermediate put supportcomb_INT - Combined put/call level (critical zone)call_INT - Intermediate call resistancecall_HIGH - Highest call resistance levelRequired table: public.eod_usmkts_price
Key columns:
symbol - Stock ticker symboltrade_date - Trading dateexpiry_date - Option expiry dateclose - Closing priceput_low, put_int, comb_int, call_int, call_high - Level pricesput_oi, call_oi - Open interest valuesOI_DIFF = put_oi - call_oiOther tables:
public.us_opt_chg_rpt - the daily options OI change report (per contract; no volume column)public.securities - name, sector, industry, market cap, indicesnt_-prefixed because the database is shared with another app: plans, user profiles, watchlists, earnings, the market date catalog, nt_opt_daily_bars (option volume), nt_oi_tracked, nt_user_prefs, ...scripts/bootstrap-*.mjs (run with node --env-file=.env.local scripts/<name>.mjs); docs/oi-tracker.md and docs/earnings.md list the ones each feature needs.eod_usmkts_price is stored as zeros, not null; see CLAUDE.md.See PROJECT_MASTER_PLAN.md for the original schema notes (they predate the current tables) and CLAUDE.md for the current architecture.
All numeric values from the database are sanitized to prevent NaN/NULL errors:
COALESCE(column, 0) in SQL queriesMap<date, {levels, closestLevel}> for date-specific tooltips/v2/stocks/bars endpoint with symbols parameter# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Lint code
npm run lint
This project is optimized for Vercel:
MIT
For detailed documentation, see PROJECT_MASTER_PLAN.md