Engine Trade AI

The fullstack engine behind the desk.

Cinematic landing. Authenticated Solana-ready cockpit. Live MEXC market rails. OpenRouter agent with real tools. Tax-fueled treasury narrative locked to $ETAI — documented end to end.

01 — Mission

Overview

Engine Trade AI is a Next.js fullstack product: a bullish marketing machine on the front, and a serious trading desk behind the login.

The public site sells the vision — autonomous market power, tax-powered treasury, strategy vaults, and $ETAI alignment. The private cockpit delivers the execution layer: multi-pane charts, X signal desk, listing radar, and an AI agent that can pull market data, compute indicators, and propose setups.

Network Solana
Ticker $ETAI
Supply 1B
Tax 0.5%

Bullish thesis: Market activity feeds the protocol. Protocol fuel feeds the engine. The engine compounds edge — treasury, vaults, and holder alignment in one loop.

02 — Surfaces

Product surfaces

Landing — /

Full-viewport chapter experience: Home, About, Systems, Features, Tiers, Tokenomics, End. Motion-first. Brand-first. No scroll spam — scene snap.

Auth — /login · /signup

Email + password, Google OAuth, and Solana wallet sign-in (Phantom / Solflare / Wallet Standard). One desk, three doors.

Cockpit — /app

Authenticated trading desk: charts, signals, radar, watchlist, history, and AI chat rail with tool-calling power.

Landing chapters

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, LP burned, Pump.fun launch
End end Close the loop — CTA + social (X)

03 — Stack

Tech stack

Production-grade TypeScript fullstack. Fast to ship. Hard to fake.

Next.js 15 React 19 Auth.js v5 PostgreSQL 16 Drizzle ORM Solana OpenRouter MEXC USDT-M twitterapi.io Docker + nginx
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 MEXC contract REST src/lib/mexc/
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

Architecture

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.

Edge middleware

src/middleware.ts protects /app and redirects logged-in users away from login/signup. Config is edge-safe; full authorize lives in Node.

IPv4-first DNS

src/instrumentation.ts prefers IPv4 so Google OIDC discovery doesn’t die on broken IPv6 hosts.

05 — Access

Authentication

Three doors. One session. Desk ready.

01
Email / password Signup hashes with bcrypt (12) via POST /api/auth/signup, creates user + trial subscription, then credentials sign-in.
02
Google OAuth Enabled when AUTH_GOOGLE_ID / AUTH_GOOGLE_SECRET are set. Redirect URI: /api/auth/callback/google. Email linking allowed.
03
Solana wallet SIWS-style message + signMessage. Server verifies ed25519, checks domain against AUTH_URL, upserts walletAddress.

Launch trial

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

Cockpit

The cockpit is the money seat. Multi-pane MEXC USDT-M futures charts, live HUD, signal heat, listing radar, watch alerts, and a chat rail that can move the desk.

Stage tabs

Charts · Signals · Radar · Watch · History

Layouts

1 / 2 / 4 panes — default 4: BTC · ETH · SOL · ADA @ Min15

HUD

Mark, 24h change, funding, OI, depth, setup lines, optional liq zones

Persistence

Desk prefs via /api/user/desk-preferencesuser.chartPreferences JSON

Key UI modules

  • Cockpit / ChartPlane / DeskRail / ChatRailsrc/components/platform/
  • AlertEngine — polls watchlist / alerts client-side
  • TrialBanner + UserDock — launch status and session
  • Signals / Radar / Watch / History panels — moduleized desk views

07 — Intelligence

AI agent & tools

The chat agent is not a toy chatbot. It calls real tools against MEXC and X, then can act on the desk — set charts, propose setups, compare panes.

Tool Power
list_or_search_symbols Discover MEXC contract 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

API map

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 MEXC 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

Database

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 MEXC symbols
tweet_cache Cached tweets by handle / id

10 — $ETAI

Token & tiers

Alignment is the product. Hold more. Unlock more. Fuel the engine.

Name Engine Trade AI
Launch Pump.fun
LP Burned
Locked 23%

Basic

Hold 0.1%

Core signals & standard tools

Pro

Hold 0.25%

Advanced indicators & vaults

Elite

Hold 0.5%

Deep analytics & higher limits

Whale

Hold 1%

Everything unlocked · priority

Contract address is currently TBA in TokenomicsSection.tsx — swap in the live Pump.fun mint when ready.

11 — Config

Environment

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

Deploy

One script. Nginx. TLS. Containers. Live.

chmod +x ./scripts/deploy.sh
./scripts/deploy.sh enginetradeai.com you@email.com
01
Prereqs DNS A record → server IP. Ports 80/443 open.
02
Script Installs Docker / nginx / certbot if needed, syncs AUTH_URL + app URL, writes nginx reverse proxy to 127.0.0.1:3000.
03
Compose up docker compose up -d --build — app + Postgres. Container runs migrations then node server.js.
04
Certbot HTTPS + redirect. Fill remaining .env keys, rebuild if needed.

Local fast path

docker compose up -d postgres
npm run db:push
npm run dev
# or: ./START-WEBSITE.sh

Google OAuth on production

  • Origin: https://enginetradeai.com
  • Redirect: https://enginetradeai.com/api/auth/callback/google

13 — Edge

Roadmap edge

Shipped hard. Still hunting more alpha.

Live now

Landing chapters · Auth trio · Cockpit desk · Agent tools · MEXC rails · X signals · Listing radar · Docker/nginx deploy · 0.5% tax tokenomics sheet

Next pressure

Hard holdings gate · Live trading rails · WebSocket streams · Deeper liq heatmap · Push / email alerts · Live CA on Pump.fun

Bottom line: The stack is ready to scale the narrative into a desk people live in. Fuel the treasury. Hold the tier. Let the engine trade.

ENGINE TRADE AI — fullstack documentation · brand cyan #4de8f0 · mint #5ff5c8 · void black · live at /docs
Scroll · next chapter