Skip to content

crastatelvin/GearFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏍️ GEARFLOW

Fully Autonomous Bike Service β€” AI-Driven Logistics, Smart Dispatch & RAG-Powered Support

Node.js Express Next.js React Native n8n PostgreSQL


GearFlow is a next-generation, zero-trust autonomous bike service ecosystem. By leveraging n8n orchestration and multimodal AI, it automates the entire service lifecycleβ€”from intelligent lead triage and proximity-based dispatch to vision-locked part verification and automated payouts.


Dispatch Automation AI Security


πŸ“‹ Table of Contents


🧠 Overview

GearFlow transforms traditional bike maintenance into a fully autonomous digital operation. The platform eliminates human intervention in logistics and verification, ensuring a "zero-trust" environment where every action is verified by AI and logged on-chain (or in a secure ledger).

Key User Flows:

  • Customers: Request service via a premium Next.js portal, track mechanics in real-time, and receive AI-generated health reports for their bikes.
  • Mechanics: Use an offline-first Expo app to receive jobs, navigate to locations, and verify part replacements using vision-based AI.
  • System: n8n acts as the "Central Nervous System," handling fraud detection, automated payouts, and RAG-based technical support for mechanics.

πŸ–ΌοΈ Application Preview

1) Landing Page

Landing Page


2) Login Page

Login Page


3) Customer Dashboard

Dashboard


4) Live Tracking

Tracking


5) AI Assistant

AI Chat



πŸ›‘οΈ Admin Dashboard Features

The Admin Dashboard provides real-time oversight of the entire autonomous fleet.

πŸ“Š Fleet Overview & Analytics

Admin Overview Real-time metrics, revenue tracking, and active session monitoring.


πŸ—ΊοΈ Live Fleet Tracking

Admin Map Geographic distribution of active mechanics and service requests.


πŸ“‹ Active Orders & Mechanics

Active Service Orders Registered Technicians
Orders Mechanics

πŸ›‘οΈ Fraud & Operations Logs

Admin Fraud AI-detected anomalies and verification logs.


✨ System Features

Feature Description
🎯 Smart Dispatch Real-time mechanic allocation based on Geo-proximity, rating, and current load.
πŸ‘οΈ Vision Verification Multimodal AI validates new vs. old parts via photos to prevent fraud.
πŸ“š RAG Support Instant technical assistance for mechanics using a RAG pipeline over maintenance manuals.
πŸ›‘οΈ Fraud Detection Automated n8n workflow monitors patterns and flags suspicious service claims.
πŸ’³ Automated Payouts Weekly cron-based payouts for mechanics via integrated fintech gateways (Razorpay/Cashfree).
πŸ“± Offline-First Mobile Reliable mechanic app that functions in low-connectivity areas with sync-on-reconnect.

πŸ—οΈ Architecture

graph TD
    subgraph "Clients"
        A[Next.js Portal] -->|API Requests| B[Express Backend]
        C[Expo Mobile App] -->|API Requests| B
    end

    subgraph "Core Logic"
        B --> D[(PostgreSQL / pgvector)]
        B --> E[n8n Orchestrator]
    end

    subgraph "Automation & AI"
        E --> F[Dispatch Workflow]
        E --> G[RAG Support System]
        E --> H[Fraud Detection]
        E --> I[Payout Cron]
    end

    subgraph "External Services"
        G --> J[Groq / OpenAI]
        I --> K[Payment Gateway]
        F --> L[WhatsApp API]
    end
Loading

πŸ› οΈ Tech Stack

Layer Technology
Frontend Next.js 15+, TailwindCSS 4, Framer Motion
Mobile React Native (Expo), Moti (Animations), SecureStore
Backend Node.js, Express 5, JWT Auth, Helmet
Orchestration n8n (Self-hosted or Cloud)
Database PostgreSQL + pgvector (Vector Search)
AI / LLM Groq (Llama 3), OpenAI Vision, LangChain
Infrastructure Docker, AWS EKS (Proposed)

πŸ“ Project Structure

GearFlow/
β”‚
β”œβ”€β”€ admin/                 # Admin Dashboard (React)
β”œβ”€β”€ backend/               # Core Express API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/   # Business logic
β”‚   β”‚   β”œβ”€β”€ db/            # Migrations & Models
β”‚   β”‚   β”œβ”€β”€ middleware/    # Auth & Security
β”‚   β”‚   └── routes/        # API Endpoints
β”‚   └── package.json
β”‚
β”œβ”€β”€ frontend/              # Customer Web Portal (Next.js)
β”‚   β”œβ”€β”€ src/app/           # App Router
β”‚   β”œβ”€β”€ src/components/    # UI Library
β”‚   └── tailwind.config.ts
β”‚
β”œβ”€β”€ mobile/                # Mechanic Mobile App (Expo)
β”‚   β”œβ”€β”€ src/               # Reusable logic
β”‚   └── app/               # Expo Router pages
β”‚
β”œβ”€β”€ infra/                 # Infrastructure & Automation
β”‚   └── n8n/               # Workflow JSON exports
β”‚       β”œβ”€β”€ dispatch.json
β”‚       β”œβ”€β”€ rag_workflow.json
β”‚       └── payouts_cron.json
β”‚
β”œβ”€β”€ deploy/                # Deployment scripts (Docker/K8s)
└── README.md

πŸ€– Infrastructure & Workflows

The infra/n8n/ directory contains the blueprint of GearFlow's intelligence.

n8n Workflows Orchestrated logic for Dispatch, RAG, and Fraud Detection.

  1. dispatch_workflow.json: Handles the logic for matching service requests to the best available mechanic.
  2. rag_workflow.json: Implements the Retrieval-Augmented Generation pipeline to provide mechanics with repair guides.
  3. operations_fraud.json: Analyzes technician photos and logs to detect anomalies.
  4. payouts_cron.json: Triggered weekly to calculate and disperse earnings.

πŸš€ Installation

1) Clone the Repository

git clone https://github.com/crastatelvin/GearFlow.git
cd GearFlow

2) Setup Backend

cd backend
npm install
cp .env.example .env
npm run db:init   # Initialize database schema
npm run dev

3) Setup Frontend

cd ../frontend
npm install
npm run dev

4) Setup Mobile (Expo)

cd ../mobile
npm install
npx expo start

βš™οΈ Configuration

Ensure your backend/.env contains:

DATABASE_URL=postgresql://user:pass@localhost:5432/gearflow
JWT_SECRET=your_super_secret_key
N8N_WEBHOOK_URL=http://your-n8n-instance/webhook/...
GROQ_API_KEY=gsk_...
OPENAI_API_KEY=sk-...

πŸ”’ Security Notes

  • Zero Trust: All mechanic actions require proximity-based GPS verification and visual confirmation.
  • JWT Auth: Stateless authentication across Web and Mobile.
  • Rate Limiting: Protects the n8n webhooks from excessive automated calls.

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built by Telvin Crasta β€’ Empowering Autonomous Service
⭐ Star this repo if you're building the future of autonomous logistics!

About

🏍️ Fully autonomous, zero-trust bike service ecosystem orchestrated by n8n. Features AI-driven dispatch, vision-based part verification, and a RAG pipeline for technical support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors