AOSSIE-Org / AOSSIE-Org/PictoPy
Feat:Rewrite run.sh into a unified dev/prod launcher for backend, sync-microservice, and frontend
- Lenguaje dominante
- Python
- Estrellas
- 283
- Forks
- 679
- Merge medio
- 7 d 2 h
- PR fusionados (30 d)
- 3
Descripción
### Describe the feature
### Description
`run.sh` is currently outdated (last edited ~2 years ago) and out of sync with the current architecture, which now consists of three separate services: the main backend, the sync-microservice, and the frontend. Today the script only handles the backend, defaults to production mode, uses hypercorn, and binds to port 8000, none of which matches what the Tauri app expects (backend on 52123, sync-microservice on 52124) or how the services are actually meant to run in dev.
### Goal
Create a single unified script that can start all three services (backend, sync-microservice, frontend) together with one command, while still allowing each service to be run individually via its own existing command (e.g. `fastapi dev --port`) for people who need to run them exclusively.
### Requirements (confirmed with @rohan-pandeyy)
1. **Unified script**: one command starts backend, sync-microservice, and frontend together. Running them individually should remain possible via existing per-service commands.
2. **Server**: standardize on uvicorn everywhere (dev and prod), replacing hypercorn. Hypercorn's worker process runs as a daemon, which blocks `ProcessPoolExecutor` used in the AI tagging route (`daemonic processes are not allowed to have children`). Both the backend and sync-microservice already use uvicorn, so this aligns them.
3. **Mode defaults**: `run.sh` and `run.sh --test` should both default to dev mode. `run.sh --prod` should be the only path that runs production mode.
4. **Ports**: bind backend to 52123 and sync-microservice to 52124, matching current hardcoded values in the Tauri app (`src-tauri/src/main.rs`). Ports should not be made configurable, that's out of scope for this task.
5. **Terminal output**: needs care around how output/logs from three concurrently running services are displayed in one terminal, this was flagged in a prior team meeting as an open question and may affect whether the unified script design is ultimately merged.
### Notes
This is a moderately complex task involving process orchestration across three services and careful handling of terminal output. Flagging that clearly so scope/timeline expectations are set. Happy to be assigned and will open a PR once I have a working version to discuss.
### Add ScreenShots
### Record
- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.