Modular monoliths for custom web application development

In early custom web application development, the technical decision that bites teams most often isn’t the language or the cloud—it’s the split between “monolith” and “microservices.” Many new products reach for microservices too early, then spend the next 12 months paying for internal APIs, deployment plumbing, and coordination overhead instead of shipping business value. A modular monolith is the middle path: fast delivery today, with a credible path to microservices later if the product and org actually demand it.

Hubert Olkiewicz[email protected]
LinkedIn
6 min read

What you’re optimizing in early custom web application development

For a new B2B product, the first release usually optimizes for:

  • Iteration speed (short cycle time from idea → deploy)

  • Correctness in core flows (identity, permissions, billing, ordering, auditability)

  • Learning (what the product really is, and what “version one” forgot)

  • Operational stability without a dedicated platform team

This is why a modular monolith often beats microservices: it minimizes “coordination tax” while still enforcing enough structure to avoid a future rewrite in your web application development stack.

The hidden cost of premature microservices

Microservices shine when you already have:

  • Multiple autonomous teams

  • Clear service ownership boundaries

  • Separate scaling requirements that matter now

  • Mature ops: CI/CD pipelines, tracing, incident response, service discovery, secrets management

If you don’t, you still get the complexity—just without the benefits. Common early-stage costs:

  • Distributed system failure modes (timeouts, retries, partial failures)

  • Data consistency work that used to be a transaction

  • Versioning internal APIs before your domain is stable

  • More surfaces to secure (auth between services, RBAC propagation, audit logging)

  • Harder local development (running N services, stubs, contracts)

For teams building an early product, this is often negative ROI compared to one deployable system with strong internal boundaries.

What a modular monolith is (and what it’s not)

A modular monolith is one deployable application with:

  • Strict internal module boundaries

  • Explicit interfaces between modules (not “just import anything”)

  • Clear ownership of data and responsibility

It is not “a big ball of mud” with a nicer name. The point is intentional modularity: you get the operational simplicity of one system, but the design discipline that makes later extraction possible.

This is also the “modern implementation” pattern many teams converge on: one coherent system, split into independent modules, built to evolve. One example module-based architecture describes “one coherent system divided into independent modules,” with each module owning its own database, and a Java/Spring + PostgreSQL backend plus a TypeScript + Vite frontend, explicitly prepared for future scaling (including microservices).

Clean module boundaries: the enabling constraint

Module boundaries are what prevent you from refactoring forever. Practical rules that hold up under pressure:

  • Every module has a job statement. If you can’t describe it in one sentence, it’s probably two modules.

  • No shared “common” domain models that everyone edits. Shared libraries become a hidden monolith inside your monolith.

  • Dependency direction is explicit. “Core domain” doesn’t import “payments” because a feature sprint demanded it.

  • One team can own a module end-to-end (backend + API + frontend surface), even if it’s the same team today.

If you want AI-assisted development to be useful rather than chaotic, boundaries matter even more: assistants amplify whatever structure you already have.

Communication and data contracts inside a modular monolith

A modular monolith still needs internal contracts—just cheaper ones than distributed APIs.

Data ownership

  • Prefer “module-owned tables/schema” over shared tables.

  • Treat cross-module reads as a deliberate integration decision, not a convenience.

Integration patterns

  • Facade/HTTP-style calls inside the app: good for request/response flows (e.g., “create subscription → provision access”).

  • Event-driven modules: useful when you want decoupling and auditability early (e.g., “payment succeeded” triggers “access granted” without tight coupling).

In practice, teams often start with direct calls for speed, then introduce events when coordination and audit trails matter more. A module-based reference architecture explicitly lists a full audit/event history for transactions and change tracking as first-class needs—exactly the kinds of requirements that become harder when split too early across services.

AI-friendly structure: why assistants work better with predictable modules

AI-assisted coding breaks down in messy codebases for boring reasons:

  • unclear responsibility (“where does this logic live?”)

  • inconsistent patterns

  • cross-cutting changes that touch too many places

  • missing “contracts” that describe allowed dependencies

A modular monolith gives AI tools a map:

  • predictable folder/module layout

  • smaller contexts per change

  • clearer “you can change X without breaking Y” rules

That’s why “AI-friendly codebase” is less about model choice and more about structure: assistants help most when the system is already decomposed into stable units.

Alternatives compared: greenfield build vs boilerplate vs black-box vs modular foundation

When choosing an implementation path for a new product, the real comparison is usually:

  1. Greenfield build

  • Full freedom, highest initial effort

  • Easy to miss basics (RBAC, auditing, tenancy) until late

  1. Boilerplate / starter kit

  • Fast start, but often weak boundaries

  • Can degrade into fragile coupling as soon as business logic grows

  1. Low-code / black-box platform

  • Fast demos, but risks code ownership and extension limits

  • Great when requirements stay inside the platform’s model; painful when they don’t

  1. Modular, code-first foundation

  • A structured starting point where modules already exist for common business domains

  • Still code you can extend directly, without pretending it’s “no-code”

This is the lane where OpenKnit positions itself: a code-first modular foundation that generates a fullstack app (Spring Boot + React/Vite + PostgreSQL with vector support) and emphasizes strict module boundaries, monolith-first speed, and the option to extract later when needed. The product framing matters: it’s closer to “serious starting point” than “starter kit.” A natural place to evaluate that approach is https://open-knit.com/.

Important caveat to keep honest in procurement: if the public GitHub repository you’re reviewing uses submodules pointing to internal repos, that supports “code-first / ownership-oriented” positioning, but it doesn’t automatically prove the full implementation is publicly inspectable end-to-end.

Practical selection criteria and checklists

Use this as a decision filter for custom web application development services that claim “modular” or “microservices-ready.”

Vendor/team checklist (decision-grade)

  • Boundary enforcement: How are module dependencies prevented (build rules, package conventions, lint rules)?

  • Data ownership: Can a module own its schema and migrations without shared tables?

  • Local dev: Is there a one-command environment (e.g., Docker Compose), or will every dev become a platform engineer?

  • Cross-cutting concerns: Where do RBAC, tenancy, audit logs, and error handling live—and how do they avoid becoming a shared dumping ground?

  • Extraction story: What’s the explicit plan to split a module out later (interfaces, events, contract tests)?

  • Operational cost: What’s the minimum platform footprint in year one?

  • Code ownership: Is the system delivered as code you can run and modify, not an opaque runtime?

“When microservices are justified” checklist

Choose microservices earlier only if today you have:

  • independent scaling requirements that are already costly

  • multiple teams that must deploy independently

  • clear, stable domain boundaries

  • mature ops that can handle distributed debugging

If these aren’t true, a modular monolith is usually the more reliable path for enterprise application development without turning every sprint into infrastructure work.

Trade-offs, anti-patterns, and a decision summary

Trade-offs you should accept knowingly

  • A modular monolith is still one deployable unit: you don’t get independent deploys per module on day one.

  • You must invest in boundary discipline. Without it, you’re just building a monolith with extra folders.

  • If you truly need multi-region active-active scaling per domain early, microservices might be the right tool.

Anti-patterns that sabotage modular monoliths

  • “Shared domain” module that everyone edits (becomes the real monolith).

  • Cross-module database reads everywhere (“just one join”) that quietly destroys isolation.

  • God services (user service, payment service) that accumulate unrelated responsibilities.

  • Events without contracts (no schema versioning, no idempotency rules), creating invisible coupling.

  • Module boundaries only in slides (no enforcement in build tooling or code review).

Summary: when modular monoliths beat microservices—and when they don’t

Choose a modular monolith when you need speed, predictability, and a clean path to evolve—especially in early web app development where product learning is the bottleneck. Choose microservices when organizational scale and operational maturity already exist, and independent deployability is a present-tense requirement—not a theoretical future.

If you’re evaluating a modular foundation rather than building everything from scratch, OpenKnit is one concrete example of a code-first approach designed around strict module boundaries and a monolith-first evolution path: https://open-knit.com/ (and optionally, the repo entry point: https://github.com/bitecode-tech/open-knit).

Sources

  1. https://open-knit.com/

  2. https://github.com/bitecode-tech/open-knit

Articles

Dive deeper into the practical steps behind adopting innovation.

Software delivery6 min

From idea to tailor-made software for your business

A step-by-step look at the process of building custom software.

AI5 min

Hosting your own AI model inside the company

Running private AI models on your own infrastructure brings tighter data & cost control.

Send us a message or book a video call

Przemysław Szerszeniewski's photo

Przemysław Szerszeniewski

Client Partner

LinkedIn