Inspiration
The internet already behaves like a market: creators spike overnight, memes crash in a day, drama cycles move faster than newsrooms, and fans constantly predict what will trend next. TrendDEX turns that behavior into a fantasy entertainment exchange where users can trade virtual shares of creators, memes, and live internet trends.
The goal was to build something that feels funny and simple on the surface, but is backed by serious architecture underneath.
What It Does
TrendDEX is a fantasy market for live culture. Users can:
- Browse active creator, meme, sports, music, tech, film, and entertainment markets
- Buy and sell virtual shares using a simulated portfolio
- View price charts, holdings, recent ledger activity, and leaderboard performance
- Review automatically discovered market candidates in an ops dashboard
- See how market candidates are scored by velocity, volume, safety, and composite score
TrendDEX is not a real-money trading product. There is no cash-out, no financial advice, and no real securities. It is a virtual entertainment market built to demonstrate a scalable full-stack architecture.
How I Built It
I started with a v0-generated mobile-first trading interface, then developed it into a production Next.js app deployed on Vercel using codex.
The backend is powered by Amazon Aurora DSQL. I chose DSQL because TrendDEX needs a globally consistent ledger-style data model: trades, portfolios, users, fee accounting, market candidates, and price ticks all need to stay correct under concurrent writes.
The core trading system uses:
- Immutable trade records
- Integer cents and micro-shares instead of floats
- Idempotency keys for duplicate-safe trade requests
- SQLSTATE
40001retry handling for optimistic concurrency conflicts - A fee vault account to track fees from each trade
- Market supply controls and order-like buy/sell behavior
- App-level integrity checks rather than relying on database foreign keys
For market discovery, TrendDEX has an ops pipeline that pulls no-key public/curated trend sources, scores candidates, queues them for review, and can list approved candidates as new fantasy markets/"stocks".
Challenges
The biggest challenge was making the app feel like a polished consumer trading product while keeping the architecture honest.
A naive demo could simply update one current_price row every time someone trades, but that creates hot-row problems and does not tell a compelling database story. Instead, TrendDEX uses append-heavy records, derived price ticks, sharded volume buckets, and explicit retry handling for distributed SQL conflicts.
Another challenge was balancing automation and control. The market pipeline can discover new candidates automatically, but ops review keeps questionable or low-confidence markets from instantly entering the public exchange.
What I Learned
I learned how to design around Aurora DSQL’s distributed SQL model, especially the importance of idempotency, optimistic concurrency retry, and avoiding unnecessary global write bottlenecks.
I also learned how powerful the Vercel workflow can be when paired with deliberate backend engineering: v0 gave me a fast, polished UI foundation, while Aurora DSQL let me build the kind of ledger and market system that would be painful to model with a simple mock backend.
What's Next
Next I would add richer public trend sources, deeper market moderation, real-time multiplayer market rooms, and more advanced order book mechanics. The long-term vision is a fantasy culture market where fans can compete on taste, timing, and trend prediction.
Built With
- amazon-dsql
- bun
- jose
- lucide
- nextjs
- postgresql
- react
- recharts
- shadcn
- shoo-auth
- tailwind
- typescript
- v0
- vercel
- vercel-cron
- vitest
Log in or sign up for Devpost to join the conversation.