Real-time multi-pair RSI screener with live WebSocket price feeds, multi-exchange support, alert engine, and PWA capabilities.
- Framework: Next.js 15 (App Router)
- Database: PostgreSQL via Prisma
- Cache: Upstash Redis
- Auth: Better Auth
- Payments: Stripe + NowPayments
- Real-time: Binance & Bybit WebSocket streams via SharedWorker
- Push Notifications: Web Push (VAPID)
- Deployment: Vercel
npm installCopy .env.local.example to .env.local and fill in your values:
cp .env.local.example .env.localRequired variables:
DATABASE_URL=
BETTER_AUTH_SECRET=
NEXT_PUBLIC_APP_URL=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
VAPID_PUBLIC_KEY=
VAPID_PRIVATE_KEY=npm run db:syncnpm run devOpen http://localhost:3000.
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run test |
Run tests (single pass) |
npm run test:watch |
Run tests in watch mode |
npm run db:sync |
Sync Prisma schema to database |
npm run db:sync:force |
Force sync (accepts data loss) |
npm run db:push |
Push schema only |
npm run db:generate |
Regenerate Prisma Client |
npm run db:status |
Check migration status |
├── app/ # Next.js App Router pages & API routes
│ ├── (auth)/ # Login, register, verify
│ ├── api/ # API endpoints
│ │ ├── admin/ # Admin management
│ │ ├── alerts/ # Alert history
│ │ ├── config/ # Coin configuration
│ │ ├── screener/ # Main screener data
│ │ ├── stripe/ # Stripe billing
│ │ └── subscription/ # Subscription management
│ ├── account/ # User account page
│ ├── admin/ # Admin dashboard
│ ├── subscription/ # Subscription page
│ └── terminal/ # Trading terminal
│
├── components/ # React components
│ ├── screener-dashboard.tsx # Main dashboard
│ ├── bulk-actions-toolbar.tsx # Bulk alert config
│ ├── alert-history-panel.tsx # Alert history
│ └── ...
│
├── hooks/ # Custom React hooks
│ ├── use-live-prices.ts # WebSocket price engine
│ ├── use-alert-engine.ts # Alert evaluation
│ └── ...
│
├── lib/ # Shared utilities & business logic
│ ├── indicators.ts # RSI, EMA, MACD calculations
│ ├── auth.ts # Better Auth config
│ ├── db.ts # Prisma client
│ └── ...
│
├── prisma/ # Database schema
│ └── schema.prisma
│
├── public/ # Static assets
│ ├── ticker-worker.js # WebSocket SharedWorker
│ ├── derivatives-worker.js
│ └── sw.js # Service Worker (PWA)
│
├── scripts/ # Utility scripts
│ ├── sync-database.js # DB sync helper
│ ├── sync-assets.js # Post-build asset sync
│ └── ...
│
├── doc/ # Project documentation
│ ├── project_overview.md
│ └── up-comming-features.md
│
├── worker/ # Service worker source
│ └── index.ts
│
└── archive/ # Development notes & analysis docs
This project uses Prisma db push (no migration files).
npm run db:sync
npm run devnpm run db:syncSee README_DATABASE.md for full database documentation.
Price updates flow through a SharedWorker (public/ticker-worker.js) that:
- Connects to Binance/Bybit WebSocket streams
- Calculates live RSI, EMA, MACD, Bollinger Bands
- Evaluates alert conditions
- Broadcasts batched updates to all open tabs (max 100ms flush interval)
The UI subscribes via hooks/use-live-prices.ts using a custom EventTarget-based engine that enables per-symbol subscriptions with zero parent re-renders.
The app is a full PWA with:
- Offline support via Service Worker
- Web Push notifications (background alerts)
- IndexedDB price persistence for instant cold-start
- Periodic background sync
vercel deployEnvironment variables must be set in the Vercel dashboard.
npm run build
npm run startRequires Node.js 18+ and a PostgreSQL database.
node scripts/generate-vapid.jsAdd the output to your .env.local.
ISC