File size: 2,619 Bytes
fb38df2
 
 
 
 
 
 
 
 
 
83fe4f9
 
fb38df2
83fe4f9
 
 
fb38df2
 
83fe4f9
 
 
 
 
 
 
fb38df2
 
83fe4f9
 
fb38df2
83fe4f9
fb38df2
83fe4f9
 
 
 
 
 
fb38df2
83fe4f9
 
fb38df2
83fe4f9
 
fb38df2
 
 
 
 
 
 
 
 
83fe4f9
fb38df2
83fe4f9
fb38df2
83fe4f9
fb38df2
83fe4f9
fb38df2
83fe4f9
 
fb38df2
 
83fe4f9
 
fb38df2
83fe4f9
 
fb38df2
 
 
83fe4f9
 
fb38df2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83fe4f9
 
 
fb38df2
 
 
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
title: FlowPilot
emoji: "📬"
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
short_description: Gmail-first small business workflow automation with FastAPI.
---

# FlowPilot

FlowPilot is a Gmail-first automation layer for small business owners. The project includes:

- A FastAPI backend with analysis, workflow suggestion, workflow build, deploy, upload, status, and escalation endpoints.
- A primitive-based workflow engine that compiles and executes JSON workflows.
- A Chrome extension scaffold that injects a sidebar into Gmail and walks through the onboarding flow.
- Lightweight demo storage and tests for the core owner flow.

## Project Structure

```text
backend/
extension/
tests/
Dockerfile
README.md
```

## Local Development

Install dependencies and run the backend:

```bash
pip install -r backend/requirements.txt
uvicorn backend.main:app --reload
```

Create a `.env` in the repo root first:

```bash
nano .env
```

Set these values when you want live Groq responses:

```bash
AI_PROVIDER=groq
GROQ_API_KEY=your_groq_key
GROQ_MODEL=llama-3.3-70b-versatile
GROQ_BASE_URL=https://api.groq.com/openai/v1
GROQ_TIMEOUT_SECONDS=8
```

If `GROQ_API_KEY` is blank, FlowPilot falls back to local deterministic logic so the app and tests still work.

## Hugging Face Space

This repo is ready for a Docker Space. The container listens on port `7860`, and the metadata at the top of this README tells Hugging Face to treat it as a Docker app.

Typical flow:

```bash
git clone https://huggingface.co/spaces/technophyle/flow-pilot
cd flow-pilot
```

Copy this project into the cloned Space repo, then push:

```bash
git add .
git commit -m "Switch FlowPilot to Hugging Face Space with Groq"
git push
```

In the Hugging Face Space settings, add these secrets:

- `GROQ_API_KEY`

Optional Space variables:

- `AI_PROVIDER=groq`
- `GROQ_MODEL=llama-3.3-70b-versatile`
- `GROQ_BASE_URL=https://api.groq.com/openai/v1`
- `GROQ_TIMEOUT_SECONDS=8`
- `ANALYZE_WITH_AI=false`

For GitHub Actions auto-deploys, add these repository settings:

- Secret: `HF_TOKEN`
- Variable: `HF_SPACE_REPO=technophyle/flow-pilot`

## Extension

Load `extension/` as an unpacked Chrome extension. The sidebar currently points to `http://localhost:8000/api` for local work, so update that base URL when you connect it to your hosted Space backend.

## Notes

- Backend storage is currently lightweight demo storage suitable for iteration.
- Groq is used for live AI calls through its OpenAI-compatible chat completions API.
- The `/api/analyze` endpoint can still stay fast and deterministic when `ANALYZE_WITH_AI=false`.