mashrur950's picture
Remove placeholder team members from README.md
0e59aa0
|
raw
history blame
5.53 kB
---
title: FleetMind AI Dispatch Coordinator
emoji: 🚚
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.9.0
app_file: app.py
pinned: false
tags:
- mcp
- mcp-in-action-track-01
- model-context-protocol
- multi-agent
- autonomous-ai
- gemini-2.0-flash
- delivery-management
- postgresql
---
# FleetMind MCP - Autonomous Dispatch Coordinator
**πŸ† MCP 1st Birthday Hackathon Submission - Track: MCP in Action**
An autonomous AI coordinator that handles delivery exceptions using multi-agent orchestration powered by Google Gemini 2.0 Flash and the Model Context Protocol (MCP).
**πŸ”— Links:**
- **GitHub Repository:** https://github.com/mashrur-rahman-fahim/fleetmind-mcp
- **Hugging Face Space:** https://huggingface.co/spaces/MCP-1st-Birthday/fleetmind-dispatch-ai
- **Auto-Sync:** Every push to GitHub automatically updates HF Space via GitHub Actions ✨
---
## πŸ‘₯ Team
**Team Name:** [Your Team Name]
**Team Members:**
- **[Your Name]** - [@your-hf-username](https://huggingface.co/your-hf-username) - Lead Developer & Repository Manager
- **[Partner 2 Name]** - [@partner2-username](https://huggingface.co/partner2-username) - [Role - e.g., Backend Developer, Testing]
**Collaboration:** Team collaborates via GitHub repository (https://github.com/mashrur-rahman-fahim/fleetmind-mcp) with automatic sync to HF Space via GitHub Actions.
*(Note: Replace placeholders with actual team member information. All members must have Hugging Face accounts and be listed here for valid hackathon submission.)*
---
## πŸš€ Quick Start
### 1. Install PostgreSQL
**Windows:**
- Download from https://www.postgresql.org/download/windows/
- Install with default settings
- Remember your postgres password
**macOS:**
```bash
brew install postgresql
brew services start postgresql
```
**Linux:**
```bash
sudo apt-get install postgresql postgresql-contrib
sudo systemctl start postgresql
```
### 2. Create Database
```bash
# Login to PostgreSQL
psql -U postgres
# Create the database
CREATE DATABASE fleetmind;
# Exit
\q
```
### 3. Set Up Environment
```bash
# Install Python dependencies
pip install -r requirements.txt
# Copy environment template
cp .env.example .env
# Edit .env with your database credentials
# DB_HOST=localhost
# DB_PORT=5432
# DB_NAME=fleetmind
# DB_USER=postgres
# DB_PASSWORD=your_password_here
```
### 4. Initialize Database Schema
```bash
# Run database initialization script
python scripts/init_db.py
```
This will create all necessary tables in the PostgreSQL database.
### 3. Run Application
```bash
# Start the Gradio UI (coming soon)
python ui/app.py
```
## πŸ“ Project Structure
```
fleetmind-mcp/
β”œβ”€β”€ database/ # Database connection and schema
β”‚ β”œβ”€β”€ __init__.py
β”‚ β”œβ”€β”€ connection.py # Database connection utilities
β”‚ └── schema.py # Database schema definitions
β”œβ”€β”€ data/ # Database and data files
β”‚ └── fleetmind.db # SQLite database (auto-generated)
β”œβ”€β”€ mcp_server/ # MCP server implementation
β”œβ”€β”€ agents/ # Multi-agent system
β”œβ”€β”€ workflows/ # Orchestration workflows
β”œβ”€β”€ ui/ # Gradio interface
β”œβ”€β”€ tests/ # Test suite
β”œβ”€β”€ scripts/ # Utility scripts
β”‚ └── init_db.py # Database initialization
β”œβ”€β”€ requirements.txt # Python dependencies
β”œβ”€β”€ .env.example # Environment variables template
└── README.md # This file
```
## πŸ“Š Database Schema (PostgreSQL)
The system uses PostgreSQL with the following tables:
### Orders Table
The `orders` table stores all delivery order information:
| Column | Type | Description |
|--------|------|-------------|
| order_id | VARCHAR(50) | Primary key |
| customer_name | VARCHAR(255) | Customer name |
| customer_phone | VARCHAR(20) | Contact phone |
| customer_email | VARCHAR(255) | Contact email |
| delivery_address | TEXT | Delivery address |
| delivery_lat/lng | DECIMAL(10,8) | GPS coordinates |
| time_window_start/end | TIMESTAMP | Delivery time window |
| priority | VARCHAR(20) | standard/express/urgent |
| weight_kg | DECIMAL(10,2) | Package weight |
| status | VARCHAR(20) | pending/assigned/in_transit/delivered/failed/cancelled |
| assigned_driver_id | VARCHAR(50) | Assigned driver |
| created_at | TIMESTAMP | Creation timestamp |
| updated_at | TIMESTAMP | Auto-updated timestamp |
### Additional Tables
- **drivers** - Driver information and status
- **assignments** - Order-driver assignments with routing
- **exceptions** - Exception tracking and resolution
- **agent_decisions** - AI agent decision logging
- **metrics** - Performance metrics and analytics
## πŸ”§ Development
### Database Operations
```python
from database.connection import get_db_connection, execute_query, execute_write
# Get all pending orders (note: PostgreSQL uses %s for parameters)
orders = execute_query("SELECT * FROM orders WHERE status = %s", ("pending",))
# Create new order
order_id = execute_write(
"INSERT INTO orders (order_id, customer_name, delivery_address, status) VALUES (%s, %s, %s, %s)",
("ORD-001", "John Doe", "123 Main St", "pending")
)
# Test connection
from database.connection import test_connection
if test_connection():
print("Database connected successfully!")
```
## πŸ“ License
MIT License
## 🀝 Contributing
Contributions welcome! Please read the contributing guidelines first.