Files
routeros-traffic/README.md
Mateusz Gruszczyński 5429f176c9 first commit
2026-03-04 15:21:03 +01:00

62 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# mt-traffic (MikroTik Live Traffic)
Nowoczesna aplikacja webowa do monitoringu ruchu na interfejsach MikroTik (RouterOS v7) z dashboardami i wykresami live.
## Szybki start (dev, bez Dockera)
Wymagania:
- Python 3.11+
- Node 18+ / 20+
- npm
1) Backend
```bash
cd backend
cp .env.example .env
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
```
2) Frontend
```bash
cd frontend
cp .env.example .env.local
npm install
npm run dev
```
- Front: http://localhost:3000
- API: http://localhost:8000
## Dev script (uruchamia oba)
```bash
./scripts/dev.sh
```
## Produkcja (Docker Compose)
```bash
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env.local
docker compose up --build -d
```
- Front: http://localhost:3000
- API: http://localhost:8000
## Logowanie
Domyślny admin jest tworzony przy starcie, jeśli nie ma użytkowników:
- email: admin@example.com
- hasło: admin1234
Zmień to od razu w .env (ADMIN_BOOTSTRAP_*).
## MikroTik
Aplikacja wspiera metody połączeń:
- REST (/rest) zaimplementowane
- SSH szkielet (do dopisania)
- API (8728/8729) szkielet (do dopisania)
W panelu dodaj router i poświadczenia (admin), nadaj uprawnienia userom.