AdminForth is an open-source admin panel framework built with Vue and Node.js. It provides OWASP-compliant authentication, OAuth2/OpenID SSO, 2FA plugins, and an AI autocomplete plugin for ChatGPT integration. Features include audit logging, file uploads, dark mode, and reliable background process management. The documentation covers deployment strategies using Docker, K3s, Terraform, and GitHub Actions on Amazon EC2, along with guides for Keycloak authorization, database backups to AWS Glacier, and AI-assisted development workflows.
Tokens
39.4K
Snippets
191
Records
460
Agent score
50%
What's inside AdminForth
IExpressHttpServer interface overview
Interface for creating custom HTTP server adapters in AdminForth. Extends IHttpServer and provides methods to integrate Express with AdminForth, enabling authorization middleware, API endpoint registration, SPA serving, and optional Vite hot reloading.
AdminForth CLI usage
The AdminForth CLI is invoked with adminforth <command> [...options]. Run adminforth help to see all available commands, or adminforth version to check the installed version.
Chat-GPT Text Completion Plugin Overview
The AdminForth framework includes a Chat-GPT plugin that enables AI-assisted text completion within admin forms. It uses the Quill editor under the hood and provides inline suggestions that users can accept with Tab, complete words with Ctrl+Right, or regenerate with Ctrl+Down. On mobile, suggestions are accepted by swiping right.
Automate releases with semantic-release
semantic-release is a tool that automates versioning and release notes by analyzing git commit messages. It solves the reliability issues of manual versioning, where developers often forget to update CHANGELOG.md, miss relevant changes, or push updates at the wrong time. Instead of manually maintaining version numbers and release notes, semantic-release generates versions and GitHub releases directly from conventional commit messages.
BackgroundJobsPlugin overview
BackgroundJobsPlugin adds a durable background-job system to AdminForth. Jobs are stored in your data store (via a resource), executed by registered handlers, and automatically resumed after server restarts. The plugin provides a frontend API for job info popups and a backend API to manage job states and fields like totalUsedTokens.
suggestOnCreateFunction Parameters
The function receives a single params object with an adminUser property of type AdminUser, which provides context about the currently authenticated user who is creating the record. This can be used to set field values based on the user's properties (e.g., defaulting createdBy to the current user's ID).
params: { adminUser: AdminUser }
AdminForthResourceColumnCommon interface overview
Interface defining properties for a single field in a Vue and Node admin panel table or database collection. Extends AdminForthResourceColumnInputCommon and includes configuration options like backendOnly, allowMinMaxQuery, and virtual to control field behavior. Supports custom component rendering and visibility settings across edit, create, and filter pages.
ICodeInjector interface overview
Interface defining properties and methods for component management, dev server configuration, and source folder synchronization within the AdminForth admin panel framework. Use this interface to configure development server settings, register custom Vue components, and manage source file synchronization.
Work without direct database connection
AdminForth can operate without direct database connections by routing all read and write operations through custom APIs (REST, GraphQL, or JSON-RPC). To implement this, extend the data connector class and implement methods responsible for data access and mutations. AdminForth never connects to the database directly and doesn't need to know its URL—all operations flow through your API layer.
Deploy Docker Apps to AWS EC2 with K3s and Terraform
This guide covers deploying Docker applications (using AdminForth as an example) to an Amazon EC2 instance using K3s for container orchestration and Terraform for infrastructure-as-code. The setup uses a t3a.small instance (2 vCPUs, 2GB RAM) in the us-west-2 region. Images and build cache are stored in Amazon ECR. Average build time for a typical commit with Vite rebuilds is approximately 3 minutes.
AdminForthResourceInputCommon interface overview
Interface defining configuration for a database resource in AdminForth admin panel. Each resource represents a table or collection and AdminForth generates CRUD pages (list, show, edit, create, filter) automatically. Extended by AdminForthResourceCommon.
Project structure overview
Generated project structure: custom/assets/ for static assets, custom/package.json for custom npm packages in Vue files, resources/ for resource files (e.g., adminuser.ts), schema.prisma for database schema, index.ts as main entry point, .env for secrets, .env.local for local env vars. The resources/ folder contains resource definition files that map database tables to admin UI.