How We Automated CRUD Admin Panels with AI + .cursor/rules + Our Open Source Framework
Tired of setting up the same CRUD logic again and again? We were too β so we taught AI to do it for us.
πHere's how it works.
The problem
Creating admin panels is repetitive:
- same table structure
- same hooks
- same form fields.
Even with reusable components, mistakes still happen β wrong props, inconsistent naming, etc.
The solution
We built Admiral, our open source React-based framework for admin panels.
Then we added a .cursor/rules
folder with Markdown-based rules for Cursor AI.
Now, AI knows:
- how a CRUD page should be structured;
- which components and hooks to use;
- how to name things;
- where to place files;
- and how to fix TypeScript + lint errors right after generating.
Just trigger @crud-page
in Cursor, fill in 7 simple fields β and get a ready-to-use CRUD page in seconds.
Example directory structure:
admin/
βββ src/
β βββ crud/
β ββββ [resource]/
β βββββ index.tsx # File with CRUD-page config
β βββββ types.ts # Typescript
β βββββcomponents/ # In case you need to use custom components
βββ config/
ββββ menu.tsx # A file describing how the navigation menu should look like
βββ pages/ Routing
ββββ [resource]/
βββββ index.tsx # A page with a table
βββββ create.tsx # A page with a c
βββββ [id].tsx # A page with an edit form
The impact
- Dozens of dev hours saved
- Zero boilerplate hand-coding
- Fewer errors
- Clean, consistent code
We're actively using it in real projects and constantly expanding the ruleset.
π Check the repo
π§ Read the full walkthrough on our blog
π¬ Got feedback or ideas for more rules? We'd love to hear them.
Top comments (0)