mirror of
https://github.com/Such-Software/wowcheckout.git
synced 2026-10-17 05:51:45 +02:00
Add admin panel docs to README, simplify nginx Dockerfile
This commit is contained in:
@@ -24,6 +24,7 @@ Hard rules:
|
||||
- [Quick start](#quick-start)
|
||||
- [Self-hosted deployment](#self-hosted-deployment-docker-compose)
|
||||
- [Self-hosted deployment (no Docker)](#self-hosted-deployment-no-docker)
|
||||
- [Admin panel](#admin-panel)
|
||||
- [Development (API)](#development-api-python)
|
||||
|
||||
## Who it's for
|
||||
@@ -316,6 +317,40 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
## Admin panel
|
||||
|
||||
The admin panel lets you manage merchants (create, view, delete) without touching the database directly.
|
||||
|
||||
### Setup
|
||||
|
||||
Set `ADMIN_API_KEY` in `.env` (generate with `openssl rand -base64 32 | tr -d '=' | head -c 32`).
|
||||
|
||||
### Usage
|
||||
|
||||
Visit `/admin` in your browser and enter the admin API key to log in.
|
||||
|
||||
From the admin panel you can:
|
||||
- View all registered merchants and their invoice counts
|
||||
- Create new merchants by entering their Wownero primary address and secret view key
|
||||
- View a merchant's API key and webhook secret (shown once on creation, also viewable in detail)
|
||||
- Delete a merchant and all associated data (invoices, webhooks, etc.)
|
||||
|
||||
### Admin API
|
||||
|
||||
All endpoints require the `X-Admin-Key` header set to your `ADMIN_API_KEY`.
|
||||
|
||||
```
|
||||
POST /api/admin/auth/verify — verify admin key
|
||||
GET /api/admin/users — list all merchants
|
||||
GET /api/admin/users/{id} — merchant detail
|
||||
POST /api/admin/users — create merchant (body: {"payment_address": "...", "view_key": "..."})
|
||||
DELETE /api/admin/users/{id} — delete merchant and all data
|
||||
```
|
||||
|
||||
### Tenant login
|
||||
|
||||
Merchants log in at the homepage with their primary address + secret view key. They can only see their own store — invoices, webhooks, and profile settings. They have no access to other merchants' data or admin functions.
|
||||
|
||||
## Development (API, Python)
|
||||
|
||||
1. Set environment variables (see `api/.env.example`):
|
||||
|
||||
Reference in New Issue
Block a user