sissokho / expense-tracker

This is a simple Expense Tracker built with Laravel, Livewire and Laravel Jetstream.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expense tracker

This is a simple Expense Tracker built with Laravel, Livewire and Laravel Jetstream.

Screenshot 2022-11-09 at 11-55-45 Laravel

Screenshot 2022-11-09 at 11-56-06 Laravel

Screenshot 2022-11-09 at 11-56-15 Laravel

Screenshot 2022-11-09 at 11-56-24 Laravel

Requirements

The following tools are required in order to install and run the project locally.

  • PHP 8.1
  • Composer
  • PHP intl extension

Installation

  1. Clone the repo
# with https
git clone https://github.com/sissokho/expense-tracker.git
# with ssh
git clone git@github.com:sissokho/expense-tracker.git
  1. Navigate into the project's root directory
cd expense-tracker
  1. Copy .env.example file to .env
cp .env.example .env
  1. Create a local database with a name of your choice

  2. Edit .env file and set your database connection details

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=xxx
DB_USERNAME=xxx
DB_PASSWORD=xxx
  1. Install composer dependencies
composer install
  1. Generate application key
php artisan key:generate
  1. Run database migrations and seed the database
php artisan migrate --seed
  1. Install npm dependencies
npm install
  1. Run the Vite development server
npm run dev
  1. Run the dev server
php artisan serve

It is ready! You can login into a test account using the following credentials:

Github Authentication

To get Github authentication to work locally, you'll need to register a new OAuth application on Github. Use http://localhost:8000/oauth/callback for the callback url. When you've created the app, fill in the ID and secret in your .env file in the env variables below. You should now be able to authenticate with Github.

GITHUB_ID=
GITHUB_SECRET=
GITHUB_URL=http://localhost:8000/oauth/callback

Testing

You can run PHPUnit tests, PHPStan/Larastan static analysis and inspect the code for style errors without changing the files (with Laravel Pint):

composer test

However, you can run these tests separately.

  • Static analysis:
composer test:types
# or
./vendor/bin/phpstan analyse
  • PHPUnit tests:
composer test:unit
# or
php artisan test
  • Code inspection:
composer test:lint
# or
./vendor/bin/pint --test -v

To fix code style issues, run the following command:

composer lint
# or
./vendor/bin/pint -v

License

The MIT License (MIT). Please see License File for more information.

About

This is a simple Expense Tracker built with Laravel, Livewire and Laravel Jetstream.

License:MIT License


Languages

Language:PHP 68.7%Language:Blade 30.8%Language:JavaScript 0.5%Language:CSS 0.0%