Answer the question
In order to leave comments, you need to log in
Frontend and backend in different repositories or in one?
Help with the choice. Several developers (5-6) are working on the project. Backend in python, frontend in angular. How to store sources together or separately in different repositories? What are the pros and cons of each method? Share your experience, how do you store the back and front for your development, give a couple of arguments for your choice?
Answer the question
In order to leave comments, you need to log in
How to store sources together or separately in different repositories? What are the pros and cons of each method?It seems to me that the question here is not so much in "pros and cons" as in common sense. It's not entirely clear to me what "python backend, angular frontend" ultimately means. These are two independent projects that can work autonomously from each other and "communicate", for example, through APIs, the development of which occurs in parallel and independently of each other, while any parts of the projects do not intersect with each other (for example, pieces of HTML / CSS / JS/etc code is not copied to the backend part)? If so, then it is extremely logical to separate this into two separate repositories, because. These are essentially two different projects that are very indirectly related to each other. If your projects have a stronger connection with each other or the degree of contamination of the source code is higher than what I described earlier, then this is one project .and split it into many repositories, I personally don’t see any point (otherwise we’ll get to “let’s store the HTML code in one repository, CSS in another, JS in the third, etc.).
It is possible this way and that.
For small projects, it's more convenient to have everything in one place.
For small projects, you can throw everything in 1 folder, but then you can get confused in BackEnd and FrontEnd, so I would advise sorting, I don’t know about you, but my eye is happy when you don’t have to confuse where is BackEnd and where is FrontEnd, if you still work alone then you don’t have to worry, but as a group you will sometimes confuse where everything is and what’s what, if you have a lot of files, it’s better, of course, sort it, if there aren’t enough files, there’s nothing to worry about :)
One project - one repository.
Backend and frontend can be both in the same project (for example, if the frontend is made on twig / jinja), or in different ones (in the case of SPA, for example). Therefore, in the first case, the code goes to one repo, and in the second - to several.
So there is no single general answer, but in each case the choice is very simple.
In your case, it's definitely the second option.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question