This project is built with Laravel 11, providing functionalities for deposits and withdrawals. It includes asynchronous processing, Redis caching, testing with Pest, comprehensive API documentation using Scribe and simple authorization.
- Deposit and Withdrawal: Allows users to deposit and withdraw funds from their wallet.
- Asynchronous Processing: Uses event-driven architecture for processing transactions asynchronously.
- Redis Caching: Implements Redis caching for frequently accessed data to improve performance.
- Detailed Logging: Includes detailed logging for transactions and error handling.
- Automated Testing: Contains unit tests and integration tests using Pest to ensure code quality.
- API Documentation: Generates comprehensive API documentation using Scribe.
- Role-based Access Control: Uses
spatie/laravel-permission
to manage roles and permissions.
- Laravel: The PHP framework used for building the application.
- Redis: Used for caching frequently accessed data.
- Scribe: Generates API documentation.
- Pest: Used for unit and integration testing.
- Laravel Horizon: Manages Redis queues.
- spatie/laravel-permission: Manages roles and permissions for RBAC.
- GuzzleHTTP: Simplifies HTTP requests and integrations.
- Event-Driven Architecture: Uses events and listeners for asynchronous processing.
- Redis Caching: Implements caching strategy to improve performance.
- Automated Testing: Ensures code quality through unit and integration tests.
- API Documentation: Generates API documentation automatically.
- Role-based Access Control (RBAC): Manages user roles and permissions.
-
Clone the repository:
git clone https://github.com/andynur/rapid-wallet.git cd rapid-wallet
-
Install dependencies:
composer install yarn # or npm install
-
Copy the
.env
file and configure your environment variables:cp .env.example .env
-
Generate application key:
php artisan key:generate
-
Set up the database and run migrations:
php artisan migrate
-
Seed the database with roles and permissions:
php artisan db:seed
-
Start the local development server:
php artisan serve
-
Start the queue listener
php artisan queue:work
Access the login page at http://localhost:8000/login
.
Run the unit and integration tests using Pest:
php artisan test
Generate API documentation using Scribe:
php artisan scribe:generate
Access the generated documentation at http://localhost:8000/docs
.
This project uses spatie/laravel-permission
to manage roles and permissions. The default roles are:
- Admin: Has access to all endpoints and can manage users.
- User: Has access to their own transactions and wallet operations.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Make your changes and commit them (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Create a new Pull Request.
This project is licensed under the MIT License.