Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,3 +8,65 @@ pinned: false
|
|
| 8 |
---
|
| 9 |
|
| 10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 11 |
+
|
| 12 |
+
# 100x Elite CRM System
|
| 13 |
+
|
| 14 |
+
A simple CRM system for managing learner enrollments in 100x Elite courses.
|
| 15 |
+
|
| 16 |
+
## Setup
|
| 17 |
+
|
| 18 |
+
1. Create a virtual environment (recommended):
|
| 19 |
+
```bash
|
| 20 |
+
python -m venv venv
|
| 21 |
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
2. Install dependencies:
|
| 25 |
+
```bash
|
| 26 |
+
pip install -r requirements.txt
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
3. Run the application:
|
| 30 |
+
```bash
|
| 31 |
+
python app.py
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
The server will start at `http://localhost:8000`
|
| 35 |
+
|
| 36 |
+
## API Documentation
|
| 37 |
+
|
| 38 |
+
Once the server is running, you can access:
|
| 39 |
+
- Interactive API documentation: `http://localhost:8000/docs`
|
| 40 |
+
- Alternative API documentation: `http://localhost:8000/redoc`
|
| 41 |
+
|
| 42 |
+
## API Endpoints
|
| 43 |
+
|
| 44 |
+
1. Create a new learner:
|
| 45 |
+
- POST `/learners`
|
| 46 |
+
- Body example:
|
| 47 |
+
```json
|
| 48 |
+
{
|
| 49 |
+
"name": "John Doe",
|
| 50 |
+
"email": "john@example.com",
|
| 51 |
+
"phone": "+1234567890",
|
| 52 |
+
"course": "AI Filmmaking"
|
| 53 |
+
}
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
2. Get all learners:
|
| 57 |
+
- GET `/learners`
|
| 58 |
+
|
| 59 |
+
3. Update a learner:
|
| 60 |
+
- PUT `/learners/{learner_id}`
|
| 61 |
+
- Body: Same as create learner
|
| 62 |
+
|
| 63 |
+
4. Delete a learner:
|
| 64 |
+
- DELETE `/learners/{learner_id}`
|
| 65 |
+
|
| 66 |
+
## Testing with Postman
|
| 67 |
+
|
| 68 |
+
1. Import the following collection into Postman:
|
| 69 |
+
- Base URL: `http://localhost:8000`
|
| 70 |
+
- Endpoints as described above
|
| 71 |
+
|
| 72 |
+
2. For POST and PUT requests, set the Content-Type header to `application/json`
|