io.github.kambleaa007/weather

An MCP server for weather information.

ā˜… 0Apache-2.0devtools

Install

Config snippet generator goes here (5 client tabs)

README

# GrappleAI - Active Defense Layer for Consumers

An AI-driven dispute resolution platform built with React frontend and AWS CDK Lambda backend. GrappleAI advocates for consumers in post-purchase disputes using autonomous agents and the Model Context Protocol (MCP).

## šŸš€ Quick Start

Get up and running in 5 minutes:

```bash
# Frontend
cd app && npm install && npm run dev

# Backend (separate terminal)
cd backend && npm install && npm run cdk:deploy
```

See [QUICKSTART.md](./QUICKSTART.md) for detailed instructions.

## šŸ“š Documentation

### Getting Started
- **[Quick Start Guide](./QUICKSTART.md)** - Get running in 5 minutes
- **[Complete Setup Guide](./SETUP.md)** - Detailed setup instructions
- **[Project Overview](./PROJECT_OVERVIEW.md)** - Architecture and features

### Methodology & Vision
- **[AI-DLC Methodology](./SDLC%20to%20AIDLC/AIDLC.md)** - AI-Driven Development Life Cycle
- **[Traditional SDLC](./SDLC%20to%20AIDLC/SDLC.md)** - SDLC vs AIDLC comparison
- **[GrappleAI Concept](./ProblemStatement.md)** - Problem statement and vision
- **[AI-DLC Details](./AI-DLC/AI-DLC.md)** - Active Defense Layer for Consumers

### Component Documentation
- **[Frontend README](./app/README.md)** - React app details
- **[Backend README](./backend/README.md)** - AWS CDK backend details

## šŸ—ļø Architecture

```
React Frontend (Vite)
        ↓ HTTP/REST
API Gateway (AWS)
        ↓
Lambda Function (Node.js 20.x)
        ā”œā”€ MCP Server
        ā”œā”€ Request Handler
        └─ Business Logic
        ↓
    ā”Œā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
    ↓       ↓        ↓
DynamoDB  S3      DynamoDB
Disputes  Evidence Negotiations
```

## ✨ Features

- **Dispute Management** - Create, track, and manage disputes
- **Evidence Verification** - Automatic confidence scoring and secure storage
- **Autonomous Negotiation** - AI-driven negotiation with sellers
- **Consumer Rights** - Consumer Protection Act 2019 integration
- **Dashboard Analytics** - Real-time dispute statistics
- **Multi-language Support** - Vernacular interface support

## šŸ› ļø Tech Stack

### Frontend
- React 18 + TypeScript
- Vite (build tool)
- Tailwind CSS (styling)
- Zustand (state management)
- React Router (navigation)

### Backend
- AWS CDK (infrastructure as code)
- AWS Lambda (serverless compute)
- AWS API Gateway (REST API)
- AWS DynamoDB (database)
- AWS S3 (storage)
- Node.js 20.x

## šŸ“ Project Structure

```
grappleai/
ā”œā”€ā”€ app/                    # React frontend
│   ā”œā”€ā”€ src/
│   │   ā”œā”€ā”€ components/    # React components
│   │   ā”œā”€ā”€ pages/         # Page components
│   │   ā”œā”€ā”€ services/      # API client
│   │   ā”œā”€ā”€ store/         # State management
│   │   └── types/         # TypeScript types
│   └── package.json
│
ā”œā”€ā”€ backend/               # AWS CDK backend
│   ā”œā”€ā”€ lib/
│   │   ā”œā”€ā”€ cdk/          # CDK stack
│   │   ā”œā”€ā”€ lambda/       # Lambda handler
│   │   ā”œā”€ā”€ mcp/          # MCP server
│   │   └── types/        # TypeScript types
│   └── package.json
│
ā”œā”€ā”€ SDLC to AIDLC/        # Methodology docs
│   ā”œā”€ā”€ AIDLC.md
│   └── SDLC.md
│
ā”œā”€ā”€ AI-DLC/               # AI-DLC documentation
│   └── AI-DLC.md
│
ā”œā”€ā”€ QUICKSTART.md         # 5-minute setup
ā”œā”€ā”€ SETUP.md              # Complete setup guide
ā”œā”€ā”€ PROJECT_OVERVIEW.md   # Architecture overview
└── README.md             # This file
```

## šŸš€ Getting Started

### Prerequisites
- Node.js 18+
- AWS Account
- AWS CLI configured

### Frontend Setup
```bash
cd app
npm install
npm run dev
```

Visit: `http://localhost:5173`

### Backend Setup
```bash
cd backend
npm install
npm run cdk:deploy
```

### Connect Frontend to Backend
Update `app/.env.local`:
```
VITE_API_URL=https://your-api-endpoint.com/api
```

## šŸ“– API Endpoints

### Disputes
- `POST /disputes` - Create dispute
- `GET /disputes` - List disputes
- `GET /disputes/{id}` - Get dispute details
- `PUT /disputes/{id}` - Update dispute

### Evidence
- `POST /evidence/upload` - Upload evidence
- `GET /evidence/{id}` - Get evidence
- `POST /evidence/{id}/verify` - Verify evidence

### Negotiation
- `POST /negotiation/initiate` - Start negotiation
- `GET /negotiation/{txId}` - Get status

## šŸ”§ MCP Server Tools

The backend implements these MCP tools:

1. **secureEvidence** - Clutch evidence securely with confidence scoring
2. **negotiateRefund** - Initiate autonomous negotiation
3. **generateDisputeNotice** - Generate formal dispute notice
4. **verifyConsumerRights** - Verify Consumer Protection Act rights

## šŸ“Š Dashboard Features

- **Statistics** - Total disputes, resolved, in-progress, success rate
- **Dispute List** - View all disputes with status indicators
- **Create Dispute** - File new disputes with evidence
- **Real-time Updates** - Track dispute progress

## šŸ” Security

- JWT/OAuth2 ready
- Input validation
- IAM roles with least privilege
- Encryption at rest and in transit
- CORS enabled
- API rate limiting ready

## šŸ“ˆ Performance

- Frontend: ~50KB gzipped
- Lambda: 512MB memory, 30s timeout
- DynamoDB: On-demand billing
- API: <100ms response time

## šŸ’°