File size: 1,902 Bytes
67993da
 
 
 
 
 
255ad41
67993da
 
 
0dd2082
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
title: RedThread
emoji: πŸ•ΈοΈ
colorFrom: red
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
---

# RedThread

**AI-assisted location-based recommendation platform** that combines intelligent intent parsing, safety validation, and structured data extraction.

## Architecture

```
ultimate_spider/
β”œβ”€β”€ client/               # React + Vite frontend
β”‚   └── src/
β”‚       β”œβ”€β”€ api/          # Backend communication layer
β”‚       β”œβ”€β”€ components/   # Reusable UI components
β”‚       β”œβ”€β”€ pages/        # Page-level compositions
β”‚       └── styles/       # Design system
└── server/               # Node.js + Express backend
    └── src/
        β”œβ”€β”€ config/       # Environment-driven configuration
        β”œβ”€β”€ controllers/  # Request orchestration (thin)
        β”œβ”€β”€ middleware/   # Rate limiting, safety guard, error handler
        β”œβ”€β”€ routes/       # HTTP route definitions
        β”œβ”€β”€ services/     # Business logic (AI, safety, scraper)
        β”œβ”€β”€ utils/        # Logger, custom errors
        └── validators/   # Request body validation
```

## Quick Start

```bash
# Backend
cd server
npm install
cp .env.example .env     # Add your GROQ_API_KEY
npm run dev

# Frontend (new terminal)
cd client
npm install
npm run dev
```

- **Frontend**: http://localhost:5173
- **Backend**: http://localhost:3001
- **Health**: http://localhost:3001/api/health

## Tech Stack

| Layer | Tech |
|-------|------|
| Frontend | React 19, Vite |
| Backend | Express 4, Node.js |
| AI | Groq API (Llama 3.3 70B) |
| Security | Helmet, CORS, Rate Limiting, Safety Middleware |

## Environment Variables

| Variable | Description |
|----------|-------------|
| `PORT` | Server port (default: 3001) |
| `NODE_ENV` | Environment (development/production) |
| `GROQ_API_KEY` | Groq API key for AI intent parsing |