AutoCRUD is a revolutionary, fully automated CRUD system powered by AJAX and Tailwind CSS that intelligently detects your database structure and dynamically generates complete, production-ready interfaces without manual configuration.
The system performs deep database analysis using advanced SQL queries to automatically discover table structures, column types, constraints, and foreign key relationships. This intelligence drives dynamic generation of appropriate HTML elements—from text inputs and dropdowns to file uploads and date pickers—all tailored to your specific database schema.
Built around three core components: table_functions.php
(the intelligent engine with reusable functions), table_alias.php
(customization hub using smart keyword mapping), and config.php
(secure database foundation). The system transforms raw database metadata into contextually appropriate user interfaces that feel hand-crafted for your data.
Key Benefits: Zero configuration deployment, intelligent field detection, real-time AJAX search with pagination, responsive design, built-in security, and performance optimization—turning hours of CRUD development into minutes of effortless automation.
To be able to make this system your own, read carefully the comments of table_alias.php
and adjust the keyword according to your own needs.
AutoCRUD is a powerful, fully automated CRUD (Create, Read, Update, Delete) system that revolutionizes database management through dynamic content generation. Here are its key features:
- Automatic Database Scanning: Seamlessly detects all tables in your database
- Dynamic Column Analysis: Automatically identifies column names, data types, and constraints
- Real-time Table Generation: Creates complete CRUD interfaces based on database structure
- Zero Manual Configuration: No need to manually define table structures in code
- Smart Input Type Detection: Automatically generates appropriate input fields based on database column types:
- Text inputs for VARCHAR/TEXT fields
- Number inputs for INTEGER/DECIMAL fields
- Date pickers for DATE fields
- File upload buttons for image/document columns
- Dropdown selections for ENUM fields
- Textarea for description/comment fields
- Dynamic Validation: Automatically applies
required
attributes based on NOT NULL constraints - Foreign Key Relationships: Automatically creates dropdown selections populated from related tables
Dynamically.Generating.Forms.based.on.Table.Fields.and.Validations.mp4
- Real-time AJAX Search: Instant search results without page refresh
- Multi-column Search: Search across all visible columns simultaneously
- Category-based Filtering: Click-to-filter functionality for related data
- Smart Search Suggestions: Dynamic placeholder text with search examples
- Cross-table Search: Search through foreign key relationships
Advance.JQuery.Search.and.Filter.by.Category.using.the.search.mp4
- Tailwind CSS Integration: Modern, responsive design out of the box
- Interactive Elements:
- Hover effects on table rows
- Loading animations
- Modal confirmations for delete operations
- Image zoom functionality
- Mobile Responsive: Optimized for all device sizes
- Dark Mode Support: Built-in dark theme capabilities
- Automatic File Upload Detection: Recognizes file/image columns automatically
- File Type Validation: Smart file type restrictions (images, PDFs, documents)
- Secure File Handling: Sanitized file names and secure upload processing
- Image Preview: Thumbnail display with click-to-zoom functionality
- Automatic Pagination: Configurable page limits (default: 10 records per page)
- Performance Optimized: LIMIT and OFFSET queries for large datasets
- Navigation Controls: Previous/Next buttons with page number links
- Record Count Display: Shows total pages and current position
- SQL Injection Prevention: All inputs are sanitized using
mysqli_real_escape_string()
- Input Validation: Server-side validation for all form inputs
- File Security: Secure file upload with sanitized filenames
- XSS Protection: Output escaping for safe data display
- Field Aliasing: Custom display names for database columns
- Table Aliasing: User-friendly names for database tables
- Column Visibility Control: Show/hide specific columns in different views
- Input Field Customization: Control which fields appear in forms
- Sorting Configuration: Custom sorting options per table
- Foreign Key Detection: Automatically identifies and handles foreign key relationships
- Related Data Display: Shows related table data instead of foreign key IDs
- Cascading Operations: Handles related data updates appropriately
- Cross-table Navigation: Easy navigation between related records
- Live Search: Real-time search without page reloads
- Dynamic Content Loading: Smooth user experience with AJAX updates
- Error Handling: Graceful handling of network errors
- Loading States: Visual feedback during operations
- Modular Design: Separated concerns with dedicated files:
config.php
- Database configurationtable_functions.php
- Core functionalitytable_alias.php
- Customization settings
- Reusable Functions: Comprehensive function library for common operations
- Extensible Structure: Easy to add new features and customize behavior
- Well-Documented Code: Inline comments explaining functionality
- Create Records: Dynamic insert forms with proper validation
- Read/Display: Formatted data display with pagination
- Update Records: Pre-populated edit forms with current values
- Delete Records: Confirmation dialogs with cascade handling
- Automatic Type Mapping: Maps database types to appropriate HTML input types
- ENUM Handling: Automatic dropdown generation for ENUM fields
- Text Area Detection: Smart detection of description/comment fields
- Number Format Handling: Proper handling of integers, decimals, and floats
- Admin Panels: Perfect for creating admin interfaces for any database
- Content Management: Ideal for managing dynamic content
- Data Entry Systems: Streamlined data entry with validation
- Prototyping: Rapid prototyping of database-driven applications
- Internal Tools: Quick internal tools for data management
- Server-side Rendering: All HTML generated server-side for SEO and performance
- MySQL Integration: Optimized for MySQL databases with full feature support
- PHP 7+ Compatible: Modern PHP features and best practices
- No Framework Dependencies: Lightweight implementation without heavy frameworks
- Standards Compliant: Clean, semantic HTML5 output
-
Locate the config.php file and update the following values:
- Username
- Password
- Database name
- Server name
- Navigate to the $showAliases array.
- Create a switch case for every table in your database.
- Beneath each case, assign an associative array to $showAliases, mapping original attribute names in the table to preferred display names as keys and values, respectively.
In the table_alias.php
,
The $showAliases array stores the fields that you want to be displayed in the table_show.php. Another array $inputAliases
stores the fields that are allowed to take input through a form. Please follow the above instructions for this array as well.
Additionally, insert $nameField
and $searchField
too inside the switch case, if needed.
Store the column of the related table that is to fetched using the foreign key. For example, category_name
is fetched using the foreign key category_id
from the table item_category
.
Feel free to create an issue or reach out on