update docs
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
|||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# OS cruft
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# radapi
|
||||||
|
|
||||||
|
SARLINK FreeRADIUS management stack: a REST API over the
|
||||||
|
FreeRADIUS schema and a web admin portal for it.
|
||||||
|
|
||||||
|
```
|
||||||
|
.
|
||||||
|
├── backend/ FastAPI REST API over the FreeRADIUS MySQL/MariaDB schema
|
||||||
|
└── frontend/ React + Vite admin portal (radui)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Components
|
||||||
|
|
||||||
|
| Dir | What | Stack |
|
||||||
|
|-------------|----------------------------------------|--------------------------------------------|
|
||||||
|
| `backend/` | RESTful CRUD over FreeRADIUS tables | FastAPI, SQLAlchemy 2.0, PyMySQL, Pydantic v2 |
|
||||||
|
| `frontend/` | Admin UI for devices and VLANs | React 19, Vite, TypeScript, Tailwind v4 |
|
||||||
|
|
||||||
|
Auth across both is a shared secret sent in the **`X-API-Key`** header — the
|
||||||
|
frontend collects the key on a login screen and the backend validates it.
|
||||||
|
|
||||||
|
## Quick start
|
||||||
|
|
||||||
|
**Backend** (see [`backend/README.md`](backend/README.md) for details):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd backend
|
||||||
|
python3 -m venv venv
|
||||||
|
venv/bin/pip install -r requirements.txt
|
||||||
|
cp .env.example .env # edit DB credentials + API_KEY
|
||||||
|
venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 8000
|
||||||
|
```
|
||||||
|
|
||||||
|
**Frontend** (see [`frontend/README.md`](frontend/README.md) for details):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd frontend
|
||||||
|
npm install
|
||||||
|
VITE_API_TARGET=http://127.0.0.1:8000 npm run dev # http://localhost:5173
|
||||||
|
```
|
||||||
|
|
||||||
|
Log in with the same value set as `API_KEY` in `backend/.env`. In dev, Vite
|
||||||
|
proxies `/api/*` to the backend so requests stay same-origin.
|
||||||
Reference in New Issue
Block a user