Public machine
Landing chapters sell the thesis with motion and scene snap.
An autonomous crypto trading engine. Mechanical precision meets AI execution.
Scroll · enter the docs
01 — Mission
Next.js fullstack product: bullish marketing machine in front, serious trading desk behind the login — charts, signals, radar, and an AI agent.
Landing chapters sell the thesis with motion and scene snap.
Email, Google OAuth, and Solana wallet — one desk identity.
Cockpit with charts, signals, radar, and AI tool calling.
Thesis: Volume fuels tax → treasury → vaults. AI execution compounds edge for $ETAI alignment.
02 — Surfaces
/Full-viewport chapter experience: Home, About, Systems, Features, Tiers, Tokenomics, End. Motion-first. Brand-first. No scroll spam — scene snap.
/login · /signupEmail + password, Google OAuth, and Solana wallet sign-in (Phantom / Solflare / Wallet Standard). One desk, three doors.
/appAuthenticated trading desk: charts, signals, radar, watchlist, history, and AI chat rail with tool-calling power.
| Scene | ID | What it sells |
|---|---|---|
| Home | home |
ENGINE / sphere / TRADE AI lockup — brand as the hero |
| About | about |
Terminal narrative + DEX banner — how the engine boots |
| Systems | features |
Animated systems terminal — live-feel market machinery |
| Features | how-it-works |
Listing radar, signals, vaults, treasury rails |
| Tiers | tiers |
Hold-to-unlock: Basic → Pro → Elite → Whale |
| Tokenomics | tokenomics |
$ETAI sheet — supply, tax, tier holdings |
| End | end |
Close the loop — CTA + social (X) |
03 — Stack
Production-grade TypeScript fullstack. Fast to ship. Hard to fake.
| Layer | Choice | Where |
|---|---|---|
| Framework | Next.js App Router, Turbopack, standalone output | package.json, next.config.ts |
| Auth | next-auth beta + Drizzle adapter, JWT sessions | src/auth.ts, src/auth.config.ts |
| Database | Postgres + Drizzle Kit migrations | src/db/, drizzle/ |
| Wallets | Solana wallet-adapter + ed25519 verify | src/components/auth/, src/lib/auth/ |
| Charts | lightweight-charts v5 | src/components/platform/ChartPlane.tsx |
| AI | OpenRouter chat + tool calling | src/app/api/chat/, src/lib/agent/ |
| Markets | Hyperliquid market REST | src/lib/hyperliquid/ |
| Social intel | twitterapi.io + curated handle list | src/lib/twitter/, src/lib/signals/ |
| Motion / UI | Framer Motion, GSAP, custom cyan/mint CSS | src/app/globals.css |
| Deploy | Docker Compose + nginx + certbot | scripts/deploy.sh |
04 — System
One Next.js process owns the UI and the API. Postgres holds users, chats, preferences, and listing memory. External rails feed markets and social heat. Nginx terminates TLS in production.
src/middleware.ts protects /app and
redirects logged-in users away from login/signup. Config is
edge-safe; full authorize lives in Node.
src/instrumentation.ts prefers IPv4 so Google OIDC
discovery doesn’t die on broken IPv6 hosts.
05 — Access
Three doors. One session. Desk ready.
POST /api/auth/signup, creates user + trial
subscription, then credentials sign-in.
AUTH_GOOGLE_ID /
AUTH_GOOGLE_SECRET are set. Redirect URI:
/api/auth/callback/google. Email linking allowed.
signMessage. Server verifies
ed25519, checks domain against AUTH_URL, upserts
walletAddress.
Full features unlock for 7 days
from LAUNCH_DATE / NEXT_PUBLIC_LAUNCH_DATE.
After that, the product narrative gates on $ETAI holdings or
subscription — soft-allow remains until billing ships
(src/lib/access.ts).
06 — Desk
The cockpit is the money seat. Multi-pane Hyperliquid futures charts, live HUD, signal heat, listing radar, watch alerts, and a chat rail that can move the desk.
Charts · Signals · Radar · Watch · History
1 / 2 / 4 panes — default 4: BTC · ETH · SOL · ADA @ Min15
Mark, 24h change, funding, OI, depth, setup lines, optional liq zones
Desk prefs via /api/user/desk-preferences →
user.chartPreferences JSON
src/components/platform/
07 — Intelligence
The chat agent is not a toy chatbot. It calls real tools against Hyperliquid and X, then can act on the desk — set charts, propose setups, compare panes.
| Tool | Power |
|---|---|
list_or_search_symbols |
Discover Hyperliquid market symbols |
get_klines / get_market_snapshot |
OHLCV + mark/funding/OI style context |
get_orderbook_summary |
Depth pressure at a glance |
compute_indicators |
Technical readouts from candle data |
get_trade_signals / search_x |
Curated + global X intel |
get_funding_history / get_long_short_ratio |
Derivatives positioning |
set_chart / propose_setup / compare_panes |
Direct desk actions from chat |
Route: POST /api/chat — auth required, streams responses,
persists threads/messages, model via OPENROUTER_MODEL.
08 — Routes
| Route | Role |
|---|---|
/api/auth/[...nextauth] |
Auth.js handlers |
/api/auth/signup |
Email registration |
/api/chat |
OpenRouter agent + tools |
/api/chats, /api/chats/[id] |
Thread CRUD |
/api/market/symbols|klines|snapshot(s)|listings |
Hyperliquid market rails |
/api/signals/feed |
Curated X signal feed |
/api/user/desk-preferences |
Desk layout / prefs |
/api/dex-icon/[slug] |
Proxied DEX icons for landing |
09 — Persistence
Drizzle schema in src/db/schema.ts. Migrations under drizzle/.
| Table | Purpose |
|---|---|
user |
Profile, password hash, wallet, chart preferences JSON |
account / session / verificationToken |
Auth.js adapter tables |
chat / message |
Agent threads and turns |
subscription |
Trial / plan / holdings qualification stubs |
listing_seen |
Radar memory — first-seen Hyperliquid symbols |
tweet_cache |
Cached tweets by handle / id |
10 — $ETAI
Alignment is the product. Hold more. Unlock more. Fuel the engine.
Core signals & standard tools
Advanced indicators & vaults
Deep analytics & higher limits
Everything unlocked · priority
Contract address: coming soon on Pons Family
11 — Config
Copy from .env.example. Never commit .env.
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_APP_URL |
Public origin |
AUTH_URL / AUTH_SECRET |
Canonical auth URL + signing secret |
AUTH_GOOGLE_ID / SECRET |
Optional Google OAuth |
DATABASE_URL |
Postgres connection |
OPENROUTER_API_KEY / MODEL |
LLM access (default gpt-4o-mini) |
TWITTERAPI_IO_KEY |
X / Twitter data |
LAUNCH_DATE |
Trial window start |
In Docker, compose forces
DATABASE_URL=postgresql://engine:engine@postgres:5432/enginetrade.
12 — Ship
One script. Nginx. TLS. Containers. Live.
chmod +x ./scripts/deploy.sh ./scripts/deploy.sh tradeengineai.com you@email.com
AUTH_URL + app URL, writes nginx reverse proxy to
127.0.0.1:3000.
docker compose up -d --build — app + Postgres.
Container runs migrations then node server.js.
docker compose up -d postgres npm run db:push npm run dev # or: ./START-WEBSITE.sh
https://tradeengineai.comhttps://tradeengineai.com/api/auth/callback/google#4de8f0 · mint #5ff5c8 · void black ·
live at /docs