main
Last updated: 2025-11-04 01:17:18.406477 File source: link on GitLab
NuNet Appliance Repository
This repository bundles everything needed to run the NuNet appliance:
backend FastAPI application and helper modules (
backend/)frontend SPA (
frontend/)deployment scripts (
deploy/)supporting documentation
If you are familiar with the legacy menu / Flask stack, note that almost all of that code has been removed. What remains is the minimum required for the new FastAPI backend and the React dashboard.
Quick Links
Backend helper modules
Inventory of Python helper modules and how each ties into the API.
FastAPI application
Detailed guide for the REST API (routers, authentication, dependencies).
Frontend
frontend/
React/Vite SPA that consumes the API; see comments in source files and the dashboard components.
Deployment tooling
Main CLI entrypoint for local development and deployments (see below).
deploy/scripts/devctl.sh Overview
deploy/scripts/devctl.sh Overviewdevctl is the primary helper script used during development, packaging, and testing. It wraps common tasks for both the backend and frontend. Available subcommands include (run ./deploy/scripts/devctl.sh help for the latest list):
dev up
Start the FastAPI backend (with uvicorn) and the frontend dev server. Uses a Python venv under deploy/.dev-venv and a Node.js install under frontend.
dev test
Run backend unit tests (pytest) and any other configured checks.
dev lint
Example placeholder for linting (add your linters or formatters here).
build backend
Build backend distributables (e.g., wheel or PEX) – adjust to your packaging needs.
build frontend
Run npm install and npm run build to produce the production bundle under frontend/dist.
clean
Remove temporary build artifacts, virtual environments, cached dependencies, etc.
Internally, the script performs a few key tasks:
Ensures the Python virtual environment exists and installs
backend/nunet_api/requirements.txtEnsures frontend dependencies are installed (
npm install)Starts/stops the appropriate processes depending on the subcommand
Provides a single entrypoint for CI/CD automation and local workflows
Tip: Run
./deploy/scripts/devctl.sh helpto see the most up-to-date list of commands, as the script evolves over time.
Repo Layout
.
├── backend/
│   ├── modules/           # Shared helper modules (documented in modules/README.md)
│   └── nunet_api/         # FastAPI application (documented in nunet_api/README.md)
├── deploy/
│   └── scripts/
│       └── devctl.sh      # Development CLI helper
├── frontend/              # React/Vite SPA
└── README.md              # This documentGetting Started
Clone the repo and make sure you have Python 3.10+ and Node.js ≥ 18 installed.
Bootstrap the dev environment by running
./deploy/scripts/devctl.sh dev up(this creates virtual envs, installs dependencies, and starts both backend and frontend).Open the API – once running, the backend exposes
http://127.0.0.1:8080(default) and the frontend runs onhttp://127.0.0.1:5173(or whichever Vite port is configured).Explore the documentation linked above to understand module responsibilities and API endpoints.
Contributing
Keep
backend/modulesin sync with the API – only helpers needed by the routers should live there.Update the backend and frontend READMEs whenever you add or remove functionality.
Prefer introducing new functionality via the FastAPI routers rather than reviving legacy menu scripts.
Run
./deploy/scripts/devctl.sh dev testbefore opening a merge request.
Happy hacking! 🚀
Last updated

