Replaces the removed mock-data snapshots with minimal recovery seeds
that provision exactly one super user:
- casdoor.dump: full casdoor schema + built-in console admin (admin/123),
org 'inventory', app 'inventory-app', the JWT signing cert, and the
single org user ali.mohaghegh (علی محقق, plain password) — tokens,
sessions and records cleared.
- procurement.dump: full procurement schema + the single users row
(علی محقق, role=admin) linked by casdoor_id — all other tables empty;
init_db re-seeds categories/units at startup.
Login: ali.mohaghegh (Casdoor rejects spaces in usernames, so the
spaceful 'ali mohaghegh' is not a valid login name).
Restore on a fresh volume with:
docker compose stop api casdoor
docker cp 'backups/علی محقق/casdoor.dump' procurement-postgres:/tmp/
docker cp 'backups/علی محقق/procurement.dump' procurement-postgres:/tmp/
docker exec procurement-postgres pg_restore -U postgres -d casdoor --clean --if-exists /tmp/casdoor.dump
docker exec procurement-postgres pg_restore -U postgres -d procurement --clean --if-exists /tmp/procurement.dump
docker compose start casdoor api
Both dumps were round-trip validated (pg_restore into scratch DBs:
casdoor = 2 users / 2 orgs / 2 apps / 1 cert; procurement = 1 admin user,
all other tables empty).
The committed casdoor.dump/procurement.dump snapshots carried the demo
dataset (razaei/mousavi/mohaghegh/tester + demo quotes/stock) and the
restore scripts existed only to load them. Recovery now uses the new
admin-only seed dump (see the following commit).
The topic grids (PM system + wizard) showed extra categories like «سیم»,
«کابل», «ثبثب», «dsfg». Those rows were leftover junk in material_categories
from earlier testing — previously invisible because the frontend hardcoded
the 8-topic list; the API-driven topic grid surfaced them. The rows are
deleted (they had no references) and the seeder now deletes any category
outside the 8 canonical slugs, so a re-seed always yields exactly the same
8 categories as before. Dump refreshed from the clean state.
- backups/procurement.dump regenerated from the clean seeded state (was the
junk test data); README documents both the app seeder and the restore path
- docs/casdoor-auth.md: later-batch changelog (fulfillment split, demo
seeder, API-driven topics, hub-and-spoke, count modal, FOUND ceiling,
semantic colors)
The databases live in Docker volumes (not in git), so teammates on a fresh
boot saw an empty system. backups/procurement.dump + casdoor.dump are exact
pg_dump snapshots of the current demo state (users/roles, projects,
warehouses, quotes with receipts, inventory rows; Casdoor org/app/users);
restore.ps1 / restore.sh replace both DBs with the committed state
(--clean --if-exists, verified by a round-trip restore into throwaway DBs).
README documents how to restore and how to take a fresh dump.