Pierakstspie API is a Laravel-based backend that powers the Pierakstspie.lv booking platform, providing secure authentication (Laravel Sanctum), user and role management, client and contact handling with custom fields, service and schedule management, and integration with a Next.js frontend, and extensions such as invoicing and financial reporting.
- PHP >= 8.1
- Composer
- A MySQL database server
-
Clone the repository:
git clone https://github.com/TrakaMeitene/laravel-backend.git cd laravel-backend -
Install dependencies:
composer install npm install
-
Configure environment:
cp .env.example .env # Configure database credentials and other environment variables in .env -
Generate application key:
php artisan key:generate
-
Database migrations:
php artisan migrate
-
Start the development server (if applicable, depends on app specifics):
php artisan serve
laravel-backend/
├── app/
├── artisan
├── bootstrap/
├── config/
├── database/
│ ├── migrations/
│ └── seeders/
├── lang/
├── package-lock.json
├── package.json
├── phpunit.xml
├── public/
├── resources/
├── routes/
├── storage/
├── tests/
└── vite.config.js
Configuration is primarily managed through the .env file (created by copying .env.example). This file contains database credentials, API keys, and other environment-specific settings. Laravel's built-in configuration system is also used, with settings stored within the config directory.
The .env.example file provides examples of required environment variables. These should be populated in the .env file before running the application. Specific variables and their purpose will depend on the features of this particular application.
The project utilizes PHPUnit for testing. Test cases are located in the tests directory. To run tests:
./vendor/bin/phpunitMade with ❤️ by TrakaMeitene