API backend for the P24H personal finance management application.
Before you begin, ensure you have the following installed on your system:
- PHP 8.4+ with required extensions:
- PDO
- BCMath
- Ctype
- Fileinfo
- JSON
- Mbstring
- OpenSSL
- PDO
- Tokenizer
- XML
- Composer 2.x
- Node.js 21+ and npm
git clone https://github.com/EvanPerreau/P24H-API.git
cd P24H-APIcomposer installnpm installCopy the example environment file and modify it according to your local setup:
cp .env.example .envEdit the .env file to configure your database connection:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=p24h
DB_USERNAME=your_username
DB_PASSWORD=your_password
php artisan key:generatephp artisan migrateStart the Laravel development server:
php artisan serveThe API will be available at http://localhost:8000.
Compile frontend assets with Vite:
npm run devLaravel provides a convenient way to run all services at once:
composer devThis will start:
- Laravel server
- Queue worker
- Log watcher
- Vite development server
The API is documented using Swagger/OpenAPI. To view the documentation:
- Generate the Swagger documentation:
php artisan l5-swagger:generate- Visit
http://localhost:8000/api/documentationin your browser.
Run the test suite with:
php artisan testThis project is licensed under the MIT License - see the LICENSE file for details.