Skip to content
Md Sazzadul islam edited this page Jun 1, 2024 · 2 revisions

Passport Management System Documentation

Welcome to the Passport Management System's documentation! This wiki serves as a comprehensive guide to help you set up, use, and contribute to the project.

Dashboard

Screenshot_1

Create Passport

Screenshot_2

Table of Contents

  1. Introduction
  2. Getting Started
  3. Database Structure
  4. Web Routes
  5. Controllers
  6. Models
  7. Views
  8. Menu Overview
  9. Dependencies
  10. Contributing
  11. License

Introduction

The Passport Management System is designed to manage the issuance and administration of passports. It includes features such as user authentication, passport management, medical status tracking, and payment handling.

Getting Started

Prerequisites

  • PHP >= 8.0.2
  • Composer
  • MySQL
  • Laravel >= 9.x

Installation

  1. Clone the repository:

    git clone https://github.com/md-sazzadul-islam/passport-management-system.git
    cd passport-management-system
  2. Install dependencies:

    composer install
  3. Copy the .env file and configure your environment variables:

    cp .env.main .env
  4. Generate the application key:

    php artisan key:generate
  5. Create storage link:

    php artisan storage:link
  6. Import SQL:

     File: passport.sql 
  7. Start the development server:

    php artisan serve

Database Structure

The database schema includes the following tables:

  • agents
  • failed_jobs
  • medical_reports
  • medical_statuses
  • migrations
  • model_has_permissions
  • model_has_roles
  • mycontes
  • oauth_access_tokens
  • oauth_auth_codes
  • oauth_clients
  • oauth_personal_access_clients
  • oauth_refresh_tokens
  • passports
  • password_resets
  • payments
  • permissions
  • positions
  • references
  • role_has_permissions
  • roles
  • selection_statuses
  • settings
  • users

Refer to the database/schema.sql file for detailed table structures and relationships.

Web Routes

The web.php file defines the web routes for the application. Here are the key routes:

Authentication Routes

Route::get('/', 'Auth\LoginController@showLoginForm')->name('login');
Route::post('login', 'Auth\LoginController@login');
Route::post('logout', 'Auth\LoginController@logout')->name('logout');
Route::get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
Route::post('register', 'Auth\RegisterController@register');
Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
Route::post('password/reset', 'Auth\ResetPasswordController@reset');

Protected Routes

Routes that require authentication:

Route::group(['middleware' => 'auth'], function () {
    Route::get('/home', 'HomeController@index')->name('home');
    Route::resource('settings', 'SettingController');
    Route::resource('positions', 'PositionController');
    Route::resource('users', 'UserController');
    Route::get('change_password', 'UserController@change_password')->name('change_password');
    Route::post('change_password_update', 'UserController@change_password_update')->name('change_password_update');
    Route::resource('selectionStatuses', 'SelectionStatusController');
    Route::resource('references', 'ReferenceController');
    Route::resource('medicalStatuses', 'MedicalStatusController');
    Route::resource('passports', 'PassportController');
    Route::resource('medicalReports', 'MedicalReportController');
    Route::resource('agents', 'AgentController');
    Route::resource('mycontes', 'MyconteController');
    Route::resource('payments', 'PaymentController');
    Route::get('payment_report', 'PaymentController@report')->name('payment_report');
});

Controllers

Controllers handle the logic behind the routes and interactions with models. Here are the main controllers:

  • Auth\LoginController
  • Auth\RegisterController
  • Auth\ForgotPasswordController
  • Auth\ResetPasswordController
  • HomeController
  • SettingController
  • PositionController
  • UserController
  • SelectionStatusController
  • ReferenceController
  • MedicalStatusController
  • PassportController
  • MedicalReportController
  • AgentController
  • MyconteController
  • PaymentController

Each controller is located in the app/Http/Controllers directory and follows Laravel's conventions.

Models

Models represent the database tables and are used for database interactions. Key models include:

  • User
  • Passport
  • Agent
  • MedicalReport
  • MedicalStatus
  • Payment
  • Permission
  • Role
  • Position
  • Reference
  • Setting

Each model is located in the app/Models directory.

Views

Views are located in the resources/views directory and are written in Blade, Laravel's templating engine. Key views include:

  • auth (login, register, passwords)
  • home.blade.php
  • layouts (app.blade.php, etc.)
  • settings (index, create, edit)
  • positions (index, create, edit)
  • users (index, create, edit)
  • selectionStatuses (index, create, edit)
  • references (index, create, edit)
  • medicalStatuses (index, create, edit)
  • passports (index, create, edit)
  • medicalReports (index, create, edit)
  • agents (index, create, edit)
  • mycontes (index, create, edit)
  • payments (index, create, edit, report)

Menu Overview

The application includes a sidebar menu for easy navigation. Here is an overview of the available menu items:

  1. Dashboard

    • Overview of the system and key metrics.
  2. Positions

    • Manage job positions.
    • Routes: positions.index, positions.create, positions.edit
  3. Selection Status

    • Track the status of selections.
    • Routes: selectionStatuses.index, selectionStatuses.create, selectionStatuses.edit
  4. References

    • Manage references.
    • Routes: references.index, references.create, references.edit
  5. Medical Status

    • Track medical statuses.
    • Routes: medicalStatuses.index, medicalStatuses.create, medicalStatuses.edit
  6. Medical Report Status

    • Manage medical reports.
    • Routes: medicalReports.index, medicalReports.create, medicalReports.edit
  7. Agents

    • Manage agents.
    • Routes: agents.index, agents.create, agents.edit
  8. Passports List

    • View and manage passports.
    • Routes: passports.index, passports.create, passports.edit
  9. Payments

    • Manage payments.
    • Routes: payments.index, payments.create, payments.edit
  10. Payment Report

    • View payment reports.
    • Route: payment_report
  11. Settings

    • Manage system settings.
    • Routes: settings.index, settings.create, settings.edit
  12. Users

    • Manage users.
    • Routes: users.index, users.create, users.edit

Contributing

We welcome contributions from the community! If you'd like to contribute, please fork the repository and submit a pull request. Make sure to follow the contribution guidelines.

Contact

Md Sazzadul Islam

Project Link: https://github.com/md-sazzadul-islam/passport-management-system

License

This project is open-source and licensed under the MIT License. See the LICENSE file for more information.


This documentation is designed to give you a thorough understanding of the Passport Management System. If you have any questions or need further assistance, feel free to open an issue on GitHub. Happy coding!