Inspiration
The project was inspired by the observation that while AI has made incredible strides in frontend code and UI generation, the backend has not fully benefited from this revolution. The core idea was to move beyond just having AI write code to achieving actual orchestration. Instead of generating static files, DbRevel aims to orchestrate the backend in real-time based on intent.
What It Does
DbRevel addresses the repetitive nature of backend development. It's built to eliminate the need to constantly write the same CRUD controllers, services, and validation logic. It provides a system that understands what the frontend needs and delivers the data instantly, without requiring developers to manually wire up every single controller.
- Real-time Orchestration: Dynamically manages backend operations based on intent.
- Multi-Database Support: Can handle multiple databases at once, including logs, transactions, and caches.
- Automated Cross-Database Queries: The AI is designed to understand and execute cross-database queries on the fly, so you don't have to worry about them.
Instead of this:
// 50+ lines per endpoint
app.get('/api/customers/high-value', async (req, res) => {
const schema = joi.object({...validation...});
if (!req.user.hasPermission(...)) return 403;
const customers = await db.query(`
SELECT c.*, COUNT(o.id) as order_count
FROM customers c LEFT JOIN orders o...
`);
res.json(customers);
});
You write this:
const customers = await client.query(
"Get customers in Lagos with more than 5 orders",
);
Key capabilities:
- Natural language to SQL/MongoDB queries
- Cross-database support (PostgreSQL + MongoDB, more coming)
- Built-in security: query validation, RBAC, audit trails
- Explainable AI: every query comes with reasoning in plain English
- Multi-account SaaS architecture with project isolation
- Official TypeScript SDK published on npm
How We Built It
AI Layer:
- Google Gemini 3 (utilizing a tiered fallback system that automatically selects the best available model, ranging from the high-speed Gemini 2.0 Flash to the advanced reasoning of Gemini 3 Flash Preview.) as the reasoning engine
- Leverages the 2M token context window to load complete database schemas
- Uses code execution sandbox for query validation before touching production data
Backend:
- FastAPI (Python 3.11): Powers the core async engine, ensuring high-performance, non-blocking orchestration of AI intents.
- Redis-Powered Context & Caching: Utilized for high-speed schema caching and session state management. This ensures the 2M token context window isn't reloaded on every request, significantly reducing latency and API costs.
- Sentry Real-time Observability: Integrated at the core to monitor the AI reasoning chain. It captures "AI hallucinations," API timeouts, or malformed query errors in real-time, providing the telemetry needed for professional-grade debugging.
- Automatic Schema Introspection: Native support for both SQL (PostgreSQL) and NoSQL (MongoDB) databases, allowing the AI to understand your entire data ecosystem automatically.
- Multi-account Architecture: Built-in project isolation and multi-tenancy, ensuring that logic and data remain strictly separated between different client organizations.
- Layered Security: Encrypted database connection strings at the API layer and RBAC-enforced query generation to prevent unauthorized data access.
Databases:
- PostgreSQL 16 for relational data
- MongoDB 7 for document storage
- Connection pooling for scalability
SDK:
- TypeScript SDK with full type safety
- Published to npm as @dbrevel/sdk
- Includes SchemaHelper utilities, interceptors, retry logic
- Comprehensive error handling with specific error types
Frontend:
- React dashboard for project management
- Live demo at dbrevel.io
Infrastructure:
- Docker Compose for local development
- Vercel for frontend hosting and rapid deployment
- GCP Cloud Run for backend containers with auto-scaling for production workloads
Challenges We Ran Into
1. Schema Introspection Across Database Types This one kept me up at night. PostgreSQL and MongoDB think about data completely differently. SQL has tables, columns, foreign keys, constraints. MongoDB has collections with flexible, schema-less documents. Getting Gemini to understand both worlds through a unified representation took several iterations.
2. The MongoDB Bug That Almost Broke Me
Three hours into debugging a cryptic "unhashable type: slice" error. Turns out I was treating the fields property as a list when MongoDB returns it as a dictionary. A simple fix in hindsight, but finding it in an async codebase was humbling.
3. Security vs. Flexibility
Here's the tension: you want natural language queries to be flexible and powerful, but you also can't let users accidentally (or intentionally) run DROP TABLE users. Finding the right balance—using the sandbox to validate queries, applying parameterization, blocking dangerous operations—took real iteration. Too strict and it's useless. Too loose and it's dangerous.
4. First Time Publishing to npm I'd never published a TypeScript SDK before. The learning curve was real: package.json configuration, build pipelines, making sure the README bundled correctly, handling ESM vs CommonJS. Stack Overflow became my best friend.
5. Protecting Database Credentials In a multi-tenant SaaS, you're storing connection strings to other people's databases. That's a huge responsibility. Implementing encryption at the API layer for credentials wasn't optional—it was essential. Sleep better knowing that's handled properly now.
6. Gemini 503 Overload Errors During Validation Hit a production-blocking issue during testing: Gemini's validation API would sporadically return 503 "The model is overloaded. Please try again later" errors, causing the entire query pipeline to fail. The problem? While the query generation had retry logic with exponential backoff and tiered model fallback, the validation step didn't. A single transient 503 would bubble up as a hard failure, leaving users with cryptic error messages. The fix required two layers of resilience: (1) wrap the validation API call with retry logic (3 attempts, exponential backoff with jitter), and (2) implement tiered model fallback—if the Pro model is overloaded, automatically fall back to Flash. This mirrors the architecture already in place for query generation. The deeper learning: consistency in error handling across all external API calls isn't optional. If query generation has fallback logic, validation needs it too. Every user-facing operation deserves the same level of resilience.
Accomplishments That We're Proud Of
1. It Actually Works This isn't a demo or a mockup with hardcoded responses. Go to dbrevel.io right now. Run a natural language query. Get real results from real databases. I built something production-quality during a hackathon, and honestly, I'm still a bit surprised it all came together.
2. Published SDK on npm
The TypeScript SDK is live at @dbrevel/sdk. Real developers can npm install it and start building. Type safety, error handling, interceptors, retry logic, schema utilities—it's all there. Seeing it on npmjs.com for the first time was a proud moment.
3. One Interface, Multiple Databases PostgreSQL or MongoDB? Doesn't matter. Same natural language. Same SDK. Same developer experience. Unifying SQL and NoSQL under one roof felt like solving a puzzle that's been bugging me for years.
4. Security That Doesn't Get in the Way RBAC, query validation, audit trails, encrypted credentials—all built in. But here's the thing: security that annoys developers gets disabled. So I made it invisible. It just works, protecting users without them having to think about it.
5. It's Fast I was worried AI processing would make queries slow. Turns out, query generation and execution typically completes in under a second. Fast enough for production apps. That was a relief.
What We Learned
1. Gemini's Context Window Changes Everything Before Gemini, you couldn't load an entire database schema into an AI's context. Now you can. Every table, every relationship, every constraint—the AI actually understands your data model. That's not incremental improvement; that's a paradigm shift.
2. Let the AI Check Its Own Work Using Gemini's code execution sandbox to validate generated queries before they hit the database? Elegant. The AI generates a query, then verifies it won't break anything. Self-policing AI is a pattern I'll use again.
3. Developer Experience > Features I spent more time on error messages, SDK ergonomics, and documentation than I expected. Worth it. A powerful tool that's frustrating to use is a tool nobody uses.
4. SQL and NoSQL Are Different Religions Building abstractions that work for both PostgreSQL and MongoDB without dumbing down either was harder than anticipated. They don't just have different syntax—they have different philosophies about data.
5. Stay Focused on the Problem Every design decision got filtered through one question: "Does this reduce backend boilerplate?" If the answer was no, it didn't make the cut. That discipline prevented feature creep and kept the hackathon manageable.
Who is it for?
DbRevel is for engineers who aren't afraid to experiment with "weird" and innovative new tools that challenge traditional development paradigms.
What's Next for DbRevel
Immediate (Post-Hackathon):
- Python SDK for the data science community
- Go SDK for performance-critical applications
- Advanced security features (JWT, OAuth integration)
- Query result caching for repeated queries
Near-Term:
- Cross-database joins (query across PostgreSQL AND MongoDB in one request)
- WebSocket support for real-time query subscriptions
- Admin dashboard with usage analytics
- MySQL, Redis, and DynamoDB support
Long-Term Vision:
The vision is to create a wrapper that finally brings a true "backendless" reality to deployments. In the same way that Cursor acts as a wrapper for VS Code and Vercel wraps AWS, DbRevel aims to be the definitive wrapper for the backend.
- AI business logic flows (not just queries, but entire workflows)
- Multi-tenant enterprise features
- Marketplace for community-contributed database connectors
Business Model:
- Free tier for individual developers and small projects
- Paid tiers for advanced features (multi-database joins, enterprise RBAC, priority support)
- Fully managed SaaS—no self-hosting option
Built With
- fastapi
- gcp
- gemini
- git
- mongodb
- postgresql
- react
- redis
- sentry
- typescript
- vercel


Log in or sign up for Devpost to join the conversation.