A feature can require changes to both an application and its server. Putting their code in one repository lets the team present the linked work together for review. It still needs to decide which behaviour to test and how separately released versions will remain compatible.
The class-booking service used throughout is a hypothetical example.
A monorepo is a repository containing several distinct projects or independently developed parts of a product. To evaluate one, it helps to follow a concrete change through review, checks and release rather than treating the file move as the whole change.
Make the unit of review visible
Suppose customers should be able to reschedule a class booking. The application needs a date selector, and the server needs to accept the request and save the new time. The visible result is simple: choosing another time changes the booking.
With separate repositories, the teams prepare two changes. A reviewer might approve the date selector without noticing that the server cannot yet handle its request. The mismatch becomes apparent only when both parts are put together: the customer presses the button, but the booking stays at the original time.
In a monorepo, the application and server changes can be presented as one change. A reviewer can inspect both the date selection and the saving of the new time, then check that they work together. That makes the linked work visible within the proposed change. The reviewer still has to examine the behaviour; sharing a repository does not perform that review.
When proposing a move, describe the joint task that becomes easier to prepare or inspect. Deployment order is a separate question, covered below.
Test the applications affected by shared code
Now add an administrator's interface where staff create bookings. It and the customer application use shared code to calculate the price of a class. A change to that code can affect both applications even when neither application's own files change.
Testing the calculation is part of the work. It also matters how the applications use it. A calculation can be correct while an application passes it the wrong data, so the affected applications need checking too. In this example, changed file locations alone do not describe all the behaviour that needs checking.
The opposite approach has a cost as well. Checking the whole product after every small change adds waiting time. A new label in the application may wait for results unrelated to it. The team needs to determine the checks a change requires, set them up and maintain that setup as the product develops. This can use path-based CI filters or a build tool that works out which projects a change affects. The setup must also cover changes to shared code used by those projects.
That effort belongs in the move's estimate. A shared repository can contain the linked code, but someone still needs to decide how changes to shared behaviour reach the checks for the applications that use it. As the amount of code grows, checks may take longer too.
For the rescheduling feature, the expected behaviour is concrete: a customer can choose another time and the server saves it. For the price calculation, the check is how each application uses the shared code.
Keep version compatibility explicit
Once the code has moved, the application still sends requests to the server. They remain two programs. Teams can update them on different days if their versions are compatible, just as they can when the code is stored separately.
For a web application, consider a customer who opens the booking page before an update and leaves the browser tab open. The server has been updated, but that page still sends requests according to the old rules. If the server stops accepting those requests, rescheduling from the open page may fail.
During such an update, the server needs to keep handling the old requests while open pages still use them. Compatibility comes from the agreed rules for communication between the application and server. It is a separate concern from whether their source code sits in one repository.
If the proposal changes that communication at the same time as moving the code, describe and estimate both pieces of work. Otherwise, a discussion about repository organisation can hide a change to the product's interaction rules.
A folder is not necessarily a read-access boundary
The booking service may also have a website with class descriptions and contact details. A contractor can read the website code, while the customer application's code must remain private. Joining those projects requires checking the access model first.
In GitHub's standard access model, read permission applies to a repository. A contractor with access to a shared repository can read its other code folders too. Assigning owners to folders (for example, with a CODEOWNERS file) helps organise reviews; it does not turn those folders into separate read-access boundaries. The GitHub documentation on repository roles describes the permissions.
Separate repositories let the company grant access to the website and application independently. The application and server code can stay together while the website remains separate. There may also be little linked work to gain from moving a website whose descriptions rarely change alongside application features.
Evaluate the work, not just the layout
Before proposing a move, walk through a recent change that crossed the application and server. Identify what would be prepared together, what a reviewer would see, which applications need checking and which compatibility rules still apply. Include the access boundary if some contributors cannot read all the code.
Record how much time that kind of work currently takes to prepare and coordinate, then compare similar tasks after the move. Preparing linked changes noticeably faster is useful, provided maintaining the checks does not take more time than the move saves. Neither outcome should be claimed before the comparison.
If the real delay is waiting for a decision about product rules or priorities, repository organisation will not resolve that wait. Keeping the existing repositories can be the better choice when they already support the linked work. A useful proposal explains the improvement the team expects to observe, the maintenance it will take on, and the constraints that remain.
Top comments (0)