This project is a Laravel 10-based library management system. It includes features for managing books, borrow records, and more. The project uses various tools and libraries, including Swagger for API documentation.
- PHP 8.1 or higher
- Composer
- Laravel 10.x
- MySQL or another supported database
- Node.js and npm (for running frontend assets)
- Swagger (for API documentation)
git clone https://github.com/amowogbaje/library-management-system-api.git
cd library-management-system-api
Run the following commands to install PHP and JavaScript dependencies:
composer install
Copy the example environment file and configure your environment settings:
cp .env.example .env
Edit the .env
file to configure your database and other environment variables. For example:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=library_db
DB_USERNAME=root
DB_PASSWORD=
Generate a new application key:
php artisan key:generate
Run migrations and seed the database with sample data:
php artisan migrate --seed
Start the Laravel development server:
php artisan serve
The application will be available at http://127.0.0.1:8000
.
API documentation is available at:
To run the tests for the application, use the following command:
php artisan test
Alternatively, you can run PHPUnit directly:
./vendor/bin/phpunit
For a visual representation of the database schema, refer to the DB Diagram.
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries, please contact [email protected].