Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] Extract API #140

Closed
csillaggyujto opened this issue May 6, 2023 · 5 comments
Closed

[Refactor] Extract API #140

csillaggyujto opened this issue May 6, 2023 · 5 comments

Comments

@csillaggyujto
Copy link
Contributor

Extract REST API between frontend and back-end.
Extract separate back-end docker container
Create docker-compose file with front-end and back-end.
Enables issues: #127 #88 #100 #68

@TheAxelander
Copy link
Owner

I'm wondering how to split frontend and backend in Blazor Server. Current plan is to have a separate optional container for API.

@csillaggyujto
Copy link
Contributor Author

This is just a reminder to myself what I'm planning to do. (Or others if they are quicker :), you have decent code quality, so it's easy to contribute) Doing it while keeping Blazor Server would be tricky, but not unfeasible. Trick is to create a business logic layer with an interface at first, make the .Core project a full-fledged back-end project serving a REST API, and make an implementation in the front-end project which depends on the REST API. The FE and BE are now two separate containers (stateless), so they can be now scaled independently, and only need to comminucate in-cluster. Since this will make the FE thinner, we could explore client-side Blazor as well, and others can (I'm not an android dev) look at automation, nexcloud FE, and mobile.

@TheAxelander
Copy link
Owner

Alright, I'm interested to see how it will look like. Just to share some more details how I was thinking on the overall architecture:

The idea was to have the Core which handles all of the logics and database storage part. As a shared project any .Net based project could just reference and consume it and then build on top of it the UI part. Currently there is only the Blazor Server part.

I later understood having the need of an API which could be also used by any non-.Net based environment, so my plan was to offer it in a separate project/container

@csillaggyujto
Copy link
Contributor Author

My idea exactly :) The API would be a separate project building on the .Core one, which will host the business logic. So EF packages could be contained to the .Core package and no further. Later, when we have Auth (I'm looking on Keycloak for that one, since you definitely do NOT want to implement OAuth2, and self-hosted guys SSO with Keycloak), we can just wire it up to the API and Blazor (nice experience will be integrating OAuth with Blazor, I'm an Angular girl myself :) ) Obviously separate entry point = separate container, so the app will have 4+1 containers (postgres, BE, FE, Keycloak + init container) of which postgres and keycloak is shared with other self-hosted stuff on the cluster.

@csillaggyujto
Copy link
Contributor Author

Hi @TheAxelander . The API is being worked on. Please see the branch ISS140 in my fork.

This was referenced Jul 9, 2023
@TheAxelander TheAxelander added this to the 1.8 milestone Nov 20, 2023
@TheAxelander TheAxelander moved this to 🛠 Work in progress in OpenBudgeteer Development Nov 20, 2023
TheAxelander added a commit that referenced this issue Nov 23, 2023
@TheAxelander TheAxelander moved this from 🛠 Work in progress to 🔖 Ready for next version in OpenBudgeteer Development Nov 23, 2023
@TheAxelander TheAxelander moved this from 🔖 Ready for next version to ✅ Released in OpenBudgeteer Development Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Released
Development

No branches or pull requests

2 participants