📖 Update README: setup wizard, no hardcoded creds
This commit is contained in:
55
README.md
55
README.md
@@ -1,4 +1,4 @@
|
|||||||
# 🏔️ Vela Platform
|
# Vela Platform 🏔️
|
||||||
|
|
||||||
**Self-hosted P&L tracking for C2C server/storage businesses.**
|
**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 |
|
| Page | What it does |
|
||||||
|------|-------------|
|
|------|-------------|
|
||||||
@@ -46,54 +55,38 @@ Total cost: 2,000 MAD sell: 4,000 MAD margin: 2,000 MAD
|
|||||||
### Install
|
### Install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone
|
|
||||||
git clone http://192.168.1.160:3000/fedora-heremes/vela-platform.git
|
git clone http://192.168.1.160:3000/fedora-heremes/vela-platform.git
|
||||||
cd vela-platform
|
cd vela-platform/backend
|
||||||
|
|
||||||
# Install deps
|
|
||||||
cd backend
|
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# Run
|
|
||||||
uvicorn main:app --host 0.0.0.0 --port 8788
|
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)
|
### systemd (auto-start)
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
# ~/.config/systemd/user/vela-platform.service
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Vela Platform — P&L Tracking App
|
Description=Vela Platform — P&L Tracking App
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=%h/vela-platform/backend/venv/bin/uvicorn main:app --host 0.0.0.0 --port 8788
|
Type=simple
|
||||||
WorkingDirectory=%h/vela-platform/backend
|
User=root
|
||||||
|
WorkingDirectory=/opt/vela-platform/backend
|
||||||
|
ExecStart=/usr/bin/python3 -m uvicorn main:app --host 0.0.0.0 --port 80
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[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
|
## 🔌 API
|
||||||
|
|
||||||
All CRUD operations available via REST API. Authenticate with Bearer token.
|
All CRUD operations available via REST API. Authenticate with Bearer token.
|
||||||
|
|
||||||
| Method | Endpoint | Description |
|
| Method | Endpoint | Description |
|
||||||
|--------|----------|-------------|
|
|--------|----------|-------------|
|
||||||
|
| POST | `/api/setup` | First-time setup (creates admin + guest accounts) |
|
||||||
| POST | `/api/auth/login` | Login |
|
| POST | `/api/auth/login` | Login |
|
||||||
| GET | `/api/services` | List offers + components |
|
| GET | `/api/services` | List offers + components |
|
||||||
| POST | `/api/services/{id}/components` | Add component |
|
| POST | `/api/services/{id}/components` | Add component |
|
||||||
@@ -106,15 +99,7 @@ All CRUD operations available via REST API. Authenticate with Bearer token.
|
|||||||
|
|
||||||
## 🤖 MCP Integration
|
## 🤖 MCP Integration
|
||||||
|
|
||||||
Use with AI agents via MCP (Model Context Protocol). Tools available:
|
Use with AI agents via MCP (Model Context Protocol).
|
||||||
- `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
|
|
||||||
|
|
||||||
## 🧱 Tech Stack
|
## 🧱 Tech Stack
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user