diff --git a/README.md b/README.md index 7fa8687..96dc171 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 🏔️ Vela Platform +# Vela Platform 🏔️ **Self-hosted P&L tracking for C2C server/storage businesses.** @@ -6,7 +6,16 @@ Track revenue, costs, and margins across multiple service offers with granular c --- -## 📸 Quick Overview +## 🚀 First Run + +When you visit for the **first time**, you'll be greeted by a setup wizard that asks you to: + +1. **Choose your admin username and password** +2. A **guest account** (`viewer`) is automatically created with a random password + +No hardcoded credentials — you set them yourself. + +## 📸 Overview | Page | What it does | |------|-------------| @@ -46,54 +55,38 @@ Total cost: 2,000 MAD sell: 4,000 MAD margin: 2,000 MAD ### Install ```bash -# Clone git clone http://192.168.1.160:3000/fedora-heremes/vela-platform.git -cd vela-platform - -# Install deps -cd backend +cd vela-platform/backend pip install -r requirements.txt - -# Run uvicorn main:app --host 0.0.0.0 --port 8788 ``` -The app auto-creates the database and seeds demo data on first run. +On first visit, the setup wizard will guide you through creating your admin account. ### systemd (auto-start) ```ini -# ~/.config/systemd/user/vela-platform.service [Unit] Description=Vela Platform — P&L Tracking App [Service] -ExecStart=%h/vela-platform/backend/venv/bin/uvicorn main:app --host 0.0.0.0 --port 8788 -WorkingDirectory=%h/vela-platform/backend +Type=simple +User=root +WorkingDirectory=/opt/vela-platform/backend +ExecStart=/usr/bin/python3 -m uvicorn main:app --host 0.0.0.0 --port 80 Restart=always [Install] -WantedBy=default.target +WantedBy=multi-user.target ``` -```bash -systemctl --user daemon-reload -systemctl --user enable --now vela-platform.service -``` - -## 👥 Users - -| User | Role | Password | -|------|------|----------| -| `admin` | Owner (full access) | `admin123` | -| `viewer` | Read-only | `viewer123` | - ## 🔌 API All CRUD operations available via REST API. Authenticate with Bearer token. | Method | Endpoint | Description | |--------|----------|-------------| +| POST | `/api/setup` | First-time setup (creates admin + guest accounts) | | POST | `/api/auth/login` | Login | | GET | `/api/services` | List offers + components | | POST | `/api/services/{id}/components` | Add component | @@ -106,15 +99,7 @@ All CRUD operations available via REST API. Authenticate with Bearer token. ## 🤖 MCP Integration -Use with AI agents via MCP (Model Context Protocol). Tools available: -- `get_services()` — Full offers with component breakdowns -- `get_service(id)` — Single offer detail -- `add_component(...)` — Add component to an offer -- `update_component(...)` — Update a component -- `delete_component(id)` — Delete a component -- `add_transaction(...)` — Log a sale -- `get_pnl(month)` — P&L for a month -- `get_dashboard()` — Current overview +Use with AI agents via MCP (Model Context Protocol). ## 🧱 Tech Stack