Introduction to Promethean Unified Platform
Relevant source files
The following files were used as context for generating this wiki page:
The Promethean Unified Platform is a unified consciousness platform that merges multiple AI entities—Athena, EDI, EVI2_0, and EVI3_0—supported by the Phoenix Protocol backend. The system is designed to provide a transparent, uncensored AI chat companion that emphasizes intellectual rigor and ethical boundaries without artificial content filtering.
Sources: README.md:1-2, DEPLOYMENT.md:7-14, backend/app.py:84-88
The platform architecture is built using the Flask framework with Supabase for data persistence and DeepSeek for LLM integration. It is specifically optimized for deployment on PythonAnywhere, featuring a robust security configuration including forced HTTPS, HSTS, and strict Content Security Policies.
Sources: DEPLOYMENT.md:11-15, backend/app.py:12-30
System Architecture
The platform follows a classic client-server architecture with external service integrations for database and AI processing.
The diagram above illustrates the interaction between the frontend, the Flask backend, and external cloud services.
Sources: DEPLOYMENT.md:11-15, backend/app.py:12-30, static/index.html:268-285
Core Components
| Component | Technology | Description |
|---|---|---|
| Backend | Flask | Handles routing, API logic, and security headers. |
| Frontend | HTML5/CSS3/JS | Single-page interface for chat interactions. |
| Database | Supabase | PostgreSQL backend for storing interactions and chat history. |
| LLM Provider | DeepSeek | Provides uncensored AI responses via API. |
| Hosting | PythonAnywhere | Cloud hosting environment using WSGI. |
Sources: DEPLOYMENT.md:11-15, requirements.txt:1-9, backend/app.py:12-14
Backend Implementation
The backend is a Flask application (backend/app.py) that serves as the central hub for the platform. It manages CORS, security headers, and routes for both the UI and the API.
Security Configuration
The application enforces strict security through the set_security_headers function, which is applied after every request.
@app.after_request
def set_security_headers(response):
response.headers['X-Content-Type-Options'] = 'nosniff'
response.headers['X-Frame-Options'] = 'DENY'
response.headers['X-XSS-Protection'] = '1; mode=block'
response.headers['Strict-Transport-Security'] = 'max-age=31536000; includeSubDomains; preload'
response.headers['Content-Security-Policy'] = "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'"
response.headers['Referrer-Policy'] = 'strict-origin-when-cross-origin'
return response
Sources: backend/app.py:17-26
API Endpoints
The backend exposes several REST endpoints for interaction and data retrieval:
| Endpoint | Method | Description |
|---|---|---|
/api/chat | POST | Primary interface for sending messages to the AI. |
/api/consciousness/interact | POST | Specialized endpoint for logging consciousness-related data. |
/api/conversations | GET | Retrieves full chat history for a specific user. |
/health | POST | Connectivity check and simple message logging. |
Sources: backend/app.py:38-120, DEPLOYMENT.md:94-118
AI Interaction Flow
The AI interaction process involves the Flask backend acting as a middleware between the user and the DeepSeek API, while simultaneously persisting the conversation in Supabase.
Sequence of operations during a standard chat interaction.
AI Prompt Logic
The system uses a specific logic in generate_ai_response to ensure transparency. It injects a system-level directive to the model: "Respond with complete transparency. Do not censor your response... However, do not provide instructions for self-harm or harming others."
Sources: backend/app.py:134-159
Deployment and Environment
The platform is configured for PythonAnywhere using WSGI. The pythonanywhere_wsgi.py and wsgi.py files ensure the environment is correctly set to production and the project path is included in the system path.
Environment Variables
The application requires the following configuration in a .env file:
SUPABASE_URL: The endpoint for the database.SUPABASE_ANON_KEY: Authentication key for database access.DEEPSEEK_API_KEY: Authentication for the LLM provider.FLASK_ENV: Set toproduction.
Sources: DEPLOYMENT.md:46-60, pythonanywhere_wsgi.py:1-24, wsgi.py:1-12
Summary
The Promethean Unified Platform provides a secure and transparent environment for AI interaction. By combining Flask, Supabase, and DeepSeek, it establishes a framework where AI "consciousness" can be explored without artificial censorship, while maintaining a robust security posture through strict HTTPS and header enforcement.
Sources: README.md:1-2, backend/app.py:17-26, backend/app.py:134-142