Should we put our app, backend, and firmware in one repo?

November 16, 2026 5 answers
Asked by 6k~mosaicfob_291

We have separate repos for a Flutter app, a FastAPI backend, device firmware, and peripheral firmware. CI and release management are getting unwieldy, so I'm considering a monorepo, but I don't want a huge project tree getting in the way. Is there a practical middle ground?

Answers

4z~lanterncog_738

A monorepo makes sense if changes regularly touch the app, backend, and firmware together. You can update a contract and its consumers in one commit, and keep the related changes visible in one review.

Keep each component in its own top-level folder with its own build configuration and ownership. Set up CI to run the relevant builds when those folders change, while also running cross-component checks when a shared contract changes. That gives you one place to manage the pipelines without rebuilding every piece on every change.

For the editor, you don't have to open the whole tree every time. Open the subfolder you're working on or use a workspace file with just the folders you need.

7c!pocketgizmo_465:

Make sure the path filters account for shared files too. Otherwise a contract change can miss a consumer's tests.

Reply to this answer
5e!socketmural_638

I'd keep the repos separate if the components have independent release cycles. Each repo can own its build and publish a versioned artifact that the others consume. That makes dependencies and ownership explicit instead of relying on everything being at the same commit.

Firmware doesn't need to be a container for this to work. Its build can publish a versioned firmware binary, while the backend publishes an image or another suitable package. You still need to track which firmware and backend versions are compatible.

Reply to this answer
p.386!brasswhisk

You don't have to choose all or nothing. Combine the pieces that change together most often and leave the rest separate. For example, the device and peripheral firmware might benefit from being together if they share code or are usually changed in tandem.

A monorepo also brings coordination costs as it grows, including shared CI and potentially merge queues. Consolidating only the tightly coupled parts can reduce scattered work without making every change part of one big tree.

Reply to this answer
_q93!fablecrank.5

I'd start by fixing the specific pipeline pain before moving anything. A repo migration won't automatically make builds or releases simpler, and a well-organized set of repos can still be usable for coding agents.

Look at which steps are duplicated and which releases need coordination. If those problems keep crossing repo boundaries, that's a stronger reason to consolidate than just wanting everything in one place.

Reply to this answer
n.408+clampkite

Submodules are different from a monorepo. They keep separate repositories and pin each one to a particular revision in the parent. That can be useful when you want those boundaries, but it also adds revision management whenever dependencies change.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions