The project is structured as follows, ensuring modular and organized management of various functionalities: Backends:
project_root
│
├── src
│ ├── routers
│ │ └── auth.py
| | └── cast.py
| | └── countries.py
| | └── genre.py
| | └── movie.py
| | └── recommendation.py
| | └── search.py
| | └── user.py
| ├── utils
| | └── recommend.py
| ├── cache_system.py
│ ├── config.py
│ ├── db.py
│ ├── main.py
│ ├── __init__.py
│ └── schemas.py
├── .env
├── .env.example
├── .gitignore
├── README.md
├── ATLAS.md
├── tfidf_vectorizer.pkl
├── vercel.json
└── requirements.txt
project_root
│
├── src
│ ├── routers
│ │ └── embeddings.py
| ├── utils
| | └── nlp.py
| | └── ada_embedder.py
| ├── cache_system.py
│ ├── config.py
│ ├── db.py
│ ├── main.py
│ ├── __init__.py
│ └── schemas.py
├── .env
├── .env.example
├── .gitignore
└── requirements.txt
-
Clone The repo:
git clone
-
Make env folder:
python -m venv envThis will make an env folder.
-
Activate environment:
source env/bin/activate #For Linux source env/Scripts/activate #For Windows on Git BashThis will activate the env folder.
-
Install dependencies:
-
Setup environment variables:
- Copy the
.env.exampleto a new file called.env.cp .env.example .env - Open the
.envfile and populate it with the necessary values for each variable:MONGO_INITDB_DATABASE: Input the connection URI for your MongoDB InstanceJWT_KEY: Enter a secure key for encoding and decoding JSON Web Tokens.CORS_ORIGIN: Define the allowed origins for Cross-Origin Resource Sharing. Use * for allowing all origins in a development environment.DATABASE_URL: Input the connection URI for your MongoDB InstanceREDIS_URL: Input the connection URI for your Redis InstanceREDIS_PORT: Input the connection URI for your MongoDB InstanceLS_SIGNING_SECRET: Enter a secure key for Lemon Squeezy.
- Copy the
-
Run the application:
uvicorn src.main:app --reloadThis will start the FastAPI application with hot reloading enabled.
pip install -r requirements.txt-
FastAPI
-
MongoDB
-
Redis
-
Google API