Ensure you have the following installed on your system:
- Python >= 3.8
pip(Python package manager)
To isolate the project dependencies, create a virtual environment named venv:
cd Amdocs-GenAI-Hackathon-Backend
python -m venv venvActivate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
Install the required dependencies from the requirements.txt file:
pip install -r backend/requirements.txtCreate a .env file in the project's root directory to store environment-specific settings, such as secret keys and database credentials. Use the following format:
EMAIL_PORT=
EMAIL_USE_TLS=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
DEFAULT_FROM_EMAIL=
GROQ_API_KEY=
GITHUB_API_KEY=
LINKEDIN_API_KEY=
QDRANT_API_KEY=
QDRANT_URL=
NEO4J_URI=
NEO4J_USERNAME=
NEO4J_PASSWORD=
AURA_INSTANCEID=
AURA_INSTANCENAME=
Ensure the .env file is included in .gitignore to prevent it from being tracked by version control.
Run the following commands to apply database migrations:
python backend/manage.py makemigrations
python backend/manage.py migrateCreate a superuser for Django admin:
python backend/manage.py createsuperuserStart the development server to run the project locally:
python backend/manage.py runserverThe server will be available at http://127.0.0.1:8000/ by default.
Create three collections in Qdrant with the following schema:
{
"collection_name": "learning_modules",
"vectors_config": {
"size": 384,
"distance": "COSINE"
},
"payload_schema": {
"roadmap": {
"topics": ["Array of strings"],
"prerequisites": ["Array of strings"],
"weekly_breakdown": ["Array of strings"],
"key_milestones": ["Array of strings"]
},
"practice": {
"active_recall": "String",
"hands_on_projects": "String",
"debugging_scenarios": "String",
"collaborative_learning": "String"
}
}
}{
"collection_name": "tests_collection",
"vectors_config": {
"size": 384,
"distance": "COSINE"
},
"payload_schema": {
"questions": [
{
"question_type": "String",
"skill_tested": "String",
"difficulty_tier": "String",
"question": "String",
"options": ["Array of strings"],
"correct_answer": "String",
"diagnostic_insight": "String"
}
]
}
}{
"collection_name": "courses",
"vectors_config": {
"size": 384,
"distance": "COSINE"
},
"payload_schema": {
"title": "String",
"description": "String",
"category": "String",
"difficulty": "String",
"duration": "String",
"instructor": "String",
"rating": "Float",
"tags": ["Array of strings"],
"source": "String",
"url": "String"
}
}- If you encounter any issues, ensure all required dependencies are installed.
- To deactivate the virtual environment, use:
deactivate
