Skip to content

Zoro-chi/Comforter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

121 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Comforter AI

โœ… Backend Integration Complete | ๐ŸŽฏ Frontend Development Ready

Comforter is an AI-powered spiritual## ๐ŸŽจ Frontend Development Ready

Recommended Screens for UI/UX Design

  1. Welcome/Login Screen - User authentication and onboarding
  2. Home Dashboard - Quick access to all AI features
  3. AI Chat Screen - Real-time messaging interface
  4. Scripture Search - Biblical text search and results
  5. Devotionals/Prayers - Generated content viewing and management
  6. User Profile/Settings - Account management and preferences

Design Guidelines

  • Theme: Minimalist Christian-inspired design
  • Colors: Soft, calming palette with warm accents
  • Experience: Focus on spiritual comfort and ease of use

๐Ÿ“ Project Structure

/Comforter
โ”œโ”€โ”€ AI/                     # FastAPI AI Service (โœ… Complete)
โ”‚   โ”œโ”€โ”€ api/               # Main FastAPI application
โ”‚   โ”œโ”€โ”€ orchestratorAgent/ # AI orchestration logic
โ”‚   โ”œโ”€โ”€ [8 AI Agents]/    # Specialized AI functionality
โ”‚   โ””โ”€โ”€ utils/             # Shared utilities and authentication
โ”œโ”€โ”€ Backend/               # Node.js Express Server (โœ… Complete)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ routes/       # API routes and AI proxy
โ”‚   โ”‚   โ”œโ”€โ”€ services/     # WebSocket and business logic
โ”‚   โ”‚   โ”œโ”€โ”€ middleware/   # Authentication and validation
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ””โ”€โ”€ Frontend/              # React Native App (๐ŸŽฏ In Development)
    โ””โ”€โ”€ [To be implemented]

๐Ÿ”ง Environment Configuration

Backend (.env)

AI_SERVICE_URL=http://localhost:8888  # Development
AI_SERVICE_URL=http://ai-service:8888 # Docker
AI_SERVICE_TIMEOUT=30000
JWT_SECRET=your-jwt-secret
MONGODB_URI=mongodb://localhost:27017/comforter
SQL_URI=postgres://user:pass@localhost:5432/comforter

AI Service (.env)

OPENAI_API_KEY=your-openai-key
QDRANT_URL=http://localhost:6333
REDIS_URL=redis://localhost:6379
DATABASE_URL=postgres://user:pass@localhost:5432/comforter

๐Ÿ“š Documentation

  • AI Service: AI/api/README.md - Complete API documentation
  • WebSocket Integration: Backend/WEBSOCKET_COMPLETION_SUMMARY.md
  • Project Status: todo - Detailed development progress

๐Ÿงช Testing

WebSocket Integration Test

cd Backend
node test_docker_environment.js

AI Service Health Check

curl http://localhost:8888/health
curl http://localhost:8888/docs  # API documentation

๐Ÿš€ Development Roadmap

โœ… Completed (Phase 1 & 2)

  • AI Service Infrastructure with 8 specialized agents
  • Node.js Backend with complete AI proxy integration
  • WebSocket real-time chat functionality
  • JWT authentication and rate limiting
  • Docker containerization and testing
  • Comprehensive documentation

๐ŸŽฏ Current Phase (Phase 3)

  • Frontend React Native development
  • UI/UX design implementation
  • WebSocket client integration
  • Real-time chat interface

๐Ÿ”ฎ Future Phases

  • Advanced features (typing indicators, presence)
  • Message history and conversation persistence
  • Production deployment and monitoring
  • Mobile app store distributionuidance platform that provides real-time chat, scripture search, devotionals, prayers, and biblical commentary through intelligent AI agents. Built with a production-ready Node.js backend, FastAPI AI service, and WebSocket integration for seamless real-time communication.

๐Ÿš€ Current Status

โœ… Completed Infrastructure

  • AI Service: 8 specialized AI agents with orchestrator (FastAPI on port 8888)
  • Backend: Node.js Express server with complete AI proxy (port 3000)
  • WebSocket: Real-time chat integration with JWT authentication
  • Docker: Production-ready containerized environment
  • Testing: Comprehensive end-to-end integration testing

๐ŸŽฏ Next Phase: Frontend Development

  • React Native/Frontend integration with WebSocket endpoints
  • UI/UX implementation with Christian-inspired design
  • Real-time chat interface development

Features

๐Ÿค– AI-Powered Core Features

  • Real-Time AI Chat โ€“ WebSocket-based instant messaging with spiritual AI guidance
  • Scripture Search โ€“ Natural language search through biblical texts
  • Personalized Devotionals โ€“ AI-generated daily devotionals and reflections
  • Prayer Assistant โ€“ Guided prayer generation and spiritual support
  • Biblical Commentary โ€“ AI-powered verse explanations and theological insights
  • Study Guides โ€“ Intelligent study material generation

๐Ÿ”ง Technical Features

  • JWT Authentication โ€“ Secure user authentication with token-based access
  • Rate Limiting โ€“ Redis-based request throttling and user protection
  • WebSocket Proxy โ€“ Real-time bidirectional communication
  • Microservices Architecture โ€“ Scalable Node.js backend with FastAPI AI service
  • Docker Environment โ€“ Complete containerized deployment solution

๐Ÿ—๏ธ Architecture

Production-Ready Infrastructure

Frontend (React Native) 
    โ†“ WebSocket/HTTP
Backend (Node.js + Express)
    โ†“ HTTP Proxy + WebSocket
AI Service (FastAPI + 8 Agents)
    โ†“ Database Access
Databases (PostgreSQL + MongoDB + Redis + Qdrant)

Key Components

  • Frontend: React Native mobile application (in development)
  • Backend: Node.js/Express proxy server with WebSocket support
  • AI Service: FastAPI service with 8 specialized AI agents
  • WebSocket Service: Real-time chat with JWT authentication
  • Databases: PostgreSQL, MongoDB, Redis (rate limiting), Qdrant (vector storage)

AI Agents

  1. Scripture Search Agent - Biblical text search and retrieval
  2. Chatbot Agent - Real-time spiritual conversation
  3. Devotional Creator Agent - Daily devotional generation
  4. Prayer Assistant Agent - Guided prayer creation
  5. Commentary Agent - Biblical commentary and explanation
  6. Study Guide Agent - Study material generation
  7. User Profile Agent - Personalization and preferences
  8. Web Search Agent - External content integration

๐Ÿš€ Quick Start

Docker Environment (Recommended)

cd /Users/zoro/Desktop/JR/Projects/Comforter
docker-compose up --build

# Services will be available at:
# Backend: http://localhost:3000
# AI Service: http://localhost:8888
# WebSocket: ws://localhost:3000/ws/chat

Local Development

# Terminal 1 - Start AI Service
cd AI
conda activate .venv/
python api/main.py

# Terminal 2 - Start Backend
cd Backend
npm install
npm run dev

# Terminal 3 - Test WebSocket
cd Backend
node test_docker_environment.js

๐Ÿ“ก API Endpoints

Backend Proxy Routes

  • POST /api/ai/chat - AI chat messages
  • POST /api/ai/scripture/search - Scripture search
  • POST /api/ai/devotionals/generate - Generate devotionals
  • POST /api/ai/prayers/generate - Generate prayers
  • POST /api/ai/commentary/generate - Generate commentary
  • POST /api/ai/study-guides/generate - Generate study guides
  • GET /api/ai/health - AI service health check

WebSocket Endpoints

  • ws://localhost:3000/ws/chat?token=JWT_TOKEN - Real-time chat

Authentication

All endpoints require JWT Bearer token authentication:

Authorization: Bearer <your-jwt-token>

๐Ÿค Contributing

We welcome contributions from developers, AI researchers, theologians, and UI/UX designers. Whether you want to:

  • Developers: Enhance backend functionality, add new AI agents, or improve WebSocket features
  • Frontend Developers: Build the React Native interface and implement WebSocket client
  • Designers: Create beautiful, spiritual UI/UX designs in Figma
  • Theologians: Improve AI responses and biblical accuracy
  • Testers: Help test functionality and report issues

Feel free to submit issues, feature requests, or pull requests.

๐Ÿ“ž Support & Contact

  • Issues: Use GitHub Issues for bug reports and feature requests
  • Documentation: Check the todo file for current development status
  • Testing: Run the test scripts in the Backend directory for integration testing

Last Updated: June 9, 2025
Status: Backend & WebSocket Integration Complete โœ… | Frontend Development Ready ๐ŸŽฏ

Built with โค๏ธ for spiritual growth and community

About

An AI powered Bible

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors