← Back to all products

Admin Panel

$29

Admin panel generator with CRUD operations, user management, system settings, and audit logs.

📁 9 files
PythonMarkdown

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample

📁 File Structure 9 files

admin-panel/ ├── LICENSE ├── README.md ├── examples/ │ └── basic_example.py ├── free-sample.zip ├── guide/ │ ├── 01_features.md │ ├── 02_quick-start.md │ └── 03_project-structure.md ├── index.html └── src/ └── main.py

📖 Documentation Preview README excerpt

Admin Panel

A Python admin panel generator for SaaS applications. Provides automatic CRUD operations, user management, system settings, role-based access control, and a comprehensive audit log — all built on Python's standard library with an HTML-rendering admin interface.

Features

  • CRUD generator — Register any data model and get full create/read/update/delete endpoints and HTML forms
  • User management — List, create, disable, reset passwords, assign roles
  • Role-based access — Admin, editor, viewer roles with per-resource permission checks
  • System settings — Key-value settings store with typed values and change tracking
  • Audit log — Every admin action recorded with actor, action, resource, and timestamp
  • Search & pagination — Built-in search across any registered model with paginated results
  • HTML dashboard — Server-rendered admin interface with navigation, tables, forms, and flash messages
  • JSON API — Every operation also available via JSON API for programmatic access
  • Data export — Export any model's data as JSON

Requirements

  • Python 3.10+
  • No external dependencies (stdlib only)

Quick Start


python src/main.py --init-demo

# List all users
curl http://localhost:8007/api/users

# Create a user
curl -X POST http://localhost:8007/api/users \
  -H "Content-Type: application/json" \
  -d '{"username": "newuser", "email": "newuser@docs.example.com", "role": "editor"}'

# Get system settings
curl http://localhost:8007/api/settings

# Update a setting
curl -X PUT http://localhost:8007/api/settings/site_name \
  -H "Content-Type: application/json" \
  -d '{"value": "My SaaS App"}'

# View audit log
curl http://localhost:8007/api/audit-log

# CRUD: list registered models
curl http://localhost:8007/api/models

# CRUD: list records for a model
curl http://localhost:8007/api/crud/projects

# CRUD: create a record
curl -X POST http://localhost:8007/api/crud/projects \
  -H "Content-Type: application/json" \
  -d '{"name": "New Project", "status": "active"}'

# Open the HTML admin panel in your browser
open http://localhost:8007/admin

*... continues with setup instructions, usage examples, and more.*

📄 Code Sample .py preview

examples/basic_example.py#!/usr/bin/env python3 """ Admin Panel — Basic Usage Example =================================== Demonstrates registering models, creating records, managing users, changing settings, and querying the audit log. Run: python3 basic_example.py """ from __future__ import annotations import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent.parent / "src")) from main import AdminEngine def main() -> None: print("=== Admin Panel — Basic Example ===\n") engine = AdminEngine(data_dir=Path("/tmp/admin-demo")) # --- 1. Create admin users --- admin = engine.create_user("admin", "admin@example.com", "secret123", role="admin") editor = engine.create_user("editor", "editor@example.com", "editor123", role="editor") viewer = engine.create_user("viewer", "viewer@example.com", "view123", role="viewer") print(f"Created {len(engine.list_users())} users") # --- 2. Check password and permissions --- print(f"\nAdmin password check: {admin.check_password('secret123')}") print(f"Admin has admin role: {admin.has_permission('admin')}") print(f"Viewer has admin role: {viewer.has_permission('admin')}") print(f"Viewer has viewer role: {viewer.has_permission('viewer')}") # --- 3. Configure system settings --- engine.set_setting("site_name", "Acme SaaS", "string", "Application name", actor=admin.id)
Buy Now — $29 Back to Products