Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Why ADRs matter: MADR records on a real FastAPI codebase

Most teams agree Architecture Decision Records (ADRs) are useful. Most teams also have zero of them, or five from the week someone got excited, and then nothing. The decisions still got made. They are in the code, in commit messages, in release notes, in someone's head, and each month fewer people remember them. This post shows what that looks like on a real project. I took a well-known…

Architecture Decision Records (ADRs) have gained popularity among software teams, yet many struggle to maintain them effectively. Their usefulness is evident, yet they often end up scattered throughout code, commit messages, and release notes. In this post, we explore the benefits of ADRs through a real-world example of a FastAPI codebase that initially had no ADRs but has since adopted the MADR layout.

The FastAPI codebase, known as fastapi/full-stack-fastapi-template, is a combination of a FastAPI backend, React frontend, PostgreSQL database, and Docker Compose deployment. The project, licensed under MIT, contains approximately 11k lines of Python and TypeScript code. Using the commit f8c6c147b12b as a starting point, the analysis discovered 10 ADR candidates.

From these, five were selected as they had the most significant impact on the system. These decisions include serving the React SPA from the FastAPI application, using PostgreSQL with SQLModel and Alembic migrations, running database migrations as an explicit pre-deploy step, implementing stateless JWT bearer authentication with Argon2 password hashing, and deploying to FastAPI Cloud by default.

Without ADRs, the team would have to re-argue each decision or fail to question established practices. MADR records address this issue by providing a structured format that captures the context, drivers, alternatives, consequences, and confirmation of each decision. For instance, ADR-0001 outlines the decision to serve the React SPA from the FastAPI application, the context behind this choice, and the trade-offs considered.

It also includes a "Revisit when" clause, indicating that the decision should be reevaluated when frontend and backend release cadences differ or when static traffic becomes a significant portion of the backend load.

Consequences, both positive and negative, are explicitly listed in the MADR records. For example, ADR-0001 highlights that the decision simplifies deployment but introduces a potential bottleneck due to static assets being served by Python workers instead of a CDN/Nginx. This transparency helps stakeholders understand the potential impact of decisions and enables proactive decision-making.

Additionally, MADR records include a Confirmation section, providing a method to verify that the decision remains relevant and effective over time. For ADR-0001, this involves a Docker Compose CI test and Playwright e2e tests to ensure the SPA is served by the backend as intended. When a MADR record lacks a valid Confirmation, it may indicate that the decision is no longer valid or needs revisiting.

In summary, ADRs offer a systematic approach to documenting architectural decisions, capturing essential context and trade-offs, and providing a mechanism to verify the continued validity of those decisions. By adopting ADRs in the form of MADRs, teams can foster better communication, reduce decision fatigue, and maintain a clear understanding of the rationale behind their architectural choices.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

More from Dev.to on urgent.news

Report a problem with this story

Get the day's news by email. Daily, weekly or monthly. Sign up

More in Tech

More from Wednesday, 2 December 2026 →