fast-soy-admin  by sleep1223

Full-stack admin platform with AI-powered code generation

Created 2 years ago
325 stars

Top 83.9% on SourcePulse

GitHubView on GitHub
Project Summary

A modern Management Platform based on FastAPI+Vue3+Naive UI, FastSoyAdmin provides an out-of-the-box, full-stack scaffold for developers building backend management systems or seeking a reference for full-stack development. It significantly streamlines project setup and CRUD operations through integrated code generation and a modular, extensible architecture.

How It Works

The platform leverages a modern technology stack, featuring FastAPI with Pydantic v2 for the backend API and Vue3 with Vite, Naive UI, and TypeScript for the frontend. Key architectural decisions include an auto-discovery mechanism for business modules located in app/business/, an event bus for inter-module communication, and a factory-generated CRUDRouter for standard API endpoints. It emphasizes full-stack type safety using basedpyright for the backend and vue-tsc for the frontend, with CI enforcing type correctness. AI-friendly documentation and code generation prompts are also integrated.

Quick Start & Requirements

  • Primary Install: Docker Compose (make up) or local development (make install-all, make dev).
  • Prerequisites: Python >= 3.12, Node.js >= 20, uv, pnpm, and make are required. Docker is recommended for deployment.
  • Setup: Initial database setup is mandatory (make initdb or docker compose exec app uv run python -m app.cli initdb).
  • Links: Online Preview, Project Docs, Dev Guide, Command Reference.

Highlighted Details

  • AI-Driven Code Generation: Features AI coding friendliness and a powerful CLI tool (cli-gen-all) that generates full-stack CRUD code (backend API and frontend views) directly from Tortoise ORM models.
  • Modular Architecture: Business modules are automatically discovered and registered, promoting separation of concerns and scalability.
  • RBAC & Data Scope: Implements a robust three-tier RBAC system (menu, API, button) combined with row-level data scope control (all, department, self, custom).
  • Observability: Includes a built-in Radar monitoring panel for requests, SQL queries, and exceptions, alongside rate limiting and IP blocking via fastapi-guard.
  • Type Safety: Enforces full-stack type safety with backend-focused basedpyright and frontend-focused vue-tsc, with CI checks ensuring consistency.

Maintenance & Community

The project welcomes contributions via Pull Requests and Issues. Specific community channels (like Discord/Slack) or details on core maintainers are not explicitly listed in the README.

Licensing & Compatibility

The project is licensed under the MIT license, which is highly permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

Database migrations are not automatic. The default containerized SQLite setup is not volume-mounted, posing a risk of data loss on restarts if not explicitly configured. The frontend code is managed in a separate repository (fast-soy-admin-frontend) and synced via git subtree, which can add complexity to the development workflow. A "slim" clean branch is still under development, and end-to-end testing is a noted TODO item.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
15 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.