# RuoYi-FastAPI: Admin Development and Code Generation

> RuoYi-FastAPI combines FastAPI, Vue 3, Element Plus, MySQL or PostgreSQL, Redis, and JWT authentication in a full-stack administration framework. It suits teams that want RuoYi-style management features and code generation, but the README does not provide installation commands.

**insistence/RuoYi-FastAPI** — 基于Vue3+Element Plus+FastAPI开发的一个通用中后台管理框架（若依的FastAPI版本），支持代码生成。A general middle and backend management framework developed with Vue3 + Element Plus + FastAPI (FastAPI Edition of RuoYi), supporting code generation.

- Repository: https://github.com/insistence/RuoYi-FastAPI
- Website: https://docs.insistence.tech
- Stars: 1,570 · Forks: 420
- Language: Python
- License: MIT
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/insistence-ruoyi-fastapi

## Why RuoYi-FastAPI targets full administration systems

RuoYi-FastAPI addresses the repeated work involved in building an internal administration application: identity, menus, roles, organizational data, dictionaries, system parameters, announcements, logs, scheduled jobs, and service monitoring. The target users are Python and JavaScript developers who want a conventional management interface backed by a FastAPI service rather than assembling each administrative module separately.

The project is positioned as the FastAPI edition of RuoYi. Its repository description identifies Vue 3 and Element Plus as the principal stack, while the README also says that Vue 2 with Element UI remains available as a separate frontend project. That distinction matters when selecting a codebase. A team intending to build on the Vue 3 interface should inspect `ruoyi-fastapi-frontend/` to confirm that the intended application is present rather than assuming that every documented frontend variant lives in one directory.

The built-in module set is broad. Users can be assigned roles, menu operations, button permissions, departments, posts, dictionaries, parameters, and notices. The system also records operation and login logs, tracks online users, schedules jobs, monitors servers and caches, generates form HTML, documents APIs from business code, and generates Python, SQL, Vue, and JavaScript code from database table configuration. This makes it a starting point for a business back office rather than a narrow web framework.

The repository description and README also list newer administrative areas: AI model and chat management, controlled file management, and a plug-in system. These features broaden the operating surface. They can be useful in a large internal application, but they also mean engineers should distinguish the baseline admin framework from optional subsystems before estimating configuration and upgrade work.

## FastAPI, databases, Redis, and OAuth2 request flow

According to the README, the backend uses FastAPI and SQLAlchemy with MySQL or PostgreSQL. Redis is also part of the supported stack. The project does not expose a small library API in its README; it provides an application skeleton in which these components cooperate.

Authentication uses OAuth2 and JWT, with support for authentication from multiple terminals. Dynamic permission menus provide the client with authorization-related navigation, while menu and button permission identifiers support operation-level control. Roles receive menu permissions and can be assigned data scopes based on organizational divisions. Together, these features connect login state, server-side authorization metadata, and frontend interface visibility.

The top-level layout separates major concerns into `ruoyi-fastapi-backend/`, `ruoyi-fastapi-frontend/`, and `ruoyi-fastapi-test/`. Configuration for two deployment paths is visible at the repository root as `docker-compose.my.yml` and `docker-compose.pg.yml`, alongside `docker.env`. Their names indicate MySQL and PostgreSQL-oriented variants, but the README does not document the services, variables, ports, startup order, or migration procedure within those files. Those details must be checked in the project documentation or the files themselves before deployment.

Redis should not be treated as an optional cache in the architecture without checking the configuration, because the documented platform includes online-user tracking and cache monitoring. Likewise, the documented OAuth2 and JWT flow does not by itself explain token lifetime, refresh behavior, secret storage, or server-side revocation. The README confirms the authentication approach, but it does not provide enough detail to make security-sensitive configuration decisions.

## Code generation from database table configuration

Code generation is one of the clearest reasons to evaluate this framework. The README states that administrators can configure database table information and generate front-end and back-end code for Python, SQL, Vue, and JavaScript, with support for downloading the result. For repeated CRUD applications, this can reduce the amount of manually synchronized boilerplate across the API, database, and interface.

The documented flow is table configuration, followed by generated output. However, the README does not show a table-design convention, generator template names, package path options, overwrite policy, or supported relationship types. It also does not establish whether generated code is intended to be edited and then preserved across future generator runs. Engineers should inspect the code-generation screens and corresponding backend templates before building a workflow around repeated generation.

This feature does not remove application design work. Generated names, validation behavior, authorization checks, transaction boundaries, and data-scope rules may still require review. The existence of generators for four output types does not mean that every generated artifact shares the same quality or conventions. A useful pre-adoption check would be to generate a small table, compare each artifact with an existing module, and identify which files must be manually changed.

The related online form builder follows a different model. It generates HTML by dragging form elements, according to the README. It should not be confused with the database-driven code generator. One produces interface markup, while the other produces multi-layer application code.

## Installation starts with the external documentation

The README provides compatibility badges for Node.js 18 or later, Python 3.10 or later, MySQL 5.7 or later, and Redis 6.2 or later. PostgreSQL is also supported by the backend description, but no PostgreSQL version is stated in the README. Those minimums are useful for initial compatibility screening, not a complete installation guide.

The README does not provide commands for cloning the repository, creating an environment, installing frontend dependencies, initializing the database, or starting the back end and front end. It directs readers to the project documentation at https://docs.insistence.tech. Consequently, no installation command can be copied faithfully from the README, and inventing package-manager or server-start options would risk sending readers through a setup that differs from the project's actual layout.

A first real use also needs information absent from the README. The documentation must define how `docker.env` is populated, how `docker-compose.my.yml` or `docker-compose.pg.yml` is invoked, where database initialization files reside, which frontend directory is intended for Vue 3, and how the browser reaches the API. After those points are known, the first meaningful use should be logging into the management interface and examining one existing role, menu, and generated CRUD module before creating business tables.

This documentation gap is material. A repository with Docker Compose files and documented minimum versions still needs a version-specific startup sequence. Engineers should treat the external documentation as part of adoption, not as optional reading.

## Vue 3 administration interface and operational boundaries

The Vue 3 interface uses Element Plus and supports conventional administration workflows. The README describes login and dashboard screens alongside management views for users, roles, menus, departments, posts, dictionaries, notices, logs, online users, jobs, servers, caches, forms, APIs, code generation, AI models, chat, files, and plug-ins. Dynamic menus matter because a role's available navigation and operation controls depend on the permission data delivered to the client.

The repository also offers mobile projects based on uni-app with Vue 2 and Vue 3, using Tailwind CSS. Those are separate modified projects according to the README. Their existence broadens delivery options, but the README does not explain whether every administration feature is available on mobile or how mobile authentication is configured. A team requiring a mobile client should verify those boundaries before estimating parity.

File management includes public files and protected attachments, access control, business-reference protection, operation auditing, a recycle bin, retention policies, and storage reconciliation. The plug-in system adds discovery, installation, enablement, disabling, upgrades, removal, cleanup, dependencies, configuration, migrations, seeds, scheduled tasks, menu permissions, preview, diagnostics, audit records, and scaffolding. These are administrative and operational workflows with configuration surfaces of their own.

The platform is therefore a poor fit for a minimal service that only needs FastAPI endpoints. Installing an organization model, cache-backed administration features, role management, generated interfaces, and plug-in management adds conceptual and operational work. It makes more sense for an internal system whose business screens resemble RuoYi's administration patterns.

## Dash-FastAPI-Admin as the pure Python alternative

The README lists `Dash-FastAPI-Admin` as a pure Python version of RuoYi-FastAPI, with repositories hosted on GitHub and Gitee. That is the clearest documented alternative. 

Choose Dash-FastAPI-Admin when reducing the number of client technologies and keeping the application within Python tooling is more important than following RuoYi's Vue conventions. Choose the Vue 3 variant when the team needs Element Plus interfaces, explicit front-end and back-end artifacts, or the project's established code-generation workflow across Python, SQL, Vue, and JavaScript. The README does not provide a feature-by-feature comparison, so parity between the two projects should not be assumed.

The repository is under the MIT license. That supports use and modification under the license's conditions, but organizations still need to review license notices and dependency licenses separately. This review is not legal advice. Upgrade cost also depends on generated business code, plug-in migrations, configuration changes, and database changes across releases. The repository includes `CHANGELOG.md`, but the README does not describe its migration policy.

## Release activity and upgrade work

The repository is not archived. Its last push was on 2026-10-10, so recent repository activity is documented. The listed releases are v1.10.0 on 2026-08-01, v1.9.0 on 2026-02-13, and v1.8.1 on 2025-12-26. These dates establish release activity, but they do not establish compatibility or migration quality for any particular installation.

The v1.10.0 badge and recent release name identify the visible line as RuoYi-Vue3-FastAPI v1.10.0. Engineers should still compare the selected release with the branch they clone. The README does not document automatic database migrations, plug-in compatibility across releases, a supported upgrade path, or how generated code is affected. Those are concrete upgrade questions, especially for systems with local edits to generated modules.

A careful adoption starts by reading `CHANGELOG.md`, selecting one frontend variant, and identifying the database deployment represented by `docker-compose.my.yml` or `docker-compose.pg.yml`. The MIT license reduces friction around modifying the framework, but it does not remove the cost of preserving local business changes or validating plug-in migrations.

## Conclusion

RuoYi-FastAPI is a practical choice for developers who want a full RuoYi-style administration system with Vue 3 and FastAPI, particularly when code generation and established permission modules matter. It is less suitable for a small standalone API that needs only a few dependencies. Before adoption, verify the startup procedure at https://docs.insistence.tech, then check whether the required Vue version, database, plug-ins, and generated code match the selected frontend project and release.

## FAQ

### Which frontend should I choose for RuoYi-FastAPI?

The README says the platform includes Vue 2 with Element UI and Vue 3 with Element Plus projects. The repository description identifies Vue 3 and Element Plus as the principal stack, but the frontend directories should be inspected before choosing a codebase.

### Does RuoYi-FastAPI support PostgreSQL and Redis?

The backend description lists MySQL, PostgreSQL, and Redis. Root files include `docker-compose.my.yml` and `docker-compose.pg.yml`, while the README badges state MySQL 5.7 or later and Redis 6.2 or later; no PostgreSQL minimum version is documented in the README.

### How do I install and start RuoYi-FastAPI?

The README does not include installation or startup commands. It directs users to https://docs.insistence.tech, while repository configuration is stored in files including `docker.env`, `docker-compose.my.yml`, and `docker-compose.pg.yml`.

## Sources

- [insistence/RuoYi-FastAPI on GitHub](https://github.com/insistence/RuoYi-FastAPI)
- [License: MIT](https://github.com/insistence/RuoYi-FastAPI/blob/master/LICENSE)
- [Project website](https://docs.insistence.tech)
- [README](https://github.com/insistence/RuoYi-FastAPI/blob/master/README.md)
- [Releases](https://github.com/insistence/RuoYi-FastAPI/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/insistence-ruoyi-fastapi
