Add persistent admin analytics, backup restore workflow, and tabbed admin UI
This commit is contained in:
@@ -55,8 +55,11 @@ The app will be available at `http://localhost:4173`.
|
||||
Persistent admin saves:
|
||||
|
||||
- Admin updates are written to `data/admin-content.json`.
|
||||
- Built-in page hit stats are written to `data/hit-stats.json`.
|
||||
- Detailed visitor analytics are written to `data/visitor-stats.json`.
|
||||
- Backup snapshots are written to `data/backups/`.
|
||||
- `docker-compose.yml` mounts `./data` into the container at `/app/data`.
|
||||
- This keeps your edits after container restarts/rebuilds.
|
||||
- This keeps all admin-managed data after container restarts/rebuilds/updates.
|
||||
|
||||
## Where to edit content
|
||||
|
||||
@@ -80,6 +83,11 @@ Persistent admin saves:
|
||||
- Enter a URL and click **Scan URL metadata** to auto-fill title, summary, domain, category, and icon when available.
|
||||
- Click **Save project** to apply updates instantly.
|
||||
- Saved edits are written to `data/admin-content.json` through the API server.
|
||||
- Built-in stats in `/admin` include page hits plus visitor details (IP, country/state/county/city, returning visitors, and recent visitor log).
|
||||
- Analytics cookies are consent-based. Visitors can accept or decline tracking from the site banner.
|
||||
- Admin now includes maintenance actions: **Export JSON**, **Backup Now**, **Prune Old Data**, and **Clear Analytics**.
|
||||
- Admin also supports restoring from a backup snapshot from `/admin`.
|
||||
- The server creates startup + daily backup snapshots and retains recent backups automatically.
|
||||
- Use the **Theme** dropdown to switch between Sandstone, Ocean, Midnight, Forest, and Sunset.
|
||||
- Use **Remove project** to delete the selected project from your local Admin data.
|
||||
- Use **Reset project** or **Reset all** to restore defaults from `src/data/projects.ts`.
|
||||
|
||||
Reference in New Issue
Block a user