Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

465 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Balance Your Checkbook

The Website and API

Development Setup

Prerequisites

  • PHP 8.x
  • MySQL
  • Composer
  • Node.js & NPM

Installation

  1. Clone the repository

  2. Install PHP dependencies:

    composer install
  3. Install NPM dependencies:

    npm install
  4. Copy environment file:

    cp .env.example .env
  5. Configure your .env file with database credentials and other settings

  6. Generate application key:

    php artisan key:generate
  7. Run database migrations:

    php artisan migrate
  8. Install Laravel Passport:

    php artisan passport:install
  9. Create Passport clients (if not already created):

    # Create personal access client (for API tokens)
    php artisan passport:client --personal
    
    # Create password grant client (for web authentication)
    php artisan passport:client --password

Testing

Test Database Setup

For running tests, you need a separate test database to avoid affecting your development data.

  1. Create a test database:

    CREATE DATABASE laravel_balance_test;
    GRANT ALL PRIVILEGES ON laravel_balance_test.* TO 'your_db_user'@'localhost';
  2. Create .env.testing file:

    cp .env .env.testing
  3. Update .env.testing with test database configuration:

    APP_ENV=testing
    DB_CONNECTION=mysql
    DB_DATABASE=laravel_balance_test
    CACHE_DRIVER=array
    SESSION_DRIVER=array
    QUEUE_CONNECTION=sync
  4. Run migrations on test database:

    php artisan migrate:fresh --env=testing

Running Tests

Run all tests:

php artisan test

Run tests and stop on first failure:

php artisan test --stop-on-failure

Run specific test file:

php artisan test tests/Feature/Admin/UsersControllerTest.php

Run specific test method:

php artisan test --filter="test_method_name"

Test Database Management

The test database uses DatabaseTransactions trait, which means:

  • Each test runs in a transaction that gets rolled back after the test
  • Data from one test doesn't affect another test
  • Your development database remains untouched

To refresh the test database schema:

php artisan migrate:fresh --env=testing

Development

Starting the Development Server

php artisan serve

Building Assets

Development build:

npm run dev

Production build:

npm run build

Watch for changes:

npm run watch

About

The BalanceCloud main site and API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages