Works

AMVRS ARMED - Armed Forces Vehicle Request & Management System

A comprehensive web-based vehicle request and approval management system designed for armed forces personnel.

GitHub License PHP Version MySQL

📋 Overview

AMVRS ARMED is a robust vehicle management system built for armed forces operations. It enables personnel to request vehicles, track request status, and provides administrators with management tools for approvals and vehicle inventory.

Quick Stats

✨ Core Features

For Drivers/Users

For Administrators

For Approvers

🚀 Getting Started

Requirements

Installation

  1. Clone the repository
    git clone https://github.com/ajiko2505/Works.git
    cd Works
    
  2. Setup Database
    # Using MySQL command line
    mysql -u root -p < database/amvrss.sql
       
    # Or manually:
    # - Open phpMyAdmin
    # - Create database: amvrss
    # - Import: database/amvrss.sql
    
  3. Configure Environment
    # Copy environment template
    cp .env.example .env
       
    # Edit .env with your settings
    # - Database credentials
    # - SMTP settings for email
    # - Admin email address
    
  4. Install Dependencies
    composer install
    
  5. Run Application
    • Start your web server (XAMPP, WAMP, etc.)
    • Visit: http://localhost/Works
    • Default login: admin / password (change immediately!)

📁 Project Structure

Works/
├── assets/
│   └── css/
│       ├── global_styles.css
│       ├── modern_ui.css          # Modern design system
│       ├── header_style.css
│       └── register_style.css
├── database/
│   └── amvrss.sql                 # Database schema
├── tests/
│   ├── bootstrap.php              # PHPUnit setup
│   └── HelpersTest.php            # Unit tests
├── PHPmailer/                      # Email library
├── logs/                           # Error & audit logs
├── .github/workflows/              # CI/CD pipelines
│
├── Core Files
├── index.php                       # Dashboard
├── header.php                      # Navigation & layout
├── database.php                    # DB connection
├── helpers.php                     # Utility functions ⭐
├── security_config.php             # Security headers ⭐
├── csrf.php                        # CSRF protection ⭐
├── mail_config.php                 # Email configuration
│
├── Views (User Interfaces)
├── login.php                       # Login form
├── signup.php                      # Registration form
├── profile.php                     # Profile display
├── profup.php                      # Profile editor
├── request.php                     # Admin requests
├── myrequest.php                   # User requests
├── preview.php                     # Request preview
├── approve.php                     # Approval form
├── reqpre.php                      # Request details
├── reqapp.php                      # Approve handler
├── reqvad.php                      # Validate handler
│
├── Handlers (Business Logic)
├── usersig.php                     # Registration handler
├── userlog.php                     # Login handler
├── userreg.php                     # Vehicle registration
├── userrequest.php                 # Request handler
├── canc.php                        # Cancel handler
├── chk.php                         # Check operation
├── review.php                      # Return handler
│
├── Documentation ⭐
├── README.md                       # This file
├── CODE_STANDARDS.md               # Coding standards
├── ARCHITECTURE.md                 # System design
├── SECURITY.md                     # Security policy
├── COMPLIANCE.md                   # Compliance checklist
├── CONTRIBUTING.md                 # Contribution guide
├── INSTALLATION.md                 # Setup guide
├── DEPLOYMENT.md                   # Deployment guide
├── IMPROVEMENTS.md                 # Recent changes
│
├── Configuration
├── .env.example                    # Env template
├── .env                            # Env (Git ignored)
├── .gitignore                      # Git ignore rules
├── phpunit.xml                     # PHPUnit config
├── Dockerfile                      # Docker config
├── docker-compose.yml              # Docker compose
├── composer.json                   # PHP dependencies
│
└── Tools
    ├── bootstrap.bundle.min.js     # Bootstrap JS
    ├── jquery.min.js               # jQuery
    ├── naf.png                     # Logo
    ├── admin.png                   # Admin icon
    └── driver.png                  # Driver icon

📖 Documentation

Comprehensive documentation is available:

Document Purpose
CODE_STANDARDS.md PSR-12 compliance, naming conventions, security practices
ARCHITECTURE.md System architecture, technology stack, data flows
SECURITY.md Security features, vulnerability reporting
COMPLIANCE.md 99% compliance verification against standards
CONTRIBUTING.md Contribution guidelines, PR process
INSTALLATION.md Detailed setup instructions
DEPLOYMENT.md Production deployment & CI/CD
IMPROVEMENTS.md Recent improvements & changes

🔧 Configuration

Database Setup

Edit .env file:

DB_HOST=localhost
DB_USER=root
DB_PASS=
DB_NAME=amvrss

Email Configuration

Gmail SMTP example:

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password
SMTP_FROM=noreply@amvrs.local
ADMIN_EMAIL=admin@amvrs.local

Application Config

Database connection in database.php:

$host = "localhost";
$user = "root";
$pass = "";
$db = "amvrss";

$dbh = mysqli_connect($host, $user, $pass, $db);

👥 User Roles & Permissions

Role Dashboard Vehicle Requests Approvals Admin View History
Admin ✅ Full ✅ All ✅ Approve/Reject ✅ Yes ✅ All
Approver ✅ Limited ✅ All ✅ Approve/Reject ❌ No ✅ All
Driver ✅ Personal ✅ Own Only ❌ No ❌ No ✅ Own Only

🔒 Security Features

Implemented Security ✅

Security Headers

X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Security-Policy: Restrictive policy
Referrer-Policy: strict-origin-when-cross-origin
HSTS: Strict-Transport-Security enabled

🛠 Development

Running Tests

# Run all tests
php phpunit --configuration phpunit.xml

# Run specific test
php phpunit tests/HelpersTest.php

Running Linting

# PHP syntax check
php -l *.php

# Check all PHP files
find . -name "*.php" -exec php -l {} \;

Docker Development

# Start services
docker-compose up -d

# Access application
# http://localhost:8000

# Stop services
docker-compose down

📊 Database Schema

Users Table

CREATE TABLE users (
    id INT PRIMARY KEY AUTO_INCREMENT,
    Full_name VARCHAR(100),
    rank VARCHAR(50),
    snumber VARCHAR(50) UNIQUE,
    email VARCHAR(100) UNIQUE,
    username VARCHAR(20) UNIQUE,
    password VARCHAR(255),
    user_type ENUM('driver', 'admin'),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Vehicles Table

CREATE TABLE vechicle (
    vech_id INT PRIMARY KEY AUTO_INCREMENT,
    user_id INT,
    vech_name VARCHAR(100),
    vech_color VARCHAR(50),
    vech_cat VARCHAR(50),
    status ENUM('free', 'allocated'),
    created_at TIMESTAMP
);

Requests Table

CREATE TABLE request (
    id INT PRIMARY KEY AUTO_INCREMENT,
    user_id INT,
    vech_id INT,
    vech_name VARCHAR(100),
    mission TEXT,
    status ENUM('pending', 'approved', 'rejected', 'returned'),
    created_at TIMESTAMP,
    FOREIGN KEY (user_id) REFERENCES users(id),
    FOREIGN KEY (vech_id) REFERENCES vechicle(vech_id)
);

🚀 Deployment

Production Checklist

Docker Deployment

# Build image
docker build -t amvrs-armed .

# Run container
docker run -d -p 8000:80 amvrs-armed

# Push to registry
docker tag amvrs-armed:latest ghcr.io/ajiko2505/amvrs-armed:latest
docker push ghcr.io/ajiko2505/amvrs-armed:latest

GitHub Actions CI/CD

See DEPLOYMENT.md for detailed instructions.

📝 License

Apache License 2.0 - See LICENSE file for details.

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines on:

📞 Support & Contact

📈 Project Statistics

🎯 Roadmap

Current Version (1.0.0)

Future Enhancements

📅 Version History

Version Date Status Notes
1.0.0 2026-02-09 Live Initial release with security hardening
0.9.0 2026-02-01 Archive Beta version

🎉 Credits

Development Team: AMVRS ARMED Development Team
Architecture: Modern PHP + Bootstrap 5.3 + MySQL
Security: Industry best practices & OWASP guidelines
Testing: PHPUnit + manual QA


Made for Armed Forces Operations 🎖️

GitHub Repo stars GitHub forks

Last Updated: February 9, 2026 Status: Live & Maintained License: Apache 2.0