This is the backend for the BackSlash project, built with FastAPI. It provides APIs for chat, posting tweets, and history, and integrates with Gemini, MongoDB, and a Twitter clone service.
BackSlash/
├── .venv/                     # Virtual environment (in root directory)
│   └── ...
├── BackEnd/
│   ├── .env                      # Your environment variables
│   ├── .gitignore
│   ├── requirements.txt          # Dependencies
│   ├── README.md
│   ├── main.py                   # App entrypoint (FastAPI instance)
│   ├── api/
│   │   ├── routes_chat.py
│   │   └── routes_misc.py
│   ├── services/
│   │   ├── gemini_service.py
│   │   ├── twitter_service.py
│   │   └── langchain_agent.py
│   ├── models/
│   │   ├── request_models.py
│   │   └── response_models.py
│   ├── db/
│   │   └── mongo.py
│   └── core/
│       ├── config.py
│       ├── logger.py
│       └── middleware.py
- Navigate to the root directory and activate the virtual environment:
cd BackSlash .venv\Scripts\activate # On Windows # or source .venv/bin/activate # On Unix/Linux 
- Navigate to BackEnd and install dependencies:
cd BackEnd pip install -r requirements.txt
- Copy .envand fill in your environment variables.
- Run the app:
uvicorn main:app --reload