Wallet Master is an API-based Financial Management System built with Laravel 11, designed for managing users, roles, organizations, accounts, transactions, budgets, family members, and subscription plans.
- Features
- Requirements
- Installation
- Configuration
- Database Setup
- Seeding the Database
- API Usage
- Running with Laravel Sail
- Testing
- License
- Role-Based Access Control: Roles like Admin, Manager, and Regular User with assigned permissions
- Organization Management: User management within organizations with subscription plans
- Financial Management: Account, transaction, budget, and category management
- Family Member Access: Shared accounts and permissions for family members
- Docker and Docker Compose (for Laravel Sail)
- PHP 8.2+ (if not using Sail)
- MySQL 5.7+ or MariaDB (if not using Sail)
- Composer
- Laravel 11.x
-
Clone the Repository
git clone https://github.com/ronykader/wallet-master.git cd wallet-master -
Install Dependencies
composer install
-
Environment Configuration
- Copy the
.env.examplefile to.env:cp .env.example .env
- Update the
.envfile with your database and other environment configurations:DB_CONNECTION=mysql DB_HOST=mysql DB_PORT=3306 DB_DATABASE=your_database_name DB_USERNAME=your_database_username DB_PASSWORD=your_database_password
- Copy the
-
Generate Application Key
php artisan key:generate
-
Run Migrations
php artisan migrate
-
Database Seeding
- Seed the database with essential data like roles, subscription plans, and organizations:
php artisan db:seed
-
Run the Development Server
php artisan serve
-
Base URL Access the API at
http://127.0.0.1:8000/api. -
Authentication
- The API uses JWT or Sanctum for authentication. Configure this in the
.envfile and authenticate usingBearer <token>for each request. - To obtain a token, register a user or log in and use the
/api/loginendpoint.
- The API uses JWT or Sanctum for authentication. Configure this in the
-
API Endpoints
-
The main endpoints for the API include:
-
User Management:
POST /api/register- Register a new userPOST /api/login- Log in and obtain an auth tokenGET /api/user- Retrieve authenticated user details
-
Organization Management:
GET /api/organizations- List all organizationsPOST /api/organizations- Create a new organization (Admin only)
-
Account Management:
GET /api/accounts- List user accountsPOST /api/accounts- Create a new accountGET /api/accounts/{id}- View account details
-
Transaction Management:
GET /api/transactions- List transactionsPOST /api/transactions- Create a new transaction
-
Budget Management:
GET /api/budgets- List budgetsPOST /api/budgets- Set a new budget
-
Family Member Management:
GET /api/family-members- List family membersPOST /api/family-members- Add a new family member
-
-
Detailed API documentation is available in the
docsfolder or by using tools like Postman to import available routes.
-
Laravel Sail provides a Docker-powered local development environment:
-
Install Sail
composer require laravel/sail --dev
-
Initialize Sail
php artisan sail:install
Follow the prompts to set up Sail with MySQL (or your preferred database).
-
Start the Docker Containers
./vendor/bin/sail up -d
-
Access the Application The app will be accessible at
http://localhostonce the Docker containers are up and running. -
Running Migrations with Sail
./vendor/bin/sail artisan migrate
-
Running Seeders with Sail
./vendor/bin/sail artisan db:seed
Run unit and feature tests using Sail:
./vendor/bin/sail artisan test