This starter kit provides a fully implemented backend solution based on the Mojura Architecture concepts, designed to speed up your development process. It includes robust features for authentication, authorization, user management, and security, making it a comprehensive starting point for building scalable applications.
-
Authentication
- Login: Secure user authentication with token-based login.
- Logout: Options for logging out from a single session or all active sessions.
- Profile Management: Retrieve and update user profile information.
-
Authorization
- Authorize Middleware: Enforce role-based access control (RBAC) with flexible permission management.
- UserCheck Middleware: Additional checks for user-specific access control.
- Role & Abilities Management: Manage roles and permissions using ICRUD (Interface-based CRUD operations).
- CASL Compatibility: Seamless integration with CASL, a powerful JavaScript library for frontend authorization.
-
User Management
- ICRUD-based User Management: Full support for user creation, updating, deletion, and listing, following the ICRUD principles.
-
Snowflake ID Integration
- Generate unique IDs for entities, ensuring distributed, collision-free identifiers across the application.
-
Telescope Integration
- Integrated with Laravel Telescope, providing powerful debugging and monitoring tools, secured with web-based authentication for access control.
This starter kit ensures you can quickly build secure, scalable, and manageable applications with ease while adhering to the best practices laid out by Mojura Architecture.
This system follows the ICRUD (Interface-based CRUD) principles for efficient and flexible management of resources. The main operations include:
-
Index: A comprehensive mechanism for bulk resource retrieval via a single endpoint, with support for:
- Listing: Fetch a list of resources.
- Filtering: Filter resources based on specified criteria.
- Searching: Search resources using keywords or advanced queries.
- Sorting: Sort resources by one or more fields.
- Pagination: Paginate results for efficient data handling.
-
Create: Add a new resource to the system.
-
Read: Retrieve detailed information for a specific resource.
-
Update: Modify an existing resource.
-
Delete: Remove a resource from the system.
composer install
cp .env.example .env #Don't forget to configure your .env file
php artisan key:generate
php artisan migrate
php artisan db:seed
php artisan storage:link
php artisan vendor:publish --tag=mojura-config
php artisan vendor:publish --tag=mojura-stubs
php artisan jwt:keys
- You may need to install 'openssl' when using windows command prompt. If you are using GitBash or Linux Shell, it won't be a problem.
- The folder
storage/app/private/jwt
is pre-created in starter kit to store generated private and public key files.
php artisan telescope:install
# run dev server
php artisan serve