Inspiration

Most finance and “AI-tool” sites drown you in paginated tables and tiny spark-lines. We wanted the opposite: a living galaxy of bubbles where you can see momentum across thousands of stocks, crypto assets, and AI startups—then ask Perplexity why a cluster is glowing. Sonar gives every bubble-click an instant, citation-rich narrative.

What it does

AIMarketCap streams real-time data on thousands of stocks, crypto assets, and AI startups, plots them as interactive bubbles, and routes each click to Perplexity Sonar so the answer engine explains why an asset or cluster is moving and what to watch next.

How we built it

• Self-hosted k3s Kubernetes cluster on low-cost VPS nodes
• Apache Airflow DAGs: crypto every 5 min, equities every 6 h, AI-startup metadata daily
• MongoDB time-series collections for price, volume, and market-cap snapshots; separate collections for metadata and computed deltas
• Node.js micro-service formats feature JSON, calls Sonar Reasoning Pro, and streams citation-rich answers to the client
• React + Tailwind frontend renders a quad-tree-optimised HTML-Canvas bubble universe with zoom and lasso select
• Prometheus tracks scraper latency, pod resources, and Sonar response times

Challenges we ran into

• Synchronising 5-minute crypto candles with 6-hour equity bars without losing statistical accuracy
• API throttles and 429s; solved with pooled back-off and caching in Airflow
• Rolling deltas on 35 k+ assets while keeping MongoDB writes within disk I/O limits
• Maintaining smooth bubble interaction at large node counts; fixed with quad-tree culling and lazy hover fetch
• Early Sonar prompts “hallucinated” metrics; numeric guardrails and few-shot examples tightened answers
• Tuning k3s resource quotas so scrapers, Sonar calls, and the Node.js API never collide

Accomplishments that we’re proud of

• Deployed a multi-asset market-intel stack for < $1/day in infra cost
• Cut click-to-answer latency to under 3 s, including the Sonar call
• Built a custom visualisation library that stays responsive past 30 k bubbles
• Unified crypto, equity, and startup data into one schema, enabling single-shot Sonar questions
• On-boarded alpha users during the hackathon and captured actionable feedback

What we learned

• Users grasp trends far faster with bubbles than with traditional tables
• Sonar Reasoning Pro is best fed clean, numeric JSON instead of prose
• Owning the cluster lets us tune CPU shares for scrapers and trim cloud spend by ~40 %
• Guardrail schemas plus light few-shot prompting slash LLM hallucinations in finance contexts
• Incremental, columnar updates beat full recompute for massive time-series datasets

What’s next for AIMarketCap

• Ship user-defined alerts so Sonar pings users when custom conditions trigger
• Layer in social-sentiment deltas to enrich narratives without new scrapers
• Open-source the bubble-canvas component so other Sonar projects can reuse it
• Launch community features—shared dashboards, public watchlists, leaderboards—to build a social niche for AI and data enthusiasts
• Expand beta to 500 weekly active users and prepare for a seed fundraising round
• Add portfolio watchlists, daily email digests, and a public API tier for developers
• Harden the LLM layer further: combine retrieval-augmented prompts, stricter numeric guardrails, and fine-tuned finance models to drive hallucination rates toward zero

Built With

Share this project:

Updates