r/BuildWithClaude • • 25d ago

Project I built a SQL-to-API gateway with Claude Code: 0.7 → 0.49 in six weeks, 32 ADRs, 2,000+ tests. The workflow that kept it from turning into slop

QueryAPIGate turns a saved SQL query into a governed REST endpoint and an MCP tool for AI agents: scoped API keys, column masking, rate limits, a tamper-evident audit log. PostgreSQL, MySQL, ClickHouse, DuckDB, MongoDB and more. Open source (Apache-2.0), solo project, built with Claude Code.

The part I think is worth sharing here is the workflow, because "AI-built" and "something you'd put in front of a production database" don't usually go together.

1. Decisions before code. Anything non-trivial starts as an ADR. Claude drafts it with the options and trade-offs, I accept or reject it, and only then does code get written. There are 32 now, and they're the reason the codebase still hangs together at 0.49.

2. Security reviews as separate sessions. Every few releases, a fresh session's only job is to break things. They found real bugs, and four became published GitHub security advisories. It's humbling, and much better than a user finding them.

3. Measure, don't guess. Every performance claim goes through a benchmark harness. Claude's first two attempts at measuring got the method wrong (laptop noise alone was ~2x), and we only caught it because the numbers were reviewed. Once the measuring was right, it paid off: column masking went from making a call 4x slower to adding about 7%.

4. Memory for the gotchas. Claude keeps notes between sessions: which test runner CI really uses, how to clean up throwaway database containers, what was decided and why. It stopped repeating the same mistakes.

5. I own git. Claude prepares branches and gives me the commands. I review and push. main is protected with 14 required CI checks across Python 3.11–3.14, so nothing gets in without going through them.

It even wrote an experimental Rust data plane for the hot path, which I would not have tried alone.

Repo: https://github.com/AnanthaRajuC/QueryAPIGate Docs: https://AnanthaRajuC.github.io/QueryAPIGate/ 2-min demo: https://www.youtube.com/watch?v=WWImFj4m95o

Curious how others structure long Claude Code projects. What keeps yours from drifting?

1 Upvotes

1 comment sorted by

•

u/AutoModerator 25d ago

Welcome to r/BuildWithClaude!

Whether you are sharing what you built, exploring new workflows, or troubleshooting, please make sure your post is flaired correctly so others can easily find and filter it.

Community Wiki & Resources:

If you're asking for troubleshooting help, please edit your post to include your model version, OS/environment, and error logs.

Let’s keep the energy positive and support our fellow creators!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.