Commit Graph

12 Commits (main)

Author SHA1 Message Date
iGor milhit ab5c5f4fbc
api: support serving API behind a reverse proxy
Co-Authored-by: iGor milhit <igor@milhit.ch>
2026-01-15 09:54:29 +01:00
iGor milhit 22563c2113
web: improve management of `.env` files
- Ignores `.env.production`.
- Improvees `.env.example` file.

Co-Authored-by: iGor milhit <igor@milhit.ch>
2026-01-14 11:18:49 +01:00
iGor milhit bf3e29fb0e
dependencies: identify dev from prod dependencies
- Strutures the `pyproject.toml` in order to distinguish dev from prod
  dependencies.
- Lock the `uv.lock` file.
- Strutures the `web/package.json` to do the same.

Co-Authored-by: iGor milhit <igor@milhit.ch>
2026-01-14 10:52:05 +01:00
iGor milhit 9fcd4d87e3
web: refactor in order to get an actual interface
- Splits the app in pages, components and services.
- Handles the routing.
- Creates an API service.
- Uses Pico CSS.
- Validates the form. TODO: to add validation state to the form.
- Updates the validation rules in the backend to be coherent on both
  sides.
- Adds tests.

Co-Authored-by: iGor milhit <igor@milhit.ch>
2026-01-13 14:47:08 +01:00
iGor milhit c728ca57ef
web: adapt to the backend refactoring
- Implements the new data model.
- TODO: tests and everything.

Co-Authored-by: iGor milhit <igor@milhit.ch>
2026-01-10 18:52:20 +01:00
iGor milhit cd99b31e0a
bread: refactor calculator into bread
- Rewrites the logic to calculate the ingredient for a bread.
- Adapt the app accordingly.
- Improves the tests.

Co-Authored-by: iGor milhit <igor@milhit.ch>
2026-01-10 18:43:15 +01:00
iGor milhit d171af8d0b
config: improve management of CORS origins
- Replaces the onliner converting the value of the env variable into a
  list by a function. This allows to test this conversion.

Co-Authored-by: iGor milhit <igor@milhit.ch>
2026-01-10 13:26:53 +01:00
iGor milhit 67213da237
config: implement a configuration mechanism
- Implements a configuration mechanism.
- Tests the configuration mechanism.
- Improves the tests structure.
- Configures the tests.
- Configures the ruff checker.
- Fixes lint errors.
- Documents how to test or to lint and very minimally or to set a
  development environment.

Co-Authored-by: iGor milhit <igor@milhit.ch>
2026-01-08 18:28:02 +01:00
iGor milhit 6d98d4f5aa
web: create a minimal frontend interface
- Initializes and creates a React application.
- Creates the form which, when submitted, returns the quantities.
- Writes a minimal test.
- Allows CORS origins in the backend application.

Co-Authored-by: iGor milhit <igor@milhit.ch>
2025-12-30 13:31:09 +01:00
iGor milhit 16d7161d78
app: fix sourdough hydration default
- Fixes sourdough hydration default value.
- Adds a root endpoint.
- Installs ruff to run checks.

Co-Authored-by: iGor milhit <igor@milhit.ch>
2025-12-30 09:00:00 +01:00
iGor milhit 9ed8bfb58f
test: implement the first tests
- Tests if there is a response, with a JSON.
- Tests if the calculations are right.

Co-Authored-by: iGor milhit <igor@milhit.ch>
2025-12-30 08:26:58 +01:00
iGor milhit 43fb200aee
project: initial commit
- Initializes the project with uv.
- Adds the basic dependencies.
- Documents minimally the project in the README file.
- Creates the logic to calculate the ingredient proportions of the
  bread.
- Initializes the FastAPI application with an endpoint to calculate the
  proportions.

Co-Authored-by: iGor milhit <igor@milhit.ch>
2025-12-29 21:21:37 +01:00