diff --git a/README.md b/README.md index 55598e06..b08583ef 100644 --- a/README.md +++ b/README.md @@ -236,9 +236,10 @@ See the full documenta ## Roadmap -- [ ] v1.1 Release +- [ ] v1.2 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). @@ -250,16 +251,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/administration/api/routers/health.py b/backend/administration/api/routers/health.py new file mode 100644 index 00000000..745ebb5d --- /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 00000000..286ee260 --- /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 32040e16..3285658b 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/backend/docs/index.md b/backend/docs/index.md index 5d71434f..a7d83efc 100644 --- a/backend/docs/index.md +++ b/backend/docs/index.md @@ -200,9 +200,10 @@ Enjoy using LenoreFin! ## Roadmap -- [ ] v1.1 Release +- [ ] v1.2 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). @@ -214,16 +215,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)

diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 0ff1507b..931e23b0 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,5 +1,23 @@