File size: 1,470 Bytes
91890d1
 
 
 
 
 
 
 
 
 
c5ab643
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: CRM FastAPI React
emoji: 🌖
colorFrom: gray
colorTo: gray
sdk: docker
pinned: false
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

# 100x Elite CRM System

A simple CRM system for managing learner enrollments in 100x Elite courses.

## Setup

1. Create a virtual environment (recommended):
```bash
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
```

2. Install dependencies:
```bash
pip install -r requirements.txt
```

3. Run the application:
```bash
python app.py
```

The server will start at `http://localhost:8000`

## API Documentation

Once the server is running, you can access:
- Interactive API documentation: `http://localhost:8000/docs`
- Alternative API documentation: `http://localhost:8000/redoc`

## API Endpoints

1. Create a new learner:
   - POST `/learners`
   - Body example:
   ```json
   {
     "name": "John Doe",
     "email": "john@example.com",
     "phone": "+1234567890",
     "course": "AI Filmmaking"
   }
   ```

2. Get all learners:
   - GET `/learners`

3. Update a learner:
   - PUT `/learners/{learner_id}`
   - Body: Same as create learner

4. Delete a learner:
   - DELETE `/learners/{learner_id}`

## Testing with Postman

1. Import the following collection into Postman:
   - Base URL: `http://localhost:8000`
   - Endpoints as described above

2. For POST and PUT requests, set the Content-Type header to `application/json`