Intelligent Self-Reflection Through AI-Powered Conversation
Reflectra is an advanced self-reflection platform that combines dynamic personality modeling with AI-driven mirroring to help you understand yourself better. Through continuous conversation analysis, it learns your behavioral patterns, traits, and communication style—then reflects them back to you in meaningful, personalized interactions.
- Dynamic Persona System — Learns and adapts to your unique behavioral patterns with weighted confidence tracking
- AI Mirror Mode — Reflective responses that authentically mirror your communication style and personality traits
- Conversation Intelligence — Deep analysis of past conversations to extract behavioral insights and patterns
- Confidence-Based Learning — Continuously refines understanding through statistically-sound trait modeling
- Memory & Context — Maintains rich conversation history with contextual awareness for meaningful follow-ups
- User-Controlled Privacy — Full control over your data with granular settings and digital twin controls
Reflectra
├── Backend (FastAPI)
│ ├── Persona Engine - Trait extraction, snapshots, mirroring
│ ├── Conversation Store - Rich history with context preservation
│ ├── Analytics Service - Behavioral insights and pattern detection
│ └── Database (SQLAlchemy) - Persistent persona & conversation storage
│
├── Frontend (React + TypeScript)
│ ├── Chat Interface - Intuitive conversation UI
│ ├── Analytics Dashboard - Visualization of behavioral insights
│ └── Settings Panel - Control over persona learning & privacy
│
└── AI Integration
└── Mistral AI API - Advanced language understanding & generation
- Python 3.12 or higher
- Node.js 18 or higher
- Git for version control
git clone https://github.com/vaishnav1906/reflectra.git
cd reflectrapython3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r backend/requirements.txtcd frontend
npm install
cd ..Create backend/.env with your configuration:
# AI Provider
MISTRAL_API_KEY=your_mistral_api_key_here
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/reflectra
# (Optional) Other configurations
DEBUG=false./scripts/restart-all.sh
./scripts/check-status.sh# Terminal 1: Backend
source .venv/bin/activate
cd backend
python -m uvicorn app.main:app --reload --port 8000
# Terminal 2: Frontend
cd frontend
npm run devVisit http://localhost:5173 to access the application.
Comprehensive documentation is available in the /docs directory:
- Persona System — Deep dive into dynamic personality modeling
- Mirror Mode — How the AI learns and reflects your style
- Architecture — System design and component interactions
- API Reference — Complete API documentation
Run the test suite to ensure everything is working correctly:
# Backend tests
pytest tests/backend/
# Frontend tests
cd frontend && npm run testWe welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License — see the LICENSE file for details.
Have questions or need help? Feel free to:
- Open an issue
- Check existing documentation
- Review past discussions
Built with ❤️ for better self-understanding through AI cd backend alembic upgrade head uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
In another terminal:
```bash
cd frontend
npm run dev
.
├── backend/
├── frontend/
├── scripts/
├── tests/
├── docs/
├── data/
├── README.md
└── .gitignore
scripts/restart-all.sh- restart backend and frontendscripts/restart-backend-with-conversations.sh- restart backend onlyscripts/check-status.sh- health and dependency checksscripts/test-conversations.sh- conversation endpoint checks
Backend and integration-style tests are centralized under tests/backend.
Examples:
python tests/backend/test_conversations.py
python tests/backend/test_past_conversations.py
python tests/backend/test_mirror_confidence_updates.pyCanonical docs are in docs/.
- architecture-fix.md
- conversation-history.md
- past-conversations.md
- persona-quickstart.md
- persona-system.md
- error-handling-improvements.md
- backend-cors-fix.md
MIT