Quick Start Guide
Prerequisites
- Python 3.8+
- MongoDB instance
- Environment variables configured
- JWT authentication service
Setup
-
Install dependencies:
pip install -r requirements.txt
# or using uv
uv sync -
Configure environment variables:
-
Configure environment variables:
cp .env.example .env
# Edit .env with your configuration
Service Access
The Recommend service is deployed and accessible at: https://recommend.trydodo.xyz
Authentication
Get JWT token from the Admin service authentication endpoints:
# Sign up
curl -X POST "https://admin.trydodo.xyz/api/users/signup" \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "your-password"}'
# Login
curl -X POST "https://admin.trydodo.xyz/api/users/login" \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "your-password"}'
First API Call
-
Test the health endpoint:
curl https://recommend.trydodo.xyz/health -
Create a product:
-
Create a product:
curl -X POST "https://recommend.trydodo.xyz/api/products/upload" \
-H "Authorization: Bearer <your-jwt-token>" \
-H "Content-Type: application/json" \
-d '[{
"customer_id": "test_user",
"name": "Test Product",
"price": 99.99
}]' -
Get recommendations:
curl -X POST "http://localhost:5051/api/recommend" \
-H "Authorization: Bearer <your-jwt-token>" \
-H "Content-Type: application/json" \
-d '{
"sequence_data": {"preferences": ["electronics"]},
"task": "product_recommendation",
"template": "personalized"
}'Note: The
model_keyparameter is optional.
Next Steps
- Read the API Overview for detailed endpoint information
- Review Products API for product management
- Explore Recommendations API for recommendation features