Skip to content

Comments

BREAKING CHANGE: Overhaul repo to align with pbtar's db and api service#56

Merged
jdhoffa merged 35 commits intomainfrom
overhaul
May 28, 2025
Merged

BREAKING CHANGE: Overhaul repo to align with pbtar's db and api service#56
jdhoffa merged 35 commits intomainfrom
overhaul

Conversation

@jdhoffa
Copy link
Collaborator

@jdhoffa jdhoffa commented May 27, 2025

This PR begins a large overhauling process to merge in many changes to this repository. Needless to say these are breaking changes.

Primarily, this is being done to back-merge in changes that were gained in the pbtar repository, in both the database and api services.

These are still generic demonstrations of how we can integrate a DB and API while implementing best practices.

@github-actions
Copy link

github-actions bot commented May 27, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/web_api_poc/models
   pydantic_models.py59590%1–101
src/web_api_poc/routers
   endpoints.py452544%15, 20–21, 30–33, 40–43, 50–53, 60–63, 72–86
src/web_api_poc/services
   auth.py12375%16–18
   db.py14471%18–22
TOTAL2089156% 

Tests Skipped Failures Errors Time
6 0 💤 0 ❌ 0 🔥 3.017s ⏱️

@jdhoffa jdhoffa marked this pull request as ready for review May 27, 2025 14:35
@jdhoffa jdhoffa requested a review from samhuestis May 27, 2025 14:36
@jdhoffa
Copy link
Collaborator Author

jdhoffa commented May 27, 2025

Sorry @samhuestis there is absolutely no need for you to actually review all of the changes here (they are drastic, and there are a lot). I am mainly just tagging you so you are aware of the breaking changes I am proposing here.

Essentially, I am bringing web-api-poc up-to-date with all of the architectural changes that we ended up implementing in pbtar.

Crucially, this involves splitting the application into 2 "services" ("database" and "API"), and using docker-compose to orchestrate those services.

To do that, I swapped out the static mtcars file that was being used for demonstrative purposes with the testing dvdrentals PostGres DB, as this better demonstrates how we might integrate an API service with a DB.

@jdhoffa
Copy link
Collaborator Author

jdhoffa commented May 27, 2025

I will probably force-merge this in the next few days, but please let me know if you have any major questions here.
The goal is to make sure that web-api-poc is still potentially practically useful for future projects 😊

@jdhoffa jdhoffa changed the title BREAKING CHANGE: Overhaul this repository BREAKING CHANGE: Overhaul repo to align with pbtar's db and api service May 28, 2025
@jdhoffa jdhoffa requested a review from cjyetman May 28, 2025 10:01
@jdhoffa jdhoffa merged commit f887c6e into main May 28, 2025
5 checks passed
@jdhoffa jdhoffa deleted the overhaul branch May 28, 2025 10:13
jdhoffa added a commit to RMI/pbtar that referenced this pull request May 28, 2025
Given the latest approved version of the PRD for this project, it was
determined that the database and API services that we had originally
envisioned won't be necessary until a later version of the application.

To keep things stream-lined, @AlexAxthelm @cjyetman and myself have
decided to focus solely on the React front-end in this repository.

Shortly, we will enable continuous deployment of this React application
directly to production, based on the GitFlow branching strategy. This
also benefits from us reducing technical debt and overhead that is not
immediately useful or required for the deployment or serving of the
application.

With that said, given that we do anticipate a future need for a database
and API, we have kept the scaffolding of this available in the
[web-api-poc](https://github.com/RMI/web-api-poc) repository.

Specifially, an identical version of the `api` and `db` services, all
relevant actions, tests, integration tests, `docker` and `.env` set-up
and other related goodies have been preserved in that repository.

Relates to RMI/web-api-poc#56

---------

Co-authored-by: CJ Yetman <cj@cjyetman.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants