> ## Documentation Index
> Fetch the complete documentation index at: https://docs.briankimemia.is-a.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Aviation-grade Inventory Management Information System

> Welcome to AERONAV AMO - Your Aviation Parts Tracking Solution

<img className="block dark:hidden" src="https://mintcdn.com/br/eTHf7BJb-3BPAtN2/images/hero-light.svg?fit=max&auto=format&n=eTHf7BJb-3BPAtN2&q=85&s=ba45ccbacd410e29b36d01d4eee739fd" alt="AERONAV AMO Hero Light" width="1024" height="1024" data-path="images/hero-light.svg" />

# Welcome to AERONAV AMO ✈️

**AERONAV AMO** is a modern, aviation-grade inventory management system designed specifically for **Aircraft Maintenance Organizations**. Track serialized parts, manage issuance workflows, and maintain complete traceability—all in one powerful platform.

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/aeroplane">
    Get up and running in under 5 minutes
  </Card>

  <Card title="API Reference" icon="code" href="/aeroplane">
    Explore our comprehensive API documentation
  </Card>

  <Card title="Database Schema" icon="database" href="aeroplane">
    Understand the data structure and relationships
  </Card>

  <Card title="Best Practices" icon="star">
    Learn tips and tricks from aviation experts
  </Card>
</CardGroup>

<Info>
  **New to inventory systems?** No worries! This documentation will guide you through every feature, from basic inventory tracking to advanced requisition workflows.
</Info>

***

## 🎯 What Can You Do?

<AccordionGroup>
  <Accordion title="Track Serialized & Non-Serialized Parts" icon="barcode">
    Manage both serialized components (individual tracking) and bulk items (quantity-based) with intelligent grouping and expandable views.

    <Tip>
      Use serialized tracking for critical components like engines, propellers, and avionics. This ensures full traceability for regulatory compliance!
    </Tip>
  </Accordion>

  <Accordion title="Issue Parts to Aircraft & Technicians" icon="wrench">
    Process part issuances with automatic inventory deduction, movement logging, and requisition creation.

    <Warning>
      Always verify aircraft registration and technician details before issuing parts. Incorrect data can lead to audit issues!
    </Warning>
  </Accordion>

  <Accordion title="Manage Requisitions" icon="clipboard-list">
    Create, approve, reject, and track requisitions from creation to completion with full status management.
  </Accordion>

  <Accordion title="Generate Compliance Reports" icon="file-chart-column">
    Export stock movement history, issuance logs, and inventory reports in PDF or CSV format for regulatory compliance.

    <Note>
      All reports include timestamps and user attribution for complete audit trails.
    </Note>
  </Accordion>

  <Accordion title="Bulk Import via CSV" icon="file-arrow-up">
    Import hundreds of parts in seconds with intelligent duplicate detection and quantity merging.

    <Tip>
      Download our CSV template to ensure your data is formatted correctly before upload!
    </Tip>
  </Accordion>
</AccordionGroup>

***

## 🚀 Key Features

<CardGroup cols={3}>
  <Card title="Real-Time Sync" icon="arrows-rotate">
    Instant updates across all users
  </Card>

  <Card title="Low Stock Alerts" icon="bell">
    Automated threshold monitoring
  </Card>

  <Card title="Role-Based Access" icon="shield-halved">
    Secure permission management
  </Card>

  <Card title="Complete Audit Trail" icon="clock-rotate-left">
    Track every stock movement
  </Card>

  <Card title="Mobile Responsive" icon="mobile-screen">
    Access anywhere, anytime
  </Card>

  <Card title="Export Everything" icon="download">
    PDF and CSV reports
  </Card>
</CardGroup>

<Check>
  **Aviation Compliant:** Built to meet AMO traceability and regulatory requirements
</Check>

***

## 📊 System Architecture

<Tip>
  Understanding the architecture helps you troubleshoot issues and optimize performance!
</Tip>

```mermaid theme={null}
graph TB
    subgraph "Frontend Layer"
        A[React + TypeScript] --> B[React Router]
        B --> C[Custom Hooks]
        C --> D[Component Tree]
    end
    
    subgraph "State Management"
        C --> E[Local Storage - Cart]
        C --> F[React State - UI]
    end
    
    subgraph "API Integration"
        C --> G[Supabase Client]
        G --> H[REST API]
        G --> I[RPC Functions]
        G --> J[Realtime Updates]
    end
    
    subgraph "Backend Services"
        H --> K[(PostgreSQL)]
        I --> K
        J --> K
        K --> L[Row Security]
        K --> M[Database Functions]
    end
    
    style A fill:#61dafb,stroke:#333,stroke-width:2px
    style K fill:#3ecf8e,stroke:#333,stroke-width:2px
```

<Info>
  The system uses **Supabase** for backend services, providing instant APIs, real-time subscriptions, and PostgreSQL database—all in one!
</Info>

***

## 🛠️ Tech Stack

| Layer        | Technology                  | Purpose                             |
| ------------ | --------------------------- | ----------------------------------- |
| **Frontend** | React 18 + TypeScript       | Component-based UI with type safety |
| **Styling**  | Tailwind CSS + Shadcn UI    | Modern, responsive design system    |
| **Backend**  | Supabase                    | Database, authentication, real-time |
| **State**    | React Hooks + Local Storage | Client-side state management        |
| **Build**    | Vite                        | Lightning-fast development          |
| **Routing**  | React Router v6             | Client-side navigation              |

<Note>
  All technologies are open-source and production-ready!
</Note>

***

## 🎓 Core Concepts

### Understanding Serialized vs Non-Serialized Parts

<Tabs>
  <Tab title="Serialized Parts">
    **Serialized parts** have unique serial numbers and are tracked individually.

    **Examples:**

    * Aircraft engines (S/N: ABC123456)
    * Propellers (S/N: PR-7891)
    * Avionics units (S/N: AV-2024-01)

    **Behavior:**

    * Each serial number is a separate database row
    * Quantity is always 1 per serial
    * Issuance requires selecting specific serial
    * Full individual history tracking

    <Tip>
      Use serialized tracking for **high-value** or **critical safety** components!
    </Tip>
  </Tab>

  <Tab title="Non-Serialized Parts">
    **Non-serialized parts** are tracked by quantity without individual identification.

    **Examples:**

    * Bolts and fasteners (Qty: 500)
    * Washers (Qty: 1000)
    * Cable ties (Qty: 200)

    **Behavior:**

    * Single database row per part number
    * Quantity can be any positive integer
    * Issuance deducts from total quantity
    * Bulk movement history

    <Warning>
      Never use non-serialized tracking for parts that require individual traceability!
    </Warning>
  </Tab>
</Tabs>

<Note>
  **Fun Fact:** ✈️ The average commercial aircraft contains over 600,000 individual parts! AERONAV AMO can handle inventory of any scale.
</Note>

***

## 🔄 Workflow Examples

### 📦 Adding New Inventory

```mermaid theme={null}
flowchart TD
    A[Receive New Parts] --> B{Parts Have Serials?}
    
    B -->|Yes| C[Add Each Serial Individually]
    B -->|No| D[Add as Single Entry with Quantity]
    
    C --> E[System Creates Separate Rows]
    D --> F[System Merges with Existing or Creates New]
    
    E --> G[Auto-Generate Movement Log]
    F --> G
    
    G --> H[Update Dashboard]
    
    style A fill:#3498db
    style G fill:#2ecc71
```

<Steps>
  <Step title="Navigate to Inventory Page">
    Click **"Add New Part"** button in the top right
  </Step>

  <Step title="Fill in Part Details">
    * Part Number (required)
    * Description
    * Location (e.g., Bin A-12)
    * Serial Number (if applicable)
    * Quantity
    * Low Stock Threshold
  </Step>

  <Step title="Save and Verify">
    System automatically logs the addition in stock history
  </Step>
</Steps>

<Tip>
  **Pro Tip:** Use consistent location naming (e.g., `BIN-A-12`, `SHELF-B-05`) to make searching easier!
</Tip>

***

### 🔧 Issuing Parts

```mermaid theme={null}
flowchart TD
    A[Technician Needs Part] --> B[Search Inventory]
    B --> C[Click Issue Button]
    
    C --> D[Fill Issuance Form]
    D --> D1[Aircraft Registration]
    D --> D2[Technician Name]
    D --> D3[Quantity/Serial]
    
    D3 --> E{Valid Request?}
    
    E -->|Yes| F[Deduct from Stock]
    E -->|No| G[Show Error]
    
    F --> H[Create Movement Log]
    H --> I[Generate Requisition]
    I --> J[Send Notification]
    
    style A fill:#3498db
    style F fill:#2ecc71
    style G fill:#e74c3c
```

<Steps>
  <Step title="Locate the Part">
    Use search bar to find part by number, description, or serial
  </Step>

  <Step title="Click 'Issue' Action">
    Opens the issuance modal with pre-filled part details
  </Step>

  <Step title="Enter Required Information">
    * Aircraft registration (e.g., 5Y-ABC)
    * Technician name
    * Quantity (for non-serialized) or select serial (for serialized)
    * Optional remarks
  </Step>

  <Step title="Confirm Issuance">
    System validates stock availability and processes the transaction
  </Step>
</Steps>

<Warning>
  **Important:** For serialized parts, you can only issue ONE unit at a time. The system will reject requests for quantities greater than 1.
</Warning>

<Info>
  **Remember:** All issuances are automatically logged with timestamp, user, aircraft, and technician details for complete audit compliance!
</Info>

***

### 📤 CSV Bulk Import

<Tip>
  Bulk import is the fastest way to populate your inventory! You can add hundreds of parts in seconds.
</Tip>

**Required CSV Columns:**

```csv theme={null}
part_no,description,location,serial_no,quantity,store_name,remarks
```

**Example CSV Data:**

```csv theme={null}
part_no,description,location,serial_no,quantity,store_name,remarks
PN-12345,Engine Oil Filter,BIN-A-12,,50,Main Hangar,Batch 2024-A
PN-67890,Aircraft Propeller,SHELF-B-05,PR-001,1,Main Hangar,Overhauled
PN-67890,Aircraft Propeller,SHELF-B-05,PR-002,1,Main Hangar,New
PN-11111,Safety Wire,BIN-C-01,,200,Tool Crib,
```

<Steps>
  <Step title="Download Template">
    Navigate to **CSV Upload** page and download the template
  </Step>

  <Step title="Prepare Your Data">
    Fill in the template with your inventory data

    <Note>
      * Leave `serial_no` empty for non-serialized parts
      * Each serialized part should be on a separate row
      * Quantity should be `1` for serialized parts
    </Note>
  </Step>

  <Step title="Upload CSV">
    Drag and drop your file or click to browse
  </Step>

  <Step title="Preview & Validate">
    System shows preview and validates all data

    <Warning>
      Fix any validation errors before proceeding!
    </Warning>
  </Step>

  <Step title="Confirm Import">
    Click **"Import"** to add all parts to inventory
  </Step>
</Steps>

<Check>
  **Smart Merging:** The system automatically merges quantities for duplicate non-serialized parts while keeping serialized parts separate!
</Check>

***

## ⚠️ Common Pitfalls

<Warning>
  Avoid these common mistakes to ensure smooth operations!
</Warning>

<AccordionGroup>
  <Accordion title="❌ Mixing Serialized and Non-Serialized Data" icon="triangle-exclamation">
    **Problem:** Adding quantity > 1 for a part with a serial number

    **Why it fails:** Serialized parts must have quantity = 1 per serial

    **Solution:** Create separate rows for each serial number

    ```csv theme={null}
    ❌ WRONG:
    PN-123,Propeller,SHELF-A,SN-001,3,Main

    ✅ CORRECT:
    PN-123,Propeller,SHELF-A,SN-001,1,Main
    PN-123,Propeller,SHELF-A,SN-002,1,Main
    PN-123,Propeller,SHELF-A,SN-003,1,Main
    ```
  </Accordion>

  <Accordion title="❌ Issuing More Than Available Stock" icon="triangle-exclamation">
    **Problem:** Trying to issue 10 units when only 5 are in stock

    **Why it fails:** System prevents negative inventory

    **Solution:** Check available quantity before issuing. The system will show an error message.
  </Accordion>

  <Accordion title="❌ Missing Required Aircraft/Technician Info" icon="triangle-exclamation">
    **Problem:** Leaving aircraft registration or technician name blank

    **Why it fails:** Required for audit trail and compliance

    **Solution:** Always fill in all required fields during issuance

    <Tip>
      Create a list of standard aircraft registrations and technician names to ensure consistency!
    </Tip>
  </Accordion>

  <Accordion title="❌ Inconsistent Location Naming" icon="triangle-exclamation">
    **Problem:** Using "Bin A12", "BIN-A-12", "bin a 12" for the same location

    **Why it's bad:** Makes searching and reporting difficult

    **Solution:** Establish a standard naming convention and stick to it

    **Recommended Format:**

    * `BIN-[LETTER]-[NUMBER]` → `BIN-A-12`
    * `SHELF-[LETTER]-[NUMBER]` → `SHELF-B-05`
    * `RACK-[NUMBER]` → `RACK-001`
  </Accordion>
</AccordionGroup>

***

## 💡 Best Practices

<Tip>
  Follow these best practices to maximize efficiency and maintain compliance!
</Tip>

### 📋 Inventory Management

<CardGroup cols={2}>
  <Card title="Set Realistic Thresholds" icon="gauge">
    Configure low stock alerts based on:

    * Lead time from suppliers
    * Average consumption rate
    * Critical vs non-critical parts

    <Note>
      Critical parts should have higher thresholds!
    </Note>
  </Card>

  <Card title="Regular Stock Audits" icon="clipboard-check">
    Perform monthly cycle counts to ensure accuracy:

    * Verify physical count matches system
    * Check for damaged or expired parts
    * Update locations if changed
  </Card>

  <Card title="Clear Location Labeling" icon="map-pin">
    Use consistent, descriptive location codes:

    * Include physical labels on bins/shelves
    * Map locations in a diagram
    * Train all staff on the system
  </Card>

  <Card title="Detailed Remarks" icon="message">
    Add useful notes when:

    * Receiving new stock (batch number, supplier)
    * Issuing parts (work order reference)
    * Finding discrepancies (reason for adjustment)
  </Card>
</CardGroup>

### 🔧 Issuance Workflow

<Steps>
  <Step title="Verify Work Authorization">
    Confirm the work order or maintenance schedule before issuing
  </Step>

  <Step title="Check Part Eligibility">
    Ensure the part is serviceable and within shelf-life limits
  </Step>

  <Step title="Document Everything">
    Include work order numbers and maintenance references in remarks
  </Step>

  <Step title="Double-Check Serial Numbers">
    For critical components, verify serial number matches maintenance records
  </Step>
</Steps>

<Warning>
  **Compliance Alert:** Aviation regulations require complete traceability of critical parts. Always record serials for life-limited components!
</Warning>

### 📊 Reporting & Analytics

<Tip>
  Generate reports regularly to identify trends and prevent stockouts!
</Tip>

**Weekly Reports:**

* Parts issued by aircraft (helps predict maintenance patterns)
* Low stock alerts (reorder list)
* Fast-moving items (consider increasing stock levels)

**Monthly Reports:**

* Stock movement analysis
* Technician issuance activity
* Inventory turnover rate
* Dead stock identification

**Quarterly Reports:**

* Compliance audit reports (full movement history)
* Cost analysis (parts consumed vs budget)
* Supplier performance (lead times, quality issues)

<Check>
  Export reports in PDF for management reviews and CSV for further analysis in Excel!
</Check>

***

## 🔐 Security & Permissions

<Warning>
  Properly configure user roles to maintain data integrity and compliance!
</Warning>

### Role-Based Access Control

| Role            | Permissions                                | Use Case                              |
| --------------- | ------------------------------------------ | ------------------------------------- |
| **Admin**       | Full access - Create, Read, Update, Delete | System administrators, store managers |
| **Storekeeper** | Add inventory, issue parts, view reports   | Day-to-day operations staff           |
| **Technician**  | View inventory, request requisitions       | Maintenance technicians               |
| **Viewer**      | Read-only access to inventory and reports  | Management, auditors                  |

<Tip>
  **Best Practice:** Follow the principle of least privilege—give users only the access they need!
</Tip>

### Data Backup

<Steps>
  <Step title="Automatic Backups">
    Supabase performs automatic daily backups of your database
  </Step>

  <Step title="Manual Exports">
    Export critical data weekly as CSV for local backup
  </Step>

  <Step title="Audit Logs">
    All changes are logged in `stock_history` table—never delete this data!
  </Step>
</Steps>

<Note>
  **Remember:** Backup retention policies vary by Supabase plan. Check your plan details!
</Note>

***

## 🐛 Troubleshooting

<AccordionGroup>
  <Accordion title="🔴 Error: 'Insufficient Stock' when issuing" icon="circle-xmark">
    **Cause:** Trying to issue more quantity than available in inventory

    **Solutions:**

    1. Check current stock level for the part
    2. Verify you're looking at the correct part number
    3. For serialized parts, ensure serial is still in stock (not already issued)
    4. Reduce requested quantity

    <Info>
      Use the **History** button to see recent movements that might have reduced stock!
    </Info>
  </Accordion>

  <Accordion title="🟡 Warning: 'Duplicate Serial Number' during CSV upload" icon="triangle-exclamation">
    **Cause:** Attempting to add a serial number that already exists in the database

    **Solutions:**

    1. Search inventory to verify if serial already exists
    2. If it's a data entry error, correct the serial number
    3. If part was returned to stock, use "Add Quantity" instead of CSV upload

    <Warning>
      Never create duplicate serial numbers—this violates aviation traceability requirements!
    </Warning>
  </Accordion>

  <Accordion title="🟢 CSV Upload: Headers Not Recognized" icon="file-excel">
    **Cause:** CSV file doesn't match required format

    **Required headers:**

    ```
    part_no,description,location,serial_no,quantity,store_name,remarks
    ```

    **Solutions:**

    1. Download the official template from the Upload page
    2. Ensure no extra spaces in header names
    3. Save file as UTF-8 encoded CSV
    4. Don't add extra columns

    <Tip>
      Open your CSV in a text editor to verify headers are exactly correct!
    </Tip>
  </Accordion>

  <Accordion title="🔵 Parts Not Appearing in Search" icon="magnifying-glass">
    **Possible Causes:**

    * Search filters are too restrictive
    * Part was recently deleted
    * Misspelling in search term

    **Solutions:**

    1. Clear all filters and try again
    2. Use partial matches (search "PN-12" instead of full "PN-12345")
    3. Check the deleted items log if you have admin access
    4. Verify the part number is correct in your records
  </Accordion>

  <Accordion title="⚫ Low Stock Alerts Not Showing" icon="bell-slash">
    **Cause:** Threshold not configured or set too low

    **Solution:**

    1. Edit the part and set `low_stock_threshold` value
    2. Recommended: Set threshold at 2-3x average monthly usage
    3. For critical parts, set higher thresholds (50-100% higher)

    <Note>
      Low stock alerts appear on the dashboard and in inventory table when quantity ≤ threshold
    </Note>
  </Accordion>
</AccordionGroup>

<Tip>
  **Still having issues?** Check the browser console (F12) for detailed error messages or contact support!
</Tip>

***

## 📚 Additional Resources

<CardGroup cols={2}>
  <Card title="Video Tutorials" icon="youtube" href="#">
    Watch step-by-step guides for common tasks
  </Card>

  <Card title="API Documentation" icon="book" href="/api-reference">
    Complete reference for RPC functions and endpoints
  </Card>

  <Card title="Database Schema" icon="database" href="/database">
    Detailed table structures and relationships
  </Card>

  <Card title="Community Forum" icon="comments" href="#">
    Get help from other AERONAV users
  </Card>
</CardGroup>

***

## 🎉 Fun Facts

<Note>
  **Did You Know?** ✈️

  * The Boeing 747 has over **6 million parts** from suppliers in 65 countries!
  * An aircraft's average **part lifecycle** spans 20-30 years
  * Proper inventory management can reduce **aircraft downtime by up to 40%**
  * The most tracked serial number in aviation history belongs to **Wright Brothers' Flyer I** (1903)
  * Modern airlines track over **1 million** inventory items on average
</Note>

***

## 🚀 What's Next?

Ready to get started? Here's your roadmap:

<Steps>
  <Step title="Complete Initial Setup">
    Follow our [Quick Start Guide](/quickstart) to configure your environment
  </Step>

  <Step title="Import Your Inventory">
    Use CSV upload to populate your parts database
  </Step>

  <Step title="Configure User Roles">
    Set up permissions for your team members
  </Step>

  <Step title="Train Your Team">
    Share this documentation and conduct hands-on training sessions
  </Step>

  <Step title="Go Live!">
    Start tracking parts and processing issuances in production
  </Step>
</Steps>

<Check>
  **Congratulations!** You're now ready to revolutionize your hangar inventory management! 🎊
</Check>

***

## ⚖️ Disclaimer

<Warning>
  **Important Legal Notice**

  This software is provided "as is" without warranty of any kind, express or implied. While AERONAV AMO is designed to help maintain compliance with aviation regulations, **users are solely responsible for**:

  * Ensuring compliance with local and international aviation regulations
  * Verifying accuracy of inventory data
  * Maintaining proper documentation as required by regulatory authorities
  * Implementing appropriate backup and disaster recovery procedures

  AERONAV AMO is a tool to assist with inventory management and should be used in conjunction with—not as a replacement for—proper aviation maintenance practices and regulatory compliance programs.

  **Users must:**

  * Verify all data before making operational decisions
  * Follow manufacturer recommendations and regulatory requirements
  * Maintain independent records as required by law
  * Conduct regular audits and validations of system data
</Warning>

<Info>
  For aviation regulatory compliance questions, consult with your local Civil Aviation Authority or an aviation compliance specialist.
</Info>

***

## 📧 Contact

For questions, feedback, or support:

<CardGroup cols={2}>
  <Card title="Email Support" icon="envelope" href="mailto:projects@briankimemia.is-a.dev">
    📨 [projects@briankimemia.is-a.dev](mailto:projects@briankimemia.is-a.dev)
  </Card>

  <Card title="Developer Portfolio" icon="globe" href="https://briankimemia.is-a.dev/">
    🌐 Brian Kimemia
  </Card>
</CardGroup>

<Note>
  **Response Time:** We typically respond to inquiries within 24-48 hours during business days.
</Note>

***

<div align="center">
  **Built with ✈️ for Aviation Professionals**

  *Making hangar inventory management simple, compliant, and efficient.*
</div>

***

**Last Updated:** November 2025\
**Version:** 1.0.0\
**License:** MIT

***
