Installation & Getting Started
Relevant source files
The following files were used as context for generating this wiki page:
The Promethean Conduit is a full-stack application featuring a FastAPI backend and a React-based frontend. This guide outlines the procedures for setting up the development environment, configuring essential third-party services like Together.ai and MongoDB, and deploying the system to production environments such as PythonAnywhere.
Sources: DEPLOYMENT_GUIDE.md, frontend/package.json, backend/server.py
Prerequisites & Critical Credentials
Before installation, several external API keys and database connection strings must be obtained. These credentials power the core AI logic and data persistence of the portal.
Essential Credentials Table
| Credential | Purpose | Source/Location |
|---|---|---|
| Together.ai API Key | Powers DeepSeek-V3 AI chat interactions | api.together.xyz |
| MongoDB URL | Primary database connection string | MongoDB Atlas |
| Admin Password | Access to library management (Default: promethean-conduit-2025) | KEYS_AND_CREDENTIALS.md |
| Super Admin ID | ID for AI function calling privileges (admin_alex) | KEYS_AND_CREDENTIALS.md |
Sources: DEPLOYMENT_GUIDE.md:12-32, KEYS_AND_CREDENTIALS.md:10-50
Local Development Setup
The project is split into two main directories: backend/ and frontend/. Both require independent environment configuration via .env files.
Backend Setup (Python/FastAPI)
The backend utilizes FastAPI and motor for asynchronous MongoDB interactions.
- Environment Configuration: Create a
.envin the/backenddirectory. - Installation: Install dependencies listed in
requirements.txt. - Execution: Run the server (typically using
uvicorn).
cd backend
pip install -r requirements.txt
# Environment variables must be set before running
python server.py
Sources: DEPLOYMENT_GUIDE.md:58-71, backend/server.py:1-25
Frontend Setup (React/CRACO)
The frontend is built using React and managed by CRACO (Create React App Configuration Override) to support custom plugins for visual editing and health checks.
- Installation: Use
yarnornpmto install dependencies. - Environment Configuration: Define
REACT_APP_BACKEND_URLin/frontend/.env. - Execution: Start the development server.
cd frontend
yarn install
yarn start
Sources: frontend/package.json:61-65, frontend/README.md:10-15, frontend/craco.config.js:5-15
System Architecture & Data Flow
The application follows a standard client-server architecture. The frontend communicates with the FastAPI backend through a series of REST API endpoints prefixed with /api.
Application Component Flow
The following diagram illustrates the relationship between the User Interface, the Backend API, and external service providers.
Database Schema (Supabase/SQL Alternative)
While the primary setup uses MongoDB, the project provides a SQL schema for users opting for Supabase (PostgreSQL).
| Table | Description | Key Fields |
|---|---|---|
conversations | Stores session metadata | id, user_id, title, is_intergalactic |
messages | Stores individual chat logs | id, conversation_id, role, content |
library_entries | Content for the Truth Library | id, subclass_id, title, content |
admin_config | Persistent system settings | id, system_prompt |
Sources: DEPLOYMENT_GUIDE.md:120-175
Deployment to PythonAnywhere
Deployment involves building the frontend static assets and configuring a WSGI entry point for the FastAPI application.
Deployment Sequence
The sequence below depicts the build and configuration process for production.
Static File Mappings
For successful frontend delivery on PythonAnywhere, specific paths must be mapped in the Web tab:
- URL:
/-> Directory:/home/user/EVI2_0/frontend/build - URL:
/static-> Directory:/home/user/EVI2_0/frontend/build/static
Sources: DEPLOYMENT_GUIDE.md:85-115
Configuration Reference
Backend .env Template
MONGO_URL="your-mongodb-connection-string"
DB_NAME="promethean_conduit"
TOGETHER_API_KEY="your-key-here"
ADMIN_SECRET="promethean-conduit-2025"
CORS_ORIGINS="https://yourdomain.com"
Frontend .env Template
REACT_APP_BACKEND_URL=https://your-api-url.com
REACT_APP_ENABLE_VISUAL_EDITS=false
ENABLE_HEALTH_CHECK=false
Sources: KEYS_AND_CREDENTIALS.md:100-115, DEPLOYMENT_GUIDE.md:210-230
The Promethean Conduit is now ready for initialization. Once both tiers are running and the Together.ai key is validated, users can begin "Consciousness Dialogues" with the Athena EVI.