Dependencies & Requirements
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
The Promethean Unified Platform is a web-based AI chat companion system designed for transparency and uncensored communication. The platform integrates a Flask-based backend with external LLM providers (specifically DeepSeek) and utilizes Supabase for persistent data storage of interactions and chat history.
The system is architected to run in a production environment, specifically optimized for PythonAnywhere deployment, utilizing a virtual environment and WSGI configuration for secure, high-performance execution.
Sources: README.md:1-2, DEPLOYMENT.md:5-12, backend/app.py:12-14
Core Backend Dependencies
The backend relies on the Python 3.x ecosystem, specifically targeting version 3.10+. The core framework is Flask, supported by several middleware and utility libraries to handle Cross-Origin Resource Sharing (CORS), environment variables, and external API requests.
Python Package Requirements
| Package | Version | Description |
|---|---|---|
Flask | 3.0.0 | Core web framework for routing and API endpoints. |
Flask-CORS | 4.0.0 | Enables Cross-Origin Resource Sharing for frontend-backend communication. |
python-dotenv | 1.0.0 | Loads configuration from .env files. |
supabase | 2.0.3 | Client library for PostgreSQL database and real-time features. |
requests | 2.31.0 | Handles HTTP requests to the DeepSeek LLM API. |
gunicorn | 21.2.0 | WSGI HTTP Server for production deployment. |
Sources: requirements.txt:1-9, DEPLOYMENT.md:46-49
Service Integrations
The platform's logic flow depends on two primary external services:
- DeepSeek API: Provides the Large Language Model (LLM) capabilities for generating AI responses.
- Supabase: Serves as the database backend for storing interaction logs and chat messages.
The diagram shows the relationship between the central Flask backend and its external service dependencies.
Sources: backend/app.py:133-156, DEPLOYMENT.md:7-12
Environment Configuration
The application requires specific environment variables to be defined in a .env file for both security and service connectivity. These variables are critical for the initialization of the Supabase client and the DeepSeek API interface.
| Variable | Requirement | Description |
|---|---|---|
SUPABASE_URL | Required | The project-specific URL for the Supabase instance. |
SUPABASE_ANON_KEY | Required | The anonymous public key for database access. |
DEEPSEEK_API_KEY | Required | Authentication token for the DeepSeek LLM service. |
FLASK_ENV | Optional | Set to production for deployment. |
SERVER_PORT | Optional | Port for the local development server (default: 5000). |
Sources: DEPLOYMENT.md:55-68, backend/app.py:24-26
Deployment & Execution Requirements
For production deployment on PythonAnywhere, the system requires specific path configurations and a WSGI entry point to bridge the web server and the Flask application.
WSGI Configuration
The platform utilizes a manual WSGI configuration to ensure the project folder and backend directory are correctly added to the Python system path (sys.path).
# From pythonanywhere_wsgi.py
import os
import sys
project_home = '/home/littlebunneh/Promethean-Unified-Platform'
sys.path.insert(0, project_home)
sys.path.insert(0, os.path.join(project_home, 'backend'))
Sources: pythonanywhere_wsgi.py:7-10, wsgi.py:4-7
Infrastructure Requirements
- Hosting: PythonAnywhere (Manual configuration mode).
- Security: Mandatory HTTPS/SSL (Let's Encrypt), HSTS enabled with
max_age=31536000, and CSP headers. - Python Version: Python 3.10+ is recommended.
- Static Assets: Frontend files must be served from the
/staticdirectory via the Flasksend_from_directoryfunction or web server mapping.
Sources: DEPLOYMENT.md:37-43, DEPLOYMENT.md:105-110, backend/app.py:165-173
Frontend Requirements
The user interface is a single-page application (SPA) that requires a modern web browser with JavaScript enabled. It interacts with the backend through standard Fetch API calls.
API Consumption Flow
The sequence diagram illustrates the dependency flow from the UI through the backend to the LLM provider.
Sources: static/index.html:232-245, backend/app.py:133-150
Summary
The Promethean Unified Platform's operational readiness depends on a correctly configured Python 3.10 environment, a set of specific libraries (Flask, Supabase, Requests), and valid API credentials for DeepSeek and Supabase. Security is a core requirement, enforced through strict HTTPS headers and WSGI production settings.