food planner - #2
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new “Food Planner” single-page app (static frontend + Python/SQLite JSON API) and wires it into the existing VM deployment workflow behind Caddy, while also moving/adding an archived Valentine Vite/React app and updating ignore/deploy configuration.
Changes:
- Introduce Food Planner backend (
food-planner/app.py), frontend assets (food-planner/public/*), and a smoke test. - Add VM deployment artifacts (systemd unit, Caddy snippet insertion, install/prereq scripts) and update GitHub Actions to validate/deploy Food Planner.
- Add/archive the Valentine Vite/React project under
archive/valentineand update.gitignorepaths accordingly.
Reviewed changes
Copilot reviewed 12 out of 24 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| food-planner/app.py | New Python stdlib HTTP server + SQLite schema + JSON API for meal planning. |
| food-planner/public/app.js | New SPA client (views, modals, API calls, shopping flow). |
| food-planner/public/styles.css | New UI styling for planner/library/shopping/archive/flow. |
| food-planner/public/index.html | SPA entrypoint HTML. |
| food-planner/smoke_test.py | New smoke/integration test for DB + API helpers. |
| food-planner/README.md | Local run + VM hosting + backup/restore + verification docs. |
| food-planner/deploy/install.sh | New install script for VM deployment (rsync, systemd, Caddy route insertion). |
| food-planner/deploy/food-planner.service | New systemd unit for running the backend on localhost:8010. |
| food-planner/deploy/check-vm-prereqs.sh | New script to validate VM prerequisites for deployment. |
| food-planner/deploy/caddy-food-planner.caddy | Caddy snippet to route /food-planner/* to the backend. |
| .github/workflows/deploy.yml | Switch deployment pipeline to validate/deploy Food Planner (remove Valentine build/deploy). |
| .github/workflows/check-vm-prereqs.yml | New workflow to run prereq checks against the VM over SSH. |
| .gitignore | Update ignores for archived Valentine build artifacts and Food Planner local DB/cache files. |
| archive/valentine/vite.config.js | Add Vite config for archived Valentine app. |
| archive/valentine/package.json | Add archived Valentine app dependencies/scripts. |
| archive/valentine/package-lock.json | Lockfile for archived Valentine app. |
| archive/valentine/eslint.config.js | ESLint flat config for archived Valentine app. |
| archive/valentine/index.html | HTML entry for archived Valentine app. |
| archive/valentine/src/main.jsx | React bootstrap for archived Valentine app. |
| archive/valentine/src/App.jsx | Main Valentine app component + quiz/animations. |
| archive/valentine/src/App.css | Styling for the Valentine app. |
| archive/valentine/src/index.css | Base styling for the Valentine app. |
| archive/valentine/README.md | Template README for archived Valentine app. |
| archive/valentine/.gitignore | Ignore rules for archived Valentine app. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+444
to
+445
| <button class="icon-button" data-action="edit-shopping" data-id="${item.id}" title="Edit">Edit</button> | ||
| <button class="icon-button" data-action="delete-shopping" data-id="${item.id}" title="Remove">×</button> |
| <p class="eyebrow">Shopping item</p> | ||
| <h2 id="modal-title">Edit item</h2> | ||
| </div> | ||
| <button class="icon-button" data-modal-close>×</button> |
Comment on lines
+2
to
+5
| # This snippet is inserted inside the rahulreddy.in site block by install.sh. | ||
| redir /food-planner /food-planner/ | ||
|
|
||
| handle_path /food-planner/* { |
|
|
||
|
|
||
| def ensure_schema() -> None: | ||
| DATA_DIR.mkdir(parents=True, exist_ok=True) |
Comment on lines
+641
to
+648
| .icon-button { | ||
| display: inline-grid; | ||
| width: 34px; | ||
| height: 34px; | ||
| place-items: center; | ||
| border: 1px solid rgba(72, 102, 69, 0.15); | ||
| background: #fffaf0; | ||
| } |
| <p class="eyebrow">${isEdit ? "Edit meal" : "Add meal"}</p> | ||
| <h2 id="modal-title">${isEdit ? "Update library meal" : "Add a validated meal"}</h2> | ||
| </div> | ||
| <button class="icon-button" data-modal-close>×</button> |
| <p class="eyebrow">${DAYS[dayIndex]} ${slot}</p> | ||
| <h2 id="modal-title">Plan meal</h2> | ||
| </div> | ||
| <button class="icon-button" data-modal-close>×</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.