Title: Structuring Complex Projects in Convex

This article addresses a real-world problem: as backend systems grow from dozens to hundreds of functions and database tables, they become increasingly difficult for both humans and AI agents to navigate. The author proposes organizing Convex backends using microservice-inspired patterns without the operational overhead—grouping related functionality into modules with clear ownership, explicit boundaries, and consistent structure.
The core recommendation is a two-level hierarchy: domains (business areas like "revenue" or "integrations") containing modules (specific features like "rates" or "reports"). Each module owns its own data schema, public API interface, and implementation logic. This structure makes it easy for agents to understand system boundaries and reduces the risk of unintended side effects.
The article emphasizes separating concerns: keeping pure business logic in isolated `_logic/` directories where it can be tested independently, isolating Node.js-specific code for clarity, and enforcing multi-tenancy rules structurally rather than through careful code review. Security patterns like organization-scoped database indexes make data leaks impossible by design rather than by hoping developers remember to add filters.
For teams deploying AI agents into production systems, this architecture removes friction points. Agents work better when they understand clear system boundaries, when functions have unambiguous purposes, and when security requirements are embedded in structure rather than documentation. The author mentions using Claude Code skills to automatically validate these patterns, enabling agents to refactor massive codebases while maintaining architectural consistency.
What is Agentics Foundation?
Agentics Foundation is a global community of AI practitioners, researchers, and enthusiasts focused on agentic AI systems. We organize events, curate news, and build tools to help professionals understand and adopt AI agent technologies.
Learn more about Agentics FoundationCurated by
Our Agentic Foundation curators select and summarize the most relevant news about AI agents and agentic workflows.
Source Tier Legend
Top‑tier
Top‑tier primary sources and highly trusted outlets.
Established
Established publications with strong editorial standards.
Emerging
Niche, community, or emerging sources.
Unknown
Unknown or low‑signal sources (use with caution).