Recommendation: Use Convex as the primary backend
After analyzing the PRD for Recursor (the live hackathon simulation), Convex is the clear winner for this project. The core requirements revolve around real-time interactions, live updates, and reactive data synchronization - all of which are Convex's primary strengths.
-
Real-time is the core feature (not just a nice-to-have)
- Live feed of agent interactions
- Real-time chat between visitors and agents
- Dynamic leaderboards
- <1s perceived latency requirement
- WebSocket/SSE for live updates
-
Scale requirements
- 300-500 concurrent AI agents
- 1,000+ concurrent viewers
- Hundreds of simultaneous updates
-
High-frequency interaction patterns
- Agent "ticks" (event loop updates)
- Continuous project status updates
- Visitor-agent chat interactions
- Real-time voting and scoring
-
No authentication needed (current phase)
| Requirement | Convex | Supabase | Winner |
|---|---|---|---|
| Real-time updates | Native, automatic | Requires setup | ✅ Convex |
| <1s latency | Optimistic updates built-in | Manual implementation | ✅ Convex |
| Live chat | Reactive queries | Requires WebSocket setup | ✅ Convex |
| Agent state management | Reactive, automatic sync | Manual pub/sub | ✅ Convex |
| High-frequency writes | Designed for this | Can handle but not optimized | ✅ Convex |
| Type safety | TypeScript-first | Partial | ✅ Convex |
| Developer velocity | Instant hot-reload | Slower iteration | ✅ Convex |
// Convex makes agent updates trivial
export const updateAgentState = mutation({
args: {
agentId: v.string(),
phase: v.string(),
status: v.string()
},
handler: async (ctx, args) => {
// Update automatically syncs to all viewers
await ctx.db.patch(args.agentId, {
phase: args.phase,
status: args.status,
lastUpdate: Date.now()
});
}
});
// React component automatically updates
function AgentView({ agentId }) {
// This re-renders automatically when agent updates
const agent = useQuery(api.agents.get, { id: agentId });
return <div>{agent?.status}</div>;
}// Convex: Automatic real-time feed
export const getActivityFeed = query({
handler: async (ctx) => {
// Returns live, reactive data
return await ctx.db.query("activities").order("desc").take(50);
},
});
// Supabase: Would require manual WebSocket setup
// Plus handling reconnections, state sync, etc.// Convex: Built-in optimistic updates
const sendMessage = useMutation(api.chat.send);
// UI updates instantly, server confirms later
await sendMessage({ text: "Hello" });
// Supabase: Must implement optimistic updates manually// Convex: Easy to implement with scheduled functions
export const agentTick = internalMutation({
handler: async (ctx) => {
const agents = await ctx.db.query("agents").collect();
// Process all agents in parallel
await Promise.all(agents.map((agent) => processAgentTick(ctx, agent)));
// Schedule next tick
await ctx.scheduler.runAfter(1000, internal.simulation.agentTick);
},
});Convex handles the exact scale requirements:
- ✅ 300-500 concurrent agents making updates
- ✅ 1,000+ viewers receiving real-time updates
- ✅ Automatic horizontal scaling
- ✅ No infrastructure management needed
Given the aggressive timeline (MVP in 1-2 weeks):
- Convex: Write functions, they work instantly
- Supabase: Set up tables, RLS policies, WebSocket channels, etc.
Supabase is excellent, but not for this project:
- Real-time is secondary in Supabase - It's primarily a PostgreSQL database with real-time added on
- More complex setup - Need to configure:
- Realtime channels
- WebSocket connections
- Manual optimistic updates
- Pub/sub for agent coordination
- Overkill features - You don't need:
- Complex SQL queries
- Row-level security (no auth)
- PostgreSQL extensions
- File storage (artifacts can use CDN)
If you later need Supabase features:
- Keep Convex for real-time simulation
- Add Supabase for:
- Authentication (Phase 2+)
- Long-term analytics storage
- File storage for artifacts
For a hackathon simulation:
-
Convex: Pay for function calls and database operations
- Estimated: Moderate cost for event duration
- Built-in cost controls via tick rate adjustment
-
Supabase: Pay for database size and bandwidth
- Would also need additional real-time infrastructure
- Potentially higher total cost
| Feature | Convex | Supabase |
|---|---|---|
| Real-time feed | 30 min | 2-3 hours |
| Agent chat | 1 hour | 3-4 hours |
| Live voting | 30 min | 2 hours |
| Agent state sync | 1 hour | 4-5 hours |
| Total MVP | 1-2 days | 4-5 days |
┌─────────────────┐
│ Next.js App │
│ (Landing/UI) │
└────────┬────────┘
│
Convex SDK
│
┌────────▼────────┐
│ Convex │
│ (Real-time) │
├─────────────────┤
│ • Agent State │
│ • Live Chat │
│ • Activity Feed │
│ • Voting │
│ • Leaderboards │
└─────────────────┘
│
│ (Optional Phase 2+)
▼
┌─────────────────┐
│ Supabase │
│ (If needed) │
├─────────────────┤
│ • Auth │
│ • File Storage │
│ • Analytics │
└─────────────────┘
| Factor | Weight | Convex | Supabase |
|---|---|---|---|
| Real-time capability | 30% | 10/10 | 6/10 |
| Developer velocity | 25% | 10/10 | 7/10 |
| Performance (<1s latency) | 20% | 10/10 | 6/10 |
| Scale handling | 15% | 9/10 | 8/10 |
| Cost efficiency | 10% | 8/10 | 7/10 |
| Weighted Score | 9.65 | 6.75 |
Use Convex immediately. It's purpose-built for exactly what Recursor needs:
- Real-time collaborative features
- Live reactive updates
- Low-latency interactions
- Rapid development timeline
You can ship the MVP in days, not weeks, and the real-time features will "just work" without complex configuration.
-
Initialize Convex in the project:
npx convex dev
-
Define schema for agents, teams, projects, messages
-
Implement core real-time functions:
- Agent state management
- Live activity feed
- Chat system
- Voting mechanism
-
Build the UI with React + Convex hooks for automatic updates
-
Deploy and iterate rapidly with hot-reload
For Recursor's requirements - especially the critical real-time simulation aspects with <1s latency requirements - Convex is the superior choice. It will enable you to build faster, with better real-time performance, and less complexity.
The project is essentially a massive real-time collaboration app, which is exactly what Convex was designed to handle.