Initial commit
This commit is contained in:
75
README.md
Normal file
75
README.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# Magent
|
||||
|
||||
AI-powered request timeline for Jellyseerr + Arr stack.
|
||||
|
||||
## Backend (FastAPI)
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
python -m venv .venv
|
||||
.\.venv\Scripts\Activate.ps1
|
||||
pip install -r requirements.txt
|
||||
uvicorn app.main:app --reload --port 8000
|
||||
```
|
||||
|
||||
Environment variables (sample):
|
||||
|
||||
```bash
|
||||
$env:JELLYSEERR_URL="http://localhost:5055"
|
||||
$env:JELLYSEERR_API_KEY="..."
|
||||
$env:SONARR_URL="http://localhost:8989"
|
||||
$env:SONARR_API_KEY="..."
|
||||
$env:SONARR_QUALITY_PROFILE_ID="1"
|
||||
$env:SONARR_ROOT_FOLDER="/tv"
|
||||
$env:RADARR_URL="http://localhost:7878"
|
||||
$env:RADARR_API_KEY="..."
|
||||
$env:RADARR_QUALITY_PROFILE_ID="1"
|
||||
$env:RADARR_ROOT_FOLDER="/movies"
|
||||
$env:PROWLARR_URL="http://localhost:9696"
|
||||
$env:PROWLARR_API_KEY="..."
|
||||
$env:QBIT_URL="http://localhost:8080"
|
||||
$env:QBIT_USERNAME="..."
|
||||
$env:QBIT_PASSWORD="..."
|
||||
$env:SQLITE_PATH="data/magent.db"
|
||||
$env:JWT_SECRET="change-me"
|
||||
$env:JWT_EXP_MINUTES="720"
|
||||
$env:ADMIN_USERNAME="admin"
|
||||
$env:ADMIN_PASSWORD="adminadmin"
|
||||
```
|
||||
|
||||
## Frontend (Next.js)
|
||||
|
||||
```bash
|
||||
cd frontend
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Open http://localhost:3000
|
||||
|
||||
Admin panel: http://localhost:3000/admin
|
||||
|
||||
Login uses the admin credentials above (or any other user you create in SQLite).
|
||||
|
||||
## Docker (Testing)
|
||||
|
||||
```bash
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
Backend: http://localhost:8000
|
||||
Frontend: http://localhost:3000
|
||||
|
||||
## Public Hosting Notes
|
||||
|
||||
The frontend now proxies `/api/*` to the backend container. Set:
|
||||
|
||||
- `NEXT_PUBLIC_API_BASE=/api` (browser uses same-origin)
|
||||
- `BACKEND_INTERNAL_URL=http://backend:8000` (container-to-container)
|
||||
|
||||
If you prefer the browser to call the backend directly, set `NEXT_PUBLIC_API_BASE` to your public backend URL and ensure CORS is configured.
|
||||
|
||||
## History endpoints
|
||||
|
||||
- `GET /requests/{id}/history?limit=10` recent snapshots
|
||||
- `GET /requests/{id}/actions?limit=10` recent action logs
|
||||
Reference in New Issue
Block a user