From 0d8414bec1ec44de441d0a6678ce73fcefd48980 Mon Sep 17 00:00:00 2001 From: John Adams Date: Mon, 21 Jul 2025 14:04:33 -0400 Subject: [PATCH 1/4] docs: updated contribution secction --- README.md | 76 +++++++++++++++++++++++++++++++++++++----- backend/docs/index.md | 77 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 137 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 55598e0..3a5a4bc 100644 --- a/README.md +++ b/README.md @@ -250,16 +250,76 @@ See the [open issues](https://github.com/Novanglus96/LenoreFin/issues) for a ful ## Contributing -Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. +Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. Please follow these steps and guidelines to help us maintain a smooth development process. -If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". -Don't forget to give the project a star! Thanks again! +### 1. Fork the Repository -1. Fork the Project -2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) -3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) -4. Push to the Branch (`git push origin feature/AmazingFeature`) -5. Open a Pull Request +- Click the **Fork** button at the top-right of this repository to create your own copy. +- Clone your fork locally. + +### 2. Branch Naming +Create branches following this pattern: + +- **Features**: feature/**branch-name** - *For new features or enhancements*. +- **Fixes**: fix/**branch-name** - *For bug fixes or patches*. + +### 3. Pull Request Targets +Submit pull requests to the appropriate branch based on the stability of your changes: + +| Target Branch | Purpose | +| ------------- | -------------------------------------------- | +| main | Production-ready changes for release. | +| rc | Release candidates for staging releases. | +| alpha | Experimental and unstable changes. | +| beta | More stable than alpha, for broader testing. | + +*PRs to main and rc branches are for finalized changes intended for the next release. +PRs to alpha and beta are for testing and experimental work.* + +### 4. Commit Message Format +We use semantic commit messages to automate changelog and versioning. + +Format: + +```cpp +(optional scope): +``` +| Common types | | +| ------------ | ------------------------------------------------------- | +| feat: | A new feature | +| fix: | A bug fix | +| chore: | Changes to build process or auxiliary tools | +| docs: | Documentation only | +| style: | Formatting, missing semicolons, etc; no code change | +| refactor: | Code change that neither fixes a bug nor adds a feature | +| perf: | Performance improvements | +| test: | Adding or fixing tests | + +**Breaking changes**: Add ! after type or scope + +```makefile +feat!: drop support for Node 10 +fix(api)!: change endpoint response format +``` + +Examples: + +- feat: add user profile page +- fix(auth): handle expired tokens gracefully +- chore: update dependencies +- perf: optimize image loading + +### 5. Pull Request Checklist +Before submitting your PR, please ensure: + +- Your branch is up to date with the target branch. +- Your code passes all tests and linters. +- You have added or updated tests if applicable. +- Relevant documentation has been added or updated. +- Your PR description clearly explains your changes and references related issues. + +### 6. Testing Changes +Please test your changes locally or in a staging environment before opening a PR. Use alpha or beta branches for testing experimental changes.

(back to top)

diff --git a/backend/docs/index.md b/backend/docs/index.md index 5d71434..eca17fd 100644 --- a/backend/docs/index.md +++ b/backend/docs/index.md @@ -214,16 +214,77 @@ See the [open issues](https://github.com/Novanglus96/LenoreFin/issues) for a ful ## Contributing -Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. +Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. Please follow these steps and guidelines to help us maintain a smooth development process. -If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". -Don't forget to give the project a star! Thanks again! +### 1. Fork the Repository + +- Click the **Fork** button at the top-right of this repository to create your own copy. +- Clone your fork locally. + +### 2. Branch Naming +Create branches following this pattern: + +- **Features**: feature/**branch-name** - *For new features or enhancements*. +- **Fixes**: fix/**branch-name** - *For bug fixes or patches*. + +### 3. Pull Request Targets +Submit pull requests to the appropriate branch based on the stability of your changes: + +|Target Branch|Purpose| +|-------------|-------| +|main| Production-ready changes for release.| +|rc| Release candidates for staging releases.| +|alpha| Experimental and unstable changes.| +|beta| More stable than alpha, for broader testing.| + +*PRs to main and rc branches are for finalized changes intended for the next release. +PRs to alpha and beta are for testing and experimental work.* + +### 4. Commit Message Format +We use semantic commit messages to automate changelog and versioning. + +Format: + +```cpp +(optional scope): +``` +|Common types| | +|-----|--------------| +|feat:| A new feature| +|fix: | A bug fix | +|chore:| Changes to build process or auxiliary tools| +|docs:| Documentation only| +|style:| Formatting, missing semicolons, etc; no code change| +|refactor:| Code change that neither fixes a bug nor adds a feature| +|perf:| Performance improvements| +|test:| Adding or fixing tests| + +**Breaking changes**: Add ! after type or scope + +```makefile +feat!: drop support for Node 10 +fix(api)!: change endpoint response format +``` + +Examples: + +- feat: add user profile page +- fix(auth): handle expired tokens gracefully +- chore: update dependencies +- perf: optimize image loading + +### 5. Pull Request Checklist +Before submitting your PR, please ensure: + +- Your branch is up to date with the target branch. +- Your code passes all tests and linters. +- You have added or updated tests if applicable. +- Relevant documentation has been added or updated. +- Your PR description clearly explains your changes and references related issues. + +### 6. Testing Changes +Please test your changes locally or in a staging environment before opening a PR. Use alpha or beta branches for testing experimental changes. -1. Fork the Project -2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) -3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) -4. Push to the Branch (`git push origin feature/AmazingFeature`) -5. Open a Pull Request

(back to top)

From 595e34b3d5c45a79ce5db52af833c56dfeb7f945 Mon Sep 17 00:00:00 2001 From: John Adams Date: Mon, 21 Jul 2025 14:29:00 -0400 Subject: [PATCH 2/4] docs: updates to the roadmap --- README.md | 5 +++-- backend/docs/index.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3a5a4bc..10ab6ad 100644 --- a/README.md +++ b/README.md @@ -236,9 +236,10 @@ See the full documenta ## Roadmap -- [ ] v1.1 Release +- [ ] v1.3 Release - [ ] Credit Card Bill Calculations - - [ ] Interest Tracking On Loans + - [ ] Loading Screen on app load +- [ ] Interest Tracking On Loans - [ ] Financial Wizard See the [open issues](https://github.com/Novanglus96/LenoreFin/issues) for a full list of proposed features (and known issues). diff --git a/backend/docs/index.md b/backend/docs/index.md index eca17fd..17d67d7 100644 --- a/backend/docs/index.md +++ b/backend/docs/index.md @@ -200,9 +200,10 @@ Enjoy using LenoreFin! ## Roadmap -- [ ] v1.1 Release +- [ ] v1.3 Release - [ ] Credit Card Bill Calculations - - [ ] Interest Tracking On Loans + - [ ] Loading Screen on app load +- [ ] Interest Tracking On Loans - [ ] Financial Wizard See the [open issues](https://github.com/Novanglus96/LenoreFin/issues) for a full list of proposed features (and known issues). From 3f9b8535f5b77e1e1518a19b0b29cd2be407f4c4 Mon Sep 17 00:00:00 2001 From: John Adams Date: Mon, 21 Jul 2025 14:33:39 -0400 Subject: [PATCH 3/4] docs: typo in version in road map --- README.md | 4 ++-- backend/docs/index.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 10ab6ad..b08583e 100644 --- a/README.md +++ b/README.md @@ -236,10 +236,10 @@ See the full documenta ## Roadmap -- [ ] v1.3 Release +- [ ] v1.2 Release - [ ] Credit Card Bill Calculations - [ ] Loading Screen on app load -- [ ] Interest Tracking On Loans + - [ ] Interest Tracking On Loans - [ ] Financial Wizard See the [open issues](https://github.com/Novanglus96/LenoreFin/issues) for a full list of proposed features (and known issues). diff --git a/backend/docs/index.md b/backend/docs/index.md index 17d67d7..a7d83ef 100644 --- a/backend/docs/index.md +++ b/backend/docs/index.md @@ -200,10 +200,10 @@ Enjoy using LenoreFin! ## Roadmap -- [ ] v1.3 Release +- [ ] v1.2 Release - [ ] Credit Card Bill Calculations - [ ] Loading Screen on app load -- [ ] Interest Tracking On Loans + - [ ] Interest Tracking On Loans - [ ] Financial Wizard See the [open issues](https://github.com/Novanglus96/LenoreFin/issues) for a full list of proposed features (and known issues). From 03e640a1c0eb14abb8cbf223cea7f631eccd143f Mon Sep 17 00:00:00 2001 From: John Adams Date: Tue, 22 Jul 2025 11:02:55 -0400 Subject: [PATCH 4/4] feat: added a loading screen for frontend when backend is loading --- backend/administration/api/routers/health.py | 5 + backend/administration/api/views/health.py | 42 ++++++ backend/backend/urls.py | 2 + frontend/src/App.vue | 33 ++++- frontend/src/components/LogoLoader.vue | 138 ++++++++++++++++++ frontend/src/composables/optionsComposable.js | 21 ++- frontend/src/composables/useBackendReady.js | 36 +++++ frontend/src/composables/versionComposable.js | 19 ++- 8 files changed, 290 insertions(+), 6 deletions(-) create mode 100644 backend/administration/api/routers/health.py create mode 100644 backend/administration/api/views/health.py create mode 100644 frontend/src/components/LogoLoader.vue create mode 100644 frontend/src/composables/useBackendReady.js diff --git a/backend/administration/api/routers/health.py b/backend/administration/api/routers/health.py new file mode 100644 index 0000000..745ebb5 --- /dev/null +++ b/backend/administration/api/routers/health.py @@ -0,0 +1,5 @@ +from ninja import Router +from administration.api.views.health import health_router + +router = Router() +router.add_router("/", health_router) diff --git a/backend/administration/api/views/health.py b/backend/administration/api/views/health.py new file mode 100644 index 0000000..286ee26 --- /dev/null +++ b/backend/administration/api/views/health.py @@ -0,0 +1,42 @@ +from ninja import Router, Query +from django.db import IntegrityError +from ninja.errors import HttpError +from administration.api.dependencies.log_to_db import logToDB +from django.shortcuts import get_object_or_404 +from typing import List +from django.db.models import ( + Case, + When, + Q, + IntegerField, + Value, + F, + CharField, + Sum, + Subquery, + OuterRef, + FloatField, + Window, + ExpressionWrapper, + DecimalField, + Func, + Count, +) +from django.db.models.functions import Concat, Coalesce, Abs +from typing import List, Optional, Dict, Any + +health_router = Router(tags=["Health"]) + + +@health_router.get("/") +def health_check(request): + """ + The function `health_check` returns ok if backend is ready. + + Args: + request (HttpRequest): The HTTP request object. + + Returns: + status (str): returns ok when backend is up + """ + return {"status": "ok"} diff --git a/backend/backend/urls.py b/backend/backend/urls.py index 32040e1..3285658 100644 --- a/backend/backend/urls.py +++ b/backend/backend/urls.py @@ -60,6 +60,7 @@ from planning.api.routers.planning_graph import planning_graph_router from planning.api.routers.budget import budget_router from planning.api.routers.retirement import retirement_router +from administration.api.routers.health import health_router api = NinjaAPI(auth=GlobalAuth()) api.title = "LenoreFin API" @@ -101,6 +102,7 @@ api.add_router("/planning/graph", planning_graph_router) api.add_router("/planning/budget", budget_router) api.add_router("/planning/retirement", retirement_router) +api.add_router("/administration/health", health_router) urlpatterns = [ path("admin/", admin.site.urls), diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 0ff1507..931e23b 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,5 +1,23 @@