-
--->
-
-
-
-# SecPal API
+# SecPal API
-
-
-> Laravel backend API for SecPal - Digital guard book and security service management
-
-[](https://reuse.software/)## About Laravel
+> Laravel backend API for SecPal - Digital guard book and security service management
+[](https://reuse.software/)
[](LICENSE)
-Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
-
## About
-- [Simple, fast routing engine](https://laravel.com/docs/routing).
+SecPal API is the backend service for the SecPal platform, built with Laravel 12 and PostgreSQL. It provides a RESTful API for managing security service operations, guard books, and related functionality.
-SecPal API is the backend service for the SecPal platform, built with Laravel 12 and PostgreSQL. It provides a RESTful API for managing security service operations, guard books, and related functionality.- [Powerful dependency injection container](https://laravel.com/docs/container).
-
-- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
-
-## Tech Stack- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
-
-- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
-
-- **Framework:** Laravel 12- [Robust background job processing](https://laravel.com/docs/queues).
-
-- **Database:** PostgreSQL- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
+## Tech Stack
+- **Framework:** Laravel 12
+- **Database:** PostgreSQL
- **Testing:** PEST
-
-- **Code Style:** Laravel Pint (PSR-12)Laravel is accessible, powerful, and provides tools required for large, robust applications.
-
+- **Code Style:** Laravel Pint (PSR-12)
- **Static Analysis:** PHPStan (Level Max) with Larastan
+- **PHP Version:** 8.4+
-- **PHP Version:** 8.4+## Learning Laravel
-
-## RequirementsLaravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
-
-- PHP 8.4 or higherYou may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
+## Requirements
+- PHP 8.4 or higher
- Composer 2.x
-
-- PostgreSQL 15+ or 16+If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
-
+- PostgreSQL 15+ or 16+
- Extensions: `mbstring`, `xml`, `ctype`, `iconv`, `intl`, `pdo_pgsql`
-## Laravel Sponsors
-
## Installation
-We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
-
### 1. Clone the repository
-### Premium Partners
-
-````bash
-
-git clone https://github.com/SecPal/api.git- **[Vehikl](https://vehikl.com)**
-
-cd api- **[Tighten Co.](https://tighten.co)**
-
-```- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
-
-- **[64 Robots](https://64robots.com)**
-
-### 2. Install dependencies- **[Curotec](https://www.curotec.com/services/technologies/laravel)**
-
-- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
-
-```bash- **[Redberry](https://redberry.international/laravel-development)**
-
-composer install- **[Active Logic](https://activelogic.com)**
+```bash
+git clone https://github.com/SecPal/api.git
+cd api
+```
-````
+### 2. Install dependencies
-## Contributing
+```bash
+composer install
+```
### 3. Configure environment
-Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
-
-````bash
-
-cp .env.example .env## Code of Conduct
-
+```bash
+cp .env.example .env
php artisan key:generate
+```
-```In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
-
-
-
-Edit `.env` and configure your database:## Security Vulnerabilities
-
-
-
-```envIf you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
+Edit `.env` and configure your database:
+```env
DB_CONNECTION=pgsql
-
-DB_HOST=127.0.0.1## License
-
+DB_HOST=127.0.0.1
DB_PORT=5432
-
-DB_DATABASE=secpalThe Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
-
+DB_DATABASE=secpal
DB_USERNAME=your_username
DB_PASSWORD=your_password
-````
+```
### 4. Run migrations
@@ -142,11 +87,11 @@ php artisan migrate
php artisan serve
```
-The API will be available at `http://localhost:8000`.
+The API will be available at .
### Code Quality
-#### Code Style (Laravel Pint)
+**Code Style (Laravel Pint):**
```bash
# Check code style
@@ -156,13 +101,13 @@ The API will be available at `http://localhost:8000`.
./vendor/bin/pint
```
-#### Static Analysis (PHPStan)
+**Static Analysis (PHPStan):**
```bash
./vendor/bin/phpstan analyse
```
-#### Testing (PEST)
+**Testing (PEST):**
```bash
# Run all tests
@@ -210,13 +155,12 @@ git push --no-verify
## Project Structure
-```
+```text
api/
├── app/ # Application code
│ ├── Http/ # Controllers, Middleware, Requests, Resources
│ ├── Models/ # Eloquent models
-│ ├── Services/ # Business logic
-│ └── Repositories/ # Data access layer
+│ └── Providers/ # Service providers
├── config/ # Configuration files
├── database/ # Migrations, factories, seeders
├── routes/ # API routes
@@ -224,7 +168,7 @@ api/
│ ├── Unit/ # Unit tests
│ └── Feature/ # Feature/Integration tests
├── scripts/ # Development scripts
-└── docs/ # Additional documentation
+└── storage/ # Logs, cache, uploads
```
## API Documentation
@@ -239,15 +183,8 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc
The `main` branch is protected with the following rules:
-- Required status checks must pass:
- - REUSE Compliance
- - License Compatibility
- - Laravel Pint
- - PHPStan
- - PEST Tests
- - Formatting Check
- - CodeQL Analysis
-- Pull request reviews (0 required for single maintainer, will increase)
+- Required status checks must pass
+- Pull request reviews required
- Conversations must be resolved
- Force pushes are disabled
- Deletions are disabled
diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php
index 8677cd5..02fa486 100644
--- a/app/Http/Controllers/Controller.php
+++ b/app/Http/Controllers/Controller.php
@@ -1,5 +1,8 @@
withRouting(
- web: __DIR__.'/../routes/web.php',
+ api: __DIR__.'/../routes/api.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore
index d6b7ef3..21a2ce2 100644
--- a/bootstrap/cache/.gitignore
+++ b/bootstrap/cache/.gitignore
@@ -1,2 +1,5 @@
+# SPDX-FileCopyrightText: 2025 SecPal Contributors
+# SPDX-License-Identifier: CC0-1.0
+
*
!.gitignore
diff --git a/bootstrap/providers.php b/bootstrap/providers.php
index 38b258d..810f842 100644
--- a/bootstrap/providers.php
+++ b/bootstrap/providers.php
@@ -1,5 +1,8 @@
+
+
+
Options -MultiViews -Indexes
diff --git a/public/favicon.ico b/public/favicon.ico
deleted file mode 100644
index e69de29..0000000
diff --git a/public/index.php b/public/index.php
index ee8f07e..788f1be 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,5 +1,8 @@
-
-
-
-
-
- {{ config('app.name', 'Laravel') }}
-
-
-
-
-
-
- @if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot')))
- @vite(['resources/css/app.css', 'resources/js/app.js'])
- @else
-
- @endif
-
-
-
- @if (Route::has('login'))
-
- @endif
-
-
-
-
-
Let's get started
-
Laravel has an incredibly rich ecosystem. We suggest starting with the following.