This is the backend for the PDF AI project, built with Django and Django REST Framework (DRF).
git clone https://github.com/faselgodbcho/pdfai-backend.git
cd pdfai-backendMake sure you have Python 3.11+ and pip installed.
python -m venv .venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtpython manage.py migratepython manage.py runserverTo serve the backend over HTTPS in local development:
Follow this guide to install mkcert.
./runhttpsWhat this does
- Creates a ./certs folder if it doesn't exist
- Generates a self-signed certificate and key using mkcert if not already present
- Starts the Django dev server over HTTPS using runsslserver
⚠️ Make sure runhttps is executable:
# on linux
chmod +x runhttpsDEBUG=True
COHERE_API_KEY=your_cohere_api_key_here
ALLOWED_HOSTS=localhost,127.0.0.1
SECRET_KEY=your_django_secret_key_here
CORS_ALLOWED_ORIGINS=http://localhost:3000
DATABASE_URL=postgres://user:password@localhost:5432/dbname
CSRF_TRUSTED_ORIGINS=https://localhost:8000,http://localhost:3000
- Python 3.11+
- Django 5+
- Django REST Framework (DRF)
- mkcert (for local HTTPS)
Helpful documentation and tools used during development:
- Django — Official Django documentation
- Django REST Framework — Toolkit for building Web APIs
- Cohere Docs — Embedding and command R+ API references
- mkcert — Generate trusted local SSL certificates
Made with ❤️ by @faselgodbcho