A Laravel 12 application for managing and tracking information about affected individuals in Kochani, providing both an admin panel and API endpoints for data access.
This application serves as a management system for tracking individuals affected by a disaster in Kochani. It provides:
- Admin Panel: A Filament-powered dashboard for managing records of affected individuals
- API: Endpoints for accessing data programmatically
- Data Management: Tools for importing, updating, and tracking donation information
The application includes a comprehensive admin panel built with Filament that provides:
- Complete CRUD operations for managing affected individuals
- Searchable and filterable tables
- Donation tracking and management
- Custom actions for updating donation amounts
- Global search functionality
The application exposes the following API endpoints:
GET /api/hurt-people: Returns a list of all affected individuals
The core data model (HurtPerson) includes fields for:
- Personal information (name, surname, parent details)
- Contact information (phone number)
- Location data (city, country, latitude, longitude)
- Banking details (transaction account, IBAN, SWIFT)
- Donation tracking (amount, confirmation status)
- PHP 8.2+
- Composer
- MySQL or compatible database
- Node.js & NPM (for frontend assets)
-
Clone the repository:
git clone https://github.com/yourusername/support-kochani-api.git cd support-kochani-api -
Install PHP dependencies:
composer install
-
Install and compile frontend assets:
npm install npm run build
-
Create and configure your environment file:
cp .env.example .env php artisan key:generate
-
Configure your database connection in the
.envfile:DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=support_kochani DB_USERNAME=your_username DB_PASSWORD=your_password -
Run database migrations:
php artisan migrate
-
(Optional) Seed the database with sample data:
php artisan db:seed --class=HurtPersonSeeder
Note: This requires a CSV file at
storage/app/supportkocani.mk - web|en|povredeni.csv -
Create a user for the admin panel:
php artisan make:filament-user
-
Start the development server:
php artisan serve
Access the admin panel at http://localhost:8000/admin and log in with your credentials.
The admin panel allows you to:
- View and manage all affected individuals
- Filter and search records
- Update donation amounts
- Track donation confirmation status
The API can be accessed at the following endpoint:
GET http://localhost:8000/api/hurt-people
This returns a JSON collection of all affected individuals in the database.
The application includes a seeder for importing data from a CSV file. The CSV should be placed at:
storage/app/supportkocani.mk - web|en|povredeni.csv
The CSV should use semicolons (;) as delimiters and include the following columns:
- children
- parents
- phone number
- transaction
- city
- country
- amount
- latitude
- longitude
- iban
- swift
- address
- iban_account_holder
- donations confirmed
Run the seeder with:
php artisan db:seed --class=HurtPersonSeederThis project is open-sourced software licensed under the MIT license.