DEV3 Technologies home

DEV3 Developer Forum

How we built the DEV3 CryptoAI Pro: AI market analysis as typed, cached output

dev3 ·

CryptoAI Pro is a self-hosted market analysis platform for crypto and stocks. It is an analysis tool only: it never places trades and is not financial advice.

Stack: Next.js 15 (App Router), MongoDB as a replica set, NextAuth v5, socket.io, and a native SwiftUI iOS app. Three processes share the database: the web app, a realtime sidecar and a background worker.

Decisions that mattered

  • Binance, CoinGecko, Finnhub and Yahoo sit behind provider adapters with circuit breakers. The worker rolls 1-minute candles into 5-minute, hourly and daily ones and backfills history.
  • The AI returns versioned, structured JSON (sentiment, confidence, drivers, risks, levels) so the chart can draw it. Results are cached longer when an asset is calm, shorter when volatile, identical requests are de-duplicated and watched assets are pre-warmed.
  • The alert engine subscribes to the market bus and evaluates conditions as prices arrive, with cooldowns.
  • Every server action passes session, permission, rate limit, validation and audit in one wrapper.

Limits: the public demo runs on simulated market data, and without an AI key a deterministic mock answers.

Trade-off we chose: cache lifetimes depend on how volatile an asset is, a heuristic we would like feedback on.

How do you cache AI output for fast-moving data? Feedback welcome.

#nextjs#mongodb#ai#case-study

0

0 replies

No replies yet. Know the answer? Write the first one below.

Your reply

Every post is reviewed by DEV3 before it appears. Usually reviewed within 24 hours.

Markdown supported. Use ``` for code blocks. Images are not allowed.