A sophisticated recommendation system that suggests personalized video content based on user preferences and engagement patterns using deep neural networks. Ref: to see what kind of motivational content you have to recommend, take reference from our Empowerverse App ANDROID || iOS.
This project implements a video recommendation algorithm that:
- Delivers personalized content recommendations
- Handles cold start problems using mood-based recommendations
- Utilizes deep neural networks for content analysis
- Integrates with external APIs for data collection
- Implements efficient data caching and pagination
- Backend Framework: FastAPI
- Documentation: Swagger/OpenAPI
- Virtual environment (recommended)
-
Clone the Repository
git clone <repository-url> cd video-recommendation-engine
-
Set Up Virtual Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Configure Environment Variables Create a
.envfile in the root directory:FLIC_TOKEN=your_flic_token API_BASE_URL=https://api.socialverseapp.com
-
Run Database Migrations
alembic upgrade head
-
Start the Server
uvicorn app.main:app --reload
-
Get Personalized Feed
GET /feed?username={username}Returns personalized video recommendations for a specific user.
-
Get Category-based Feed
GET /feed?username={username}&category_id={category_id}Returns category-specific video recommendations for a user.
The system uses the following APIs for data collection:
-
Get All Viewed Posts (METHOD: GET):
https://api.socialverseapp.com/posts/view?page=1&page_size=1000&resonance_algorithm=resonance_algorithm_cjsvervb7dbhss8bdrj89s44jfjdbsjd0xnjkbvuire8zcjwerui3njfbvsujc5if -
Get All Liked Posts (METHOD: GET):
https://api.socialverseapp.com/posts/like?page=1&page_size=1000&resonance_algorithm=resonance_algorithm_cjsvervb7dbhss8bdrj89s44jfjdbsjd0xnjkbvuire8zcjwerui3njfbvsujc5if -
Get All Inspired posts (METHOD: GET):
https://api.socialverseapp.com/posts/inspire?page=1&page_size=1000&resonance_algorithm=resonance_algorithm_cjsvervb7dbhss8bdrj89s44jfjdbsjd0xnjkbvuire8zcjwerui3njfbvsujc5if -
Get All Rated posts (METHOD: GET):
https://api.socialverseapp.com/posts/rating?page=1&page_size=1000&resonance_algorithm=resonance_algorithm_cjsvervb7dbhss8bdrj89s44jfjdbsjd0xnjkbvuire8zcjwerui3njfbvsujc5if -
Get All Posts (Header required*) (METHOD: GET):
https://api.socialverseapp.com/posts/summary/get?page=1&page_size=1000 -
Get All Users (Header required*) (METHOD: GET):
https://api.socialverseapp.com/users/get_all?page=1&page_size=1000
For autherization pass Flic-Token as header in the API request:
Header:
"Flic-Token": "flic_11d3da28e403d182c36a3530453e290add87d0b4a40ee50f17611f180d47956f"Note: All external API calls require the Flic-Token header:
The recommendation engine uses a Deep Neural Network (DNN) architecture with the following components:
-
Data Preprocessing
- Feature engineering
- Data normalization
- Missing value handling
- Categorical encoding
-
Model Architecture
- Embedding layers for categorical features
- Dense layers with ReLU activation
- Dropout for regularization
- Output layer with appropriate activation
-
Cold Start Handling
- Mood-based initial recommendations
- Content-based filtering fallback
- Popularity-based recommendations
-
GitHub Repository
- Complete source code
- This README.md file
- Postman collection
- Database migration scripts
-
Video Submission
- Introduction Video (30-40 seconds)
- Personal introduction
- Project overview
- Technical Demo
- API demonstration using Postman
- Database operations
- Authentication flow
- Introduction Video (30-40 seconds)
-
Notification
- Join the Telegram group: Video Recommendation
- Notify upon completion
- All APIs are functional
- Database migrations work correctly
- README is complete and clear
- Postman collection is included
- Videos are submitted
- Code is well-documented
- Implementation handles edge cases
- Proper error handling is implemented