Content management.
Admin access is enforced by Supabase Row Level Security and the user_roles table — never by a password in this page, never by a frontend-only check, and never by self-assigned roles.
Overview
Live counts from the database.
How admin access works
Your role comes from the user_roles table. A user cannot change their own role — only an existing admin can grant roles, enforced by Row Level Security. The first admin is created with the bootstrap_first_admin() function (see SETUP_GUIDE.md). Every action on this page is written to admin_audit_logs.
Species management
Edit species information or archive incorrect records. Archived species are hidden from the public encyclopedia. Every save writes a content version and an audit-log entry, and bumps the public content version so the encyclopedia picks the change up.
| COMMON NAME | SCIENTIFIC | FAMILY | RATING | STATUS |
|---|
Add a new species (draft)
New species are created as drafts — hidden from the public encyclopedia until you publish them (open the species below and choose Unarchive). The page address (slug) is generated from the common name unless you set one; it must be unique.
Edit species
Image management
Photos and illustrations per species, with photographer, licence and source. Upload files via supabase/storage-f17a8c67.min.js (avatars / post-images / sighting-photos buckets); here you attach an already-hosted image URL to a species.
Scientific references
One reference per row — title, source and a link. References are how readers verify a species profile.
Country distribution
Country-level distribution only — broad range summaries, not verified per-country occurrence records or precise locations.
Families & categories
Families come from the families table. Categories are free text on each species record (e.g. Elapid, Pit viper, Python).
User management
Change roles, or suspend abusive accounts. Accounts are never deleted from here — deletion is the user's own request (see Privacy).
| USER | EMAIL / ID | ROLE | PUBLIC | CREATED |
|---|
Community moderation
Open reports, pending sightings and recent posts.
Open reports
Sightings pending review
Recent posts
Quiz questions
Quiz questions are generated from species data — there is no hand-written question bank to go stale. Generation rules (from the live site):
- Beginner: 5 questions — photo, venom level, country, diet, true/false.
- Intermediate: 5 questions — photo, venom level, country, diet, family, habitat.
- Expert: 8 questions — all types plus conservation status and length; distractors come from the same family where possible.
- Daily challenge: 5 questions, seeded by date so every player gets the same set.
- Every question carries an explanation and exactly one correct answer.
Achievements
Badges awarded by the quiz. Add new ones here; the app reads this table.
Announcements
Published announcements are visible to the community.
Audit logs
Every admin action on this page writes a row here — who did what, to which record, and when.
| WHEN | ADMIN | ACTION | TARGET | DETAILS |
|---|
Export & backup
Downloads are generated in your browser from the live species rows — no server round-trip, no secrets involved.
Full database backups (including user data) are made in the Supabase dashboard under Database → Backups. Back up before any bulk change.