Answer the question
In order to leave comments, you need to log in
How to design a web application with API and admin panel?
Good afternoon!
Tell me how best to design a project with an admin panel, a web application and an API for a mobile application.
I would like to divide the project into 3 parts, subprojects.
1) The API has a public interface and only the API part has direct access to the database.
2) The admin panel manages the database through the API, there are handles for running scripts, a separate authorization for admins.
3) The client (web & mobile) communicates through the API, its own classic authorization, there are no questions about this.
My main question is how to separate the admin and API. It will be much more convenient to make the admin panel direct access to the database, but then where to keep the models so that they are not duplicated. Are there best practices?
Answer the question
In order to leave comments, you need to log in
The admin panel is just an interface for working with an api (which implements crud operations on models). Therefore, it is not entirely clear what it means to separate the admin panel from the api. In fact, there are only api and fronts that work with different parts of the (necessary) api. Models in any case on the side of the back. Or did I not quite understand the question?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question