β οΈ IMPORTANT NOTICEβ οΈ
This is the DOCUMENTATION repository only.
Please DO NOT star this repo! β
Star the main project instead: https://github.com/enfyra/enfyra π
Enfyra is a backend framework that automatically generates APIs from your database. You create tables through a visual interface, and Enfyra instantly provides REST & GraphQL APIs for them - no coding required. It's like having a backend developer that never sleeps.
π Live Demo: https://demo.enfyra.io/ - Pre-filled admin credentials, just click login!
What can you build with Enfyra?
- E-commerce platforms - Products, orders, customers, inventory
- Content websites - Blogs, news sites, documentation portals
- Business applications - CRM, project management, internal tools
- Mobile app backends - User management, data sync, push notifications
- Any data-driven system - If it needs a database and API, Enfyra can power it
Unlike typical no-code platforms that limit you to predefined features, Enfyra gives you complete control over every aspect of your API lifecycle:
- Before Hooks: Validate, transform, or enrich data before it hits the database
- Custom Handlers: Replace default CRUD operations with your own business logic
- After Hooks: Trigger workflows, send notifications, or sync with external services
- Dynamic Extensions: Build custom UI components that integrate seamlessly with the admin panel
- Query Interceptors: Modify queries, add custom filters, or implement complex access rules
The result? Start building in minutes with no-code, but never hit a ceiling when your requirements grow complex. Every API endpoint can be customized, every workflow can be automated, and every business rule can be implemented - all without forking or modifying the core system.
π₯ Backend-First Architecture
- API Generation: All REST & GraphQL APIs are automatically generated and served by the backend server (port 1105)
- Frontend as Client: The frontend app (port 3000) is purely a client that consumes APIs from your backend URL
- Single Source of Truth: Backend generates APIs from database schema, frontend consumes them via HTTP requests
π₯ Real-time Everything
- Live Extension System: Write Vue/JavaScript extensions that compile and load instantly from the database - no server restarts, no deployments
- Zero-downtime Schema Updates: Change your data structure while your API stays 100% available
- Instant API Generation: Every table immediately becomes a full REST & GraphQL API with advanced querying
ποΈ Cluster-Ready Architecture
- Born for Clustering: Designed from day one to run multiple instances - no configuration, no setup, just scale
- Automatic Coordination: Schema changes sync instantly across all instances via Redis
- Zero Additional Work: Deploy 1 instance or 100 instances - the experience is identical
- Stateless by Design: Any instance handles any request seamlessly - Learn how it works β
π‘οΈ Enterprise-Grade Security
- Visual Permission Builder: Create complex permission logic with AND/OR conditions and nested rules
- Dynamic Role System: Permissions that adapt based on data relationships and user context
- Handler Isolation: Custom code runs in isolated processes for security and stability
π Beyond Traditional CMS
- Meta-Programming Core: The entire API structure is generated from database metadata in real-time
- Multi-Instance Coordination: Run multiple instances with automatic schema synchronization via Redis
- Smart Caching: SWR (Stale-While-Revalidate) pattern for optimal performance without sacrificing freshness
- Flexible Syntax: Choose between traditional
$ctx.$propertyor modern template syntax@TEMPLATE&#table_name - Built-in Tables: Leverage system tables like
user_definitionfor immediate user management
Choose your coding style - both work seamlessly together:
Traditional Syntax:
const user = await $ctx.$repos.user_definition.create({
email: $ctx.$body.email,
password: await $ctx.$helpers.$bcrypt.hash($ctx.$body.password)
});Template Syntax (Shortened):
const user = await #user_definition.create({
email: @BODY.email,
password: await @HELPERS.$bcrypt.hash(@BODY.password)
});See: Complete Example featuring both syntax styles!
| Feature | How It Works |
|---|---|
| Extension System | Write custom features that compile and load instantly from the database |
| Schema Changes | Modify your data structure with zero downtime - APIs stay available |
| Permission System | Visual builder for complex access control |
| API Generation | Every table instantly becomes a full REST & GraphQL API |
| Custom Code | Execute business logic in isolated processes with full request context |
| Multi-Instance | Run multiple servers with automatic synchronization |
| Flexible Syntax | Traditional $ctx.$property or modern @TEMPLATE & #table_name patterns |
| Package Management | Install NPM packages directly from UI for use in handlers and hooks |
| Built-in Auth | System tables like user_definition for immediate user management |
- Rapid Development: Go from idea to production API in minutes, not days
- Complex Projects: Handle sophisticated data relationships and business logic without limitations
- Scale-Ready Applications: Start small and scale to enterprise without architectural changes
- Team Collaboration: Intuitive interface for non-technical users, powerful tools for developers
- Custom Solutions: Build exactly what you need without fighting framework limitations
Two-Component System:
Database β Backend (API Server) β Frontend (Admin App)
- Backend (Port 1105): Generates & serves all REST & GraphQL APIs from your database schema
- Frontend (Port 3000): Pure client application consuming APIs from backend URL
- All API endpoints: Originate from backend server, frontend makes HTTP requests
Backend: NestJS + Express.js + Knex + Redis + GraphQL Yoga Frontend: Nuxt 4 + Vue 3 + TypeScript + TailwindCSS Database: MySQL, MariaDB, PostgreSQL, MongoDB (your choice) Extensions: Dynamic Vue SFC compilation via Vite
NestJS + Express.js - Enterprise Node.js framework built on Express with custom high-performance route engine that bypasses Express middleware stack for superior API performance
Knex - SQL query builder with comprehensive support for:
- MySQL - Recommended for production environments
- MariaDB - MySQL-compatible with full feature support
- PostgreSQL - Advanced features and complex data types supported
- MongoDB - NoSQL document database with full CRUD operations and query support
- SQLite - Planned for future release (development and testing environments)
- Dynamic Table Management - Create and modify database tables on the fly
- Package Management - Install and manage NPM packages directly from the UI for use in handlers and hooks
- Official SDK -
useApianduseEnfyraAuthfrom @enfyra/sdk-nuxt package with custom error handling - TypeScript Support - Full type safety throughout the application
- Extension System - Extensible architecture with dynamic extension loading
- Permission System - Comprehensive role-based access control (RBAC)
- Menu Registry - Dynamic sidebar and menu management
- Header Actions - Configurable header button system
- Dynamic Forms - Auto-generated forms with validation and relations
- Advanced Filtering - Interactive UI filtering with MongoDB-like syntax
- Flexible Code Syntax - Choose between traditional
$ctx.$propertyor modern@TEMPLATE&#table_name - Built-in Authentication - System tables like
user_definitionfor immediate user management - Hook System - PreHook and AfterHook support for custom business logic
- Custom Handlers - Override default CRUD operations with your own code
- Request Context - Full
$ctxobject with repositories, helpers, packages, and more
enfyra-docs/
βββ ποΈ architecture-overview.md # System architecture diagram and component responsibilities
βββ π getting-started/
β βββ installation.md # Setup guide for backend and app
β βββ getting-started.md # First steps after installation and interface overview
β βββ table-creation.md # Complete guide to creating tables with all field types
β βββ data-management.md # Complete guide to managing records in your tables
β
βββ π examples/
β βββ user-registration-example.md # Complete end-to-end example with template syntax
β
βββ π¨ frontend/
β βββ api-integration.md # API integration with Enfyra SDK and examples for extensions
β βββ filter-system.md # Interactive UI filtering for data tables and forms
β βββ relation-picker.md # Working with related data in forms (powered by Filter System)
β βββ routing-management.md # UI guide for creating custom API endpoints and route permissions
β βββ custom-handlers.md # UI guide for creating custom business logic handlers
β βββ hooks.md # UI guide for creating lightweight request/response hooks
β βββ package-management.md # Install and manage NPM packages for handlers and hooks
β βββ menu-management.md # UI guide for creating custom navigation menus
β βββ extension-system.md # Create custom pages with Vue.js components (linked to menus)
β βββ header-actions.md # Inject custom actions into header and sub-header areas
β βββ page-header.md # Register custom page headers with stats and gradients
β βββ permission-builder.md # Visual interface for creating complex permission rules
β βββ permission-components.md # PermissionGate and usePermissions for UI control
β βββ storage-management.md # Upload and manage files, folders, and storage configurations
β βββ form-system.md # Dynamic form generation with validation and relations
β
βββ βοΈ server/
βββ api-lifecycle.md # π Request lifecycle, hook system, and context sharing
βββ api-querying.md # π₯ MongoDB-like API querying with powerful operators (for developers)
βββ graphql-api.md # π GraphQL queries and mutations with auto-generated schema
βββ hook-development.md # Advanced hook programming with context, examples, and best practices
βββ context-reference.md # π Complete $ctx object reference for hooks and handlers
βββ file-handling.md # π File upload handling and response streaming with Sharp image processing
βββ cluster-architecture.md # ποΈ Multi-instance coordination and distributed synchronization
βββ permission-system.md # π Role-based access control with allowedUsers bypass
βββ template-syntax.md # β¨ Modern template syntax for cleaner code
βββ bootstrap-scripts.md # π Startup script execution system with full context access
New to Enfyra? Choose your journey:
Just want to see what Enfyra can do?
- π Try Live Demo - Pre-filled admin credentials, just click login!
- π Getting Started Guide - See table creation and data management in action
Ready to master Enfyra? Follow this step-by-step path to become proficient:
- Installation - Set up Enfyra backend and app
- Getting Started - First login and interface overview
- Table Creation - Create your first table with all field types and relations
- Data Management - Learn to manage records and relationships
- Form System - Understand how forms work with your data
- Filter System - Master data filtering and searching
- Permission Builder - Set up access control rules
- Menu Management - Customize navigation and user interface
- Storage Management - Upload and manage files, folders, and storage configurations
- API Integration - Learn to fetch and manipulate data programmatically
- Package Management - Install NPM packages for enhanced handler and hook functionality
- Extension System - Build custom pages and functionality
- Header Actions - Inject custom buttons and widgets into the app interface
- Custom Handlers - Override default API behavior with business logic
- API Querying - Master MongoDB-like querying for complex data retrieval
- Context Reference - Complete reference for $ctx object in hooks and handlers
- Hook Development - Create sophisticated request/response hooks
- API Lifecycle - Understand the complete request processing pipeline
- Permission System - Deep dive into role-based access control
- Cluster Architecture - Deploy and scale across multiple instances
- Bootstrap Scripts - Initialize application state and perform startup tasks
Have a specific goal? Jump directly to what you need:
- π Building an MVP? β Phases 1-2 (4-5 hours total)
- π§ Need custom functionality? β Focus on Phase 3: API Integration + Extensions
- π Building a dashboard? β Extension System + API Integration
- π Need role-based access? β Permission Builder + Permission System
- βοΈ Complex business logic? β Custom Handlers + Context Reference + Hook Development
- π’ Enterprise deployment? β Cluster Architecture + Permission System
- π Application initialization? β Bootstrap Scripts + API Integration
ποΈ Architecture Overview
- Architecture Overview - System architecture diagram and component responsibilities
π Getting Started
- Installation - Setup guide for backend and app
- Getting Started - First steps after installation and interface overview
- Table Creation - Complete guide to creating tables with all field types
- Data Management - Complete guide to managing records in your tables
π¨ Frontend (User Interface)
- API Integration - API integration with Enfyra SDK and examples for extensions
- Filter System - Interactive UI filtering for data tables and forms
- Relation Picker - Working with related data in forms (powered by Filter System)
- Routing Management - UI guide for creating custom API endpoints and route permissions
- Custom Handlers - UI guide for creating custom business logic handlers
- Hooks - UI guide for creating lightweight request/response hooks
- Package Management - Install and manage NPM packages for handlers and hooks
- Menu Management - UI guide for creating custom navigation menus
- Extension System - Create custom pages with Vue.js components (linked to menus)
- Header Actions - Inject custom actions into header and sub-header areas
- Page Header - Register custom page headers with stats and gradients
- Permission Builder - Visual interface for creating complex permission rules
- Permission Components - PermissionGate and usePermissions for UI control
- Storage Management - Upload and manage files, folders, and storage configurations
- Form System - Dynamic form generation with validation and relations
βοΈ Backend (Developer Integration)
- API Lifecycle - π Request lifecycle, hook system, and context sharing
- API Querying - π₯ MongoDB-like API querying with powerful operators, relation filtering, aggregation, and deep relations
- GraphQL API - π GraphQL queries and mutations with auto-generated schema and permission control
- Swagger API - π OpenAPI/Swagger documentation with interactive testing and auto-generation
- MongoDB Relations - π MongoDB relation management, inverse sync, and metadata change behavior
- Context Reference - π Complete $ctx object reference for hooks and handlers with examples
- File Handling - π File upload and streaming with Sharp image processing and memory optimization
- Hook Development - Advanced hook programming with context, examples, and best practices
- Cluster Architecture - ποΈ Multi-instance coordination and distributed synchronization
- Permission System - π Role-based access control with allowedUsers bypass
- Bootstrap Scripts - π Startup script execution with full context access and hot reload
π Examples & Templates
- User Registration - Complete end-to-end example featuring template syntax, hooks, handlers, and package management
Enfyra requires both backend and frontend to work properly. See our complete installation guide:
β Complete Installation Guide
Quick overview:
- First install Enfyra Server
- Then install Enfyra App
- Connect them together
We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/enfyra.git - Install dependencies:
npm install - Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and commit:
git commit -m 'Add amazing feature' - Push to your branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- π Documentation
- π Issues
- π¬ Discussions
Built with β€οΈ using:
- Nuxt.js - The Vue.js Framework
- Vue.js - The Progressive JavaScript Framework
- Nuxt UI - UI Components
- TypeScript - Type Safety