D
D
Dmitry Kuznetsov2021-01-15 13:45:26
Backend
Dmitry Kuznetsov, 2021-01-15 13:45:26

Splitting a site into several parts oAuth + API + Frontend, is it difficult and worth it?

I came up with an idea for a project (website) and I think it’s worth dividing the site in this way and won’t I increase my hemorrhoids?

The bottom line is this:
1. There is a main site. It is located on the site.ru domain. This is pure frontend.
2. There is an API. It is located at api.site.ru. This is the actual API.
3. You need to add an oAuth server for authorizations to third-party sites. Both members of the main group and supporter. Planned domain: oauth.site.ru.
One database is planned. Or should I do several? And if there are several, how will it be correct to synchronize between all the bases?

If everything is clear and expedient with the first two points, then I doubt it at the expense of 3 points (there is little experience). Or don't bother and add an oauth server (Laravel + Laravel Passport) to the api.site.ru domain? How do you think?

Stack: Laravel, Laravel Passport, Nuxt.

PS: The project is planned to be big

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
index0h, 2021-01-15
@index0h

If your oauth will be a separate service, and the api will use it separately, it makes sense to separate the database. But in general it is difficult to answer. A lot depends on how your services interact.
Read Building Microservices by Sam Newman, especially about connectivity and meshing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question