Vesryin/Spectra-AI-Library-Version

Richie

Richie Olejniczak

Spectra AI - Emotionally Intelligent Assistant

🌟 About Spectra

Spectra is an emotionally intelligent AI assistant designed to help with expression through music, conversation, healing, and creativity. Built specifically for Richie (Richard Jacob Olejniczak), Spectra provides a deeply personal and empathetic AI companion experience.

πŸš€ Quick Start

Prerequisites

Python 3.8 or higher
Node.js 16 or higher
Ollama (for local AI models)

Automatic Setup (Recommended)

Windows:
setup.bat
Linux/Mac:
chmod +x setup.sh
./setup.sh

Manual Setup

Install Ollama:
Or: winget install Ollama.Ollama (Windows)
Pull AI models:
ollama pull openhermes:7b-mistral-v2.5-q4_K_M
ollama pull mistral:7b
Install Python dependencies:
pip install -r requirements.txt
Install frontend dependencies:
cd frontend
npm install
cd ..
Configure environment:
copy .env.example .env  # Windows
cp .env.example .env # Linux/Mac

Running Spectra

Option 1: Using batch files (Windows)
Start Ollama: ollama serve
start-backend.bat - Starts the Python backend
start-frontend.bat - Starts the React frontend
Option 2: Manual
# Terminal 1 - Ollama
ollama serve

# Terminal 2 - Backend
python app.py

# Terminal 3 - Frontend
cd frontend
npm run dev
Then open: http://localhost:3000

Stopping Spectra

Option 1: Quick Stop (Fastest)
quick-stop.bat
Option 2: Graceful Shutdown (Recommended)
stop-all.bat
Option 3: Smart Shutdown (Tries graceful first, then force)
smart-stop.bat
Manual Stop:
Press Ctrl+C in each terminal running the services
Or use Task Manager to end Python, Node.js, and Ollama processes

πŸ—οΈ Project Structure

spectra-ai/
β”œβ”€β”€ app.py # Flask backend API
β”œβ”€β”€ requirements.txt # Python dependencies
β”œβ”€β”€ .env.example # Environment variables template
β”œβ”€β”€ frontend/ # React + TypeScript + Tailwind
β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ App.tsx # Main React app
β”‚ β”‚ β”œβ”€β”€ components/ # React components
β”‚ β”‚ └── api/ # API utilities
β”‚ β”œβ”€β”€ package.json # Node.js dependencies
β”‚ └── tailwind.config.js # Tailwind CSS config
β”œβ”€β”€ .vscode/ # VS Code workspace settings
β”œβ”€β”€ start-backend.bat # Backend startup script
β”œβ”€β”€ start-frontend.bat # Frontend startup script
β”œβ”€β”€ start-ollama.bat # Ollama startup script
β”œβ”€β”€ stop-all.bat # Graceful shutdown
β”œβ”€β”€ quick-stop.bat # Fast shutdown
β”œβ”€β”€ smart-stop.bat # Smart shutdown
└── test_integration.html # System testing interface

Spectra AI/ β”œβ”€β”€ app.py # Main Flask application (Ollama integration) β”œβ”€β”€ requirements.txt # Python dependencies (latest versions) β”œβ”€β”€ .env # Environment variables (Ollama model config) β”œβ”€β”€ spectra_prompt.md # Spectra's personality definition β”œβ”€β”€ setup.bat/.sh # Automated setup scripts β”œβ”€β”€ start-backend.bat # Quick backend launcher β”œβ”€β”€ start-frontend.bat # Quick frontend launcher β”œβ”€β”€ frontend/ # React + TypeScript + Tailwind frontend β”‚ β”œβ”€β”€ src/ β”‚ β”‚ β”œβ”€β”€ App.tsx # Main React app β”‚ β”‚ β”œβ”€β”€ components/ # React components β”‚ β”‚ β”œβ”€β”€ api/ # API integration β”‚ β”‚ └── types.ts # TypeScript types β”‚ β”œβ”€β”€ package.json # Frontend dependencies β”‚ └── vite.config.ts # Vite configuration β”œβ”€β”€ templates/ # Flask templates (fallback UI) β”œβ”€β”€ .vscode/ # VS Code settings (Pylance, formatting) β”œβ”€β”€ .github/ # GitHub configuration β”‚ └── copilot-instructions.md └── README.md # This file

## πŸ€– AI Configuration

### Ollama Models

- **Default**: `openhermes:7b-mistral-v2.5-q4_K_M` (optimized for emotional intelligence)
- **Alternative**: `mistral:7b` (faster responses)
- **Custom**: Set `OLLAMA_MODEL` in `.env`

### Model Management

```bash
ollama list # See installed models
ollama pull openhermes:7b-mistral-v2.5-q4_K_M # Install Spectra's model
ollama pull mistral:7b # Install alternative model
ollama rm openhermes:7b-mistral-v2.5-q4_K_M # Remove Spectra's model
ollama serve # Start Ollama server

🎭 Spectra's Personality

Spectra's personality and traits are defined in spectra_prompt.md. This file contains her emotional intelligence, conversation style, and core characteristics that make her uniquely suited to help with creative expression and emotional support.

πŸ”§ Configuration

API Providers

Claude (Anthropic): Set AI_PROVIDER=claude in .env
OpenAI: Set AI_PROVIDER=openai in .env

Customization

Modify spectra_prompt.md to adjust Spectra's personality
Update frontend files in static/ and templates/ for UI changes
Add new endpoints in app.py for additional features

🌈 Features (Planned)

Basic chat interface
Emotional intelligence and empathy
Music generation integration
Mood tracking
Creative writing tools
Healing and mindfulness features
Voice interaction
Memory and conversation history

🀝 Contributing

This is a personal project for Richie, but suggestions and improvements are welcome!

πŸ“ License

Private project - All rights reserved.
Like this project

Posted Aug 3, 2025

Spectra AI is a locally running, emotionally expressive assistant designed for artists, musicians, and healers. Built with Python and open-source LLMs, she off…