ConstraintEngine is an AI-powered architecture reasoning platform that analyzes software project requirements, extracts architectural constraints, and generates architecture recommendations while demonstrating production-oriented AI backend design patterns such as request validation, cost-aware processing, structured agent outputs, and context management.
Live Link: https://constraintengine.vercel.app
flowchart TD
A([Client])
A --> B("Next.js Frontend")
B --> C("REST API")
C --> D("Express Backend")
D --> E("Validation pipeline")
E --> F("PostgreSQL")
F --> G("FastAPI")
G --> H("Agno Agent")
H --> I("gemini-2.5-flash")
Tech Stack
-
Backend
- Typescript
- Node.js / Express.js
- Zod
-
Database
- Postgresql / Prisma
-
AI Layer
- Fastapi
- Agno
- Gemini 2.5 Flash
- Pydantic
-
Frontend
- Next.js
- tailwind CSS
-
Infrastructure
- JWT (authentication)
- REST API
Product & Engineering Features
- Project creation
- constraint extraction
- architecture recommendation
- architecture version tracking
- guest + authenticated user sessions
- structured AI outputs
- request validation pipeline
- product aware rate limiting
- context management
| Tradeoff | Pros | Cons |
|---|---|---|
| Rejecting before AI Agent invocation | Lower cost, cleaner database | small llm preprocessing latency |
| Save twice before and after AI agent response | Retryable | Additional DB write operation |
| Custom rate limiter | customizable, more control | - |
| Database as source of truth instead of agent framework attributes for context management | More control | Context management overhead on backend |
- Designing AI Backend That Rejects Bad Requests Before They Reach The Agent
- Designing Product-Aware Rate Limits Instead of Generic API Limits
- Designing an AI Request Pipeline from Lowest to Highest Cost
Source: ConstraintEngine/case-studies
This project is licensed under the MIT License.