Introducing AssetConnect for CodeIgniter 4!
Hey team! I'm excited to share a new library I've been working on called
AssetConnect - a powerful file management solution for CodeIgniter 4 applications.
What is AssetConnect?
AssetConnect is a robust file management library that allows you to associate files with any entity in your application. It provides a flexible, type-safe API for handling file uploads, storage, and retrieval with powerful features.
Key Features ✨
•
Entity Association: Easily attach files to any entity in your application (users, products, posts, etc.)
•
Collections: Organize files into logical groups with specific rules and constraints
•
Custom Properties: Store and retrieve metadata with your files
•
Type-safe API: Full IDE support with strong typing
•
Secure Access Control: Built-in authorization checks for file access
•
Filtering System: Powerful query capabilities to find exactly the files you need
•
Queue Integration: Background processing for file operations
Example Usage ?
PHP Code:
// Add an asset to a user
$asset = $user->addAsset('/path/to/file.jpg')
->withCustomProperties([
'title' => 'Profile Picture',
'description' => 'User profile picture'
])
->toAssetCollection(ImagesCollection::class);
// Get assets from a specific collection
$images = $user->getAssets(ImagesCollection::class);
// Get the URL to an asset
$url = $user->getFirstAsset()->getUrl();
Why Use AssetConnect?
•
Simplified File Management: No more complex file handling code scattered throughout your application
•
Flexible & Extensible: Create custom collections with specific rules for different types of files
•
Performance Optimized: Background processing for heavy operations
•
Secure By Design: Built with security best practices
Documentation & Resources ?
I've created comprehensive documentation that covers everything from basic usage to advanced configurations:
•
Documentation:
https://maniaba.github.io/asset-connect/
•
GitHub Repository:
https://github.com/maniaba/asset-connect
Get Involved! ?
I'd love for you to try out AssetConnect in your projects and provide feedback! There are several ways to contribute:
1.
Try it out: Install it in your project and let me know how it works for you
2.
Report issues: Found a bug or have a suggestion? Open an issue on GitHub
3.
Contribute code: Pull requests are welcome! Check out the CONTRIBUTING.md file for guidelines
4.
Spread the word: If you find it useful, share it with others in the CodeIgniter community
Requirements
• PHP 8.3 or higher
• CodeIgniter 4.6 or higher
• CodeIgniter Queue
Let me know if you have any questions or need help getting started! I'm excited to see how you'll use AssetConnect in your projects! ?