Working - pushed to homeserver and running
This commit is contained in:
@@ -32,18 +32,30 @@ npm install
|
|||||||
|
|
||||||
## Run
|
## Run
|
||||||
|
|
||||||
Two terminals:
|
Single command — starts both servers, cleans up on Ctrl+C:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Terminal 1 — backend on http://localhost:8000
|
./dev.sh
|
||||||
cd backend
|
|
||||||
uv run uvicorn main:app --reload
|
|
||||||
|
|
||||||
# Terminal 2 — frontend on http://localhost:5173 (proxies /api → :8000)
|
|
||||||
cd frontend
|
|
||||||
npm run dev
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
| Server | URL |
|
||||||
|
|----------|---------------------------|
|
||||||
|
| Backend | http://localhost:8000 |
|
||||||
|
| Frontend | http://localhost:5173 |
|
||||||
|
|
||||||
|
Or manually in two terminals:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Terminal 1 — backend
|
||||||
|
cd backend && uv run uvicorn main:app --reload --host 0.0.0.0
|
||||||
|
|
||||||
|
# Terminal 2 — frontend (exposed on LAN for phone testing)
|
||||||
|
cd frontend && npm run dev:host
|
||||||
|
```
|
||||||
|
|
||||||
|
The SQLite database (`backend/calcount.db`) is created and migrated
|
||||||
|
automatically on backend startup (`backend/migrations/`).
|
||||||
|
|
||||||
The SQLite database (`backend/calcount.db`) is created and migrated
|
The SQLite database (`backend/calcount.db`) is created and migrated
|
||||||
automatically on backend startup (`backend/migrations/`).
|
automatically on backend startup (`backend/migrations/`).
|
||||||
|
|
||||||
@@ -61,4 +73,11 @@ cd frontend && npm run build # production build to frontend/dist/
|
|||||||
```
|
```
|
||||||
|
|
||||||
# Agentic dev
|
# Agentic dev
|
||||||
Defined subagents, idea is big strong agent tells the little ones what to do. I maybe have overkilled on the "small" agents, v4 pro is till pretty powerful. Play around with it and see what we can get away with.
|
Defined subagents, idea is big strong agent tells the little ones what to do. I maybe have overkilled on the "small" agents, v4 pro is till pretty powerful. Play around with it and see what we can get away with.
|
||||||
|
|
||||||
|
|
||||||
|
# Future enhancements
|
||||||
|
- fully offline JS version (new project built out of this, i have some notes on this somewhere)
|
||||||
|
- download and use https://world.openfoodfacts.org/data
|
||||||
|
- have this version work offline (pwa or local storage or something)
|
||||||
|
-
|
||||||
Reference in New Issue
Block a user