Skip to content

A high performance digital wallet built with Laravel 12, Inertia.js v2, and Vue.js 3. It enables secure money transfers between users with real time updates powered by Pusher.

Notifications You must be signed in to change notification settings

bhaidar/mini-wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini Wallet Application

A high performance digital wallet built with Laravel 12, Inertia.js v2, and Vue.js 3. It enables secure money transfers between users with real time updates powered by Pusher.

Features

• User authentication using Laravel Breeze
• Secure money transfers between users
• Commission fee of one point five percent on all transfers
• Real time transaction updates through Pusher and Laravel Echo
• Full transaction history with debit and credit tracking
• Race condition prevention with database locks
• Integer based monetary calculations using cents
• Responsive interface using Tailwind CSS v3
• Built in form validation and error handling

Technology Stack

Backend Laravel 12.38.1
Frontend Vue.js 3.5.24
Server Side Rendering Inertia.js v2.0.10
UI Framework Tailwind CSS v3.4.18
Real time Pusher Broadcasting with Laravel Echo
Database MySQL 8.0 and above
Authentication Laravel Sanctum v4.2.0
Testing Pest v4.1.3
Code Formatting Laravel Pint v1.25.1
PHP 8.4.14

Architecture Highlights

High Concurrency Handling

The app uses pessimistic locking through lockForUpdate to ensure data integrity under heavy load.

Precision with Integer Arithmetic

All money values are stored as cents to avoid floating point errors.

Scalable Balance Management

Balances are stored directly on the users table and updated atomically.

Atomic Transactions

Every transfer action runs inside a database transaction.

Real time Broadcasting

Uses Laravel Echo with Pusher for instant updates.

Prerequisites

• PHP 8.4 or newer
• Composer
• Node.js 16 or newer
• MySQL 8 or newer
• A Pusher account

Installation and Setup

Step 1 Clone the repository

Step 2 Install PHP dependencies

  • composer install

Step 3 Create environment file

  • cp .env.example .env

Step 4 Start Sail

  • ./vendor/bin/sail up -d

Step 5 Install Node dependencies

  • ./vendor/bin/sail npm install

Step 6 Generate app key

  • ./vendor/bin/sail artisan key:generate

Step 7 Run migrations

  • ./vendor/bin/sail artisan migrate

Step 8 Seed demo data

  • ./vendor/bin/sail artisan db:seed

Step 9 Configure Pusher

  • Sign up at https://pusher.com and create a new Channels app.
  • Update .env with your Pusher credentials:
BROADCAST_DRIVER=pusher
QUEUE_CONNECTION=database

PUSHER_APP_ID=your_app_id
PUSHER_APP_KEY=your_app_key
PUSHER_APP_SECRET=your_app_secret
PUSHER_APP_CLUSTER=your_cluster

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

Step 10 Build frontend assets

  • ./vendor/bin/sail npm run build

Running the Application

Terminal 1
./vendor/bin/sail up

Terminal 2
./vendor/bin/sail npm run dev

Terminal 3
./vendor/bin/sail artisan queue:work

The app is available at http://localhost

Test Users

[email protected] password
[email protected] password
[email protected] password
[email protected] password
[email protected] password

Troubleshooting

  • Ensure queue worker is running
  • Verify Pusher credentials
  • Run Sail logs

Contact

Open an issue in the repository.

About

A high performance digital wallet built with Laravel 12, Inertia.js v2, and Vue.js 3. It enables secure money transfers between users with real time updates powered by Pusher.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published