This is a simple Expense Tracker built with Laravel, Livewire and Laravel Jetstream.
The following tools are required in order to install and run the project locally.
- PHP 8.1
- Composer
- PHP intl extension
- 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
- Navigate into the project's root directory
cd expense-tracker
- Copy .env.example file to .env
cp .env.example .env
-
Create a local database with a name of your choice
-
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
- Install composer dependencies
composer install
- Generate application key
php artisan key:generate
- Run database migrations and seed the database
php artisan migrate --seed
- Install npm dependencies
npm install
- Run the Vite development server
npm run dev
- Run the dev server
php artisan serve
It is ready! You can login into a test account using the following credentials:
- Username: test@gmail.com
- Password: password
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
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
The MIT License (MIT). Please see License File for more information.