I built this project to demonstrate three practical backend skills often tested in internships:
- Building a recommendation endpoint using machine learning basics
- Exposing webhook-friendly APIs for workflow tools such as n8n
- Creating domain-specific text embeddings for LLM and SLM workflows
- Accepts a user query and returns relevant catalog items using TF-IDF + cosine similarity
- Accepts text and returns a vector representation suitable for downstream retrieval experiments
- Accepts webhook event payloads for event-driven integration patterns
- Python
- FastAPI
- Pandas, NumPy
- Scikit-learn
- n8n compatible webhook flow
- app/main.py: FastAPI routes and app setup
- app/services.py: recommendation and embedding logic
- app/schemas.py: request models
- data/products.csv: sample domain dataset
- workflows/n8n_webhook_recommendation.json: example n8n flow
- Create and activate a virtual environment
- Install dependencies from requirements.txt
- Start the API with uvicorn
Commands:
python -m venv .venv ..venv\Scripts\Activate.ps1 pip install -r requirements.txt uvicorn app.main:app --reload --port 8000
Docs URL after startup (local machine only): http://127.0.0.1:8000/docs
- POST /recommend
- POST /embed
- POST /webhooks/events
- Local API docs: http://127.0.0.1:8000/docs
- Live deployment URL: add after deployment
- Suggested screenshots:
- docs_home.png
- recommend_response.png
POST /recommend { "query": "python api backend", "top_k": 3 }
POST /embed { "text": "agentic workflow with embeddings" }
Sample response from POST /recommend { "query": "python api backend", "results": [ { "product_id": 1, "title": "FastAPI Masterclass", "category": "backend", "score": 0.73 } ] }
- Add authentication and rate limiting
- Add persistent query analytics
- Add automated tests and CI checks