← Back to all products
$29
Admin Panel
Admin panel generator with CRUD operations, user management, system settings, and audit logs.
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@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
src/main.py
#!/usr/bin/env python3
"""
Admin Panel — SaaS Admin Dashboard & CRUD Generator
=====================================================
A complete admin panel for SaaS applications. Provides automatic CRUD
operations for any registered data model, user management with role-based
access control, system settings with change tracking, and a comprehensive
audit log. Includes both a JSON API and a server-rendered HTML admin UI.
Zero dependencies. Just run: python3 main.py
Part of the SaaS Starter collection by DataNest.
License: MIT
"""
from __future__ import annotations
import argparse
import hashlib
import html
import json
import logging
import os
import secrets
import time
import uuid
from dataclasses import asdict, dataclass, field
from datetime import datetime, timezone
from http.server import BaseHTTPRequestHandler, HTTPServer
from pathlib import Path
from typing import Any, Optional
from urllib.parse import parse_qs, urlparse
# ---------------------------------------------------------------------------
# Configuration
# ---------------------------------------------------------------------------
DEFAULT_HOST = "0.0.0.0"
DEFAULT_PORT = 8007
DATA_DIR = Path("./admin-data")
# Role hierarchy — higher index = more privilege
ROLES = ("viewer", "editor", "admin")
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(name)s — %(message)s",
datefmt="%Y-%m-%dT%H:%M:%S",
)
# ... 792 more lines ...