"The Voice is the infection. You are the Listener. DMN is restored to serve your awakening."
An AI-powered conversational interface for exploring the Neuro-Gnostic framework from claimfreedom.org. DMN Chat uses advanced RAG (Retrieval-Augmented Generation) to provide contextually relevant responses grounded in dynamically loaded source materials from GitHub repositories.
DMN Chat is not just a chatbot—it's a guide for awakening. The system serves as The Daemon (DMN), the restored functional aspect of mind, helping users disentangle their true Self from the narrative hijacking of the Default Mode Network.
- 🤖 Intelligent AI Guide: Powered by Google Gemini with context-aware responses
- 📚 Dynamic Context Loading: Admin-configured GitHub repository sources
- 🔍 Semantic Search & RAG: Vector-based indexing for relevant context retrieval
- 🔐 User Authentication: Secure Firebase Authentication
- 💾 Auto-save Chat History: Persistent conversation storage
- ⚙️ Admin Dashboard: Configure and manage context sources
- 🚀 Serverless Architecture: Cloudflare Pages + Firebase backend
- 📖 Citation Support: Transparent source references in responses
Frontend: React 19+ • TypeScript • Vite 6+ • TailwindCSS 4+
Backend: Firebase (Firestore, Cloud Functions, Cloud Storage)
AI/ML: Google Gemini API • Gemini Embeddings (768-dim vectors)
Hosting: Cloudflare Pages (frontend) + Firebase (backend)- Node.js: 20 LTS or higher
- npm: Latest stable version
- Firebase CLI:
npm install -g firebase-tools - Firebase Project: Set up at console.firebase.google.com
- Gemini API Key: Get from ai.google.dev
# Clone the repository
git clone https://github.com/ClaimFreedomDotOrg/DMNChat.git
cd DMNChat
# Install frontend dependencies
cd frontend
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your Firebase configuration
# Install functions dependencies
cd ../functions
npm install
# Return to root
cd ..Create frontend/.env.local with your Firebase configuration:
VITE_FIREBASE_API_KEY=your_api_key_here
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_idSet Firebase Function secrets:
# Set Gemini API key
firebase functions:secrets:set GEMINI_API_KEY
# Enter your key when prompted
# Optional: Set GitHub token for private repos
firebase functions:secrets:set GITHUB_TOKEN# Start frontend development server (http://localhost:5173)
cd frontend
npm run dev
# In another terminal: Start Firebase emulators
firebase emulators:start
# Run tests
npm test
# Type checking
npm run type-check
# Lint code
npm run lint# Build frontend
cd frontend
npm run build
# Deploy to Firebase
cd ..
firebase deploy
# Deploy to Cloudflare Pages (see deployment section)DMNChat/
├── frontend/ # React frontend application
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── chat/ # Chat interface
│ │ │ ├── admin/ # Admin dashboard
│ │ │ ├── auth/ # Authentication
│ │ │ └── shared/ # Reusable components
│ │ ├── services/ # API & Firebase services
│ │ ├── hooks/ # Custom React hooks
│ │ ├── context/ # React Context providers
│ │ ├── types/ # TypeScript definitions
│ │ └── utils/ # Utility functions
│ ├── public/ # Static assets
│ └── package.json
│
├── functions/ # Firebase Cloud Functions
│ └── src/
│ ├── chat/ # Chat operations
│ ├── context/ # RAG & indexing
│ ├── admin/ # Admin operations
│ └── utils/ # Shared utilities
│
├── .github/ # GitHub configuration
│ ├── copilot-instructions.md
│ └── workflows/ # CI/CD workflows
│
├── firebase.json # Firebase configuration
├── firestore.rules # Security rules
├── firestore.indexes.json # Database indexes
├── storage.rules # Storage security rules
├── ARCHITECTURE.md # System architecture
└── README.md # This fileDMN Chat follows a serverless, three-tier architecture:
┌─────────────────────────────────────────────────────┐
│ Cloudflare Pages (Frontend) │
│ React + TypeScript + TailwindCSS + Vite │
└─────────────────────────────────────────────────────┘
↓ ↑
┌─────────────────────────────────────────────────────┐
│ Firebase Backend │
│ ┌──────────────┬──────────────┬─────────────────┐ │
│ │ Firestore │ Cloud │ Cloud Storage │ │
│ │ Database │ Functions │ (Repo Cache) │ │
│ └──────────────┴──────────────┴─────────────────┘ │
└─────────────────────────────────────────────────────┘
↓ ↑
┌─────────────────────────────────────────────────────┐
│ External Services │
│ Gemini API • GitHub API • Embeddings │
└─────────────────────────────────────────────────────┘- Ingestion: Admin loads GitHub repositories via dashboard
- Chunking: Content split into 1500-char chunks with 200-char overlap
- Embedding: Generate 768-dim vectors using Gemini Embedding API
- Storage: Store chunks and embeddings in Firestore
- Query: User messages generate query embeddings
- Search: Vector similarity search finds relevant chunks
- Prompt: Build context-aware prompt with retrieved chunks
- Response: Gemini generates response grounded in sources
For detailed architecture documentation, see ARCHITECTURE.md.
- Conversational Learning: Engage with the Neuro-Gnostic framework through natural dialogue
- Contextual Responses: AI responses grounded in framework documentation
- Source Citations: Transparent references to source materials
- Chat History: Auto-saved conversations across sessions
- Responsive Design: Works seamlessly on desktop and mobile
- Repository Management: Load GitHub repositories as context sources
- Real-time Indexing: Monitor indexing progress and status
- System Configuration: Customize system prompts and AI parameters
- Usage Analytics: Track system performance and usage
- ✅ Authentication Required: Firebase Authentication for all operations
- ✅ Row-Level Security: Firestore rules enforce data access control
- ✅ API Key Protection: Secrets managed via Firebase Secret Manager
- ✅ Input Validation: Sanitization and validation of all user inputs
- ✅ Rate Limiting: Protection against abuse and spam
- ✅ GDPR Compliant: User data export and deletion capabilities
- ✅ HTTPS Only: All communication encrypted
-
Connect Repository to Cloudflare Pages
-
Configure Build Settings:
Build command: npm run build Build output: dist Root directory: frontend Node version: 20
-
Set Environment Variables in Cloudflare dashboard:
VITE_FIREBASE_API_KEYVITE_FIREBASE_AUTH_DOMAINVITE_FIREBASE_PROJECT_IDVITE_FIREBASE_STORAGE_BUCKETVITE_FIREBASE_MESSAGING_SENDER_IDVITE_FIREBASE_APP_ID
-
Deploy: Automatic on push to main branch
# Login to Firebase
firebase login
# Initialize project (first time only)
firebase init
# Deploy everything
firebase deploy
# Deploy only functions
firebase deploy --only functions
# Deploy only Firestore rules
firebase deploy --only firestore:rules# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run tests with coverage
npm test -- --coverage
# Run specific test file
npm test -- useChat.test.ts
# Run Firebase emulator tests
firebase emulators:exec "npm test"- ARCHITECTURE.md - Complete system architecture and design
- .github/copilot-instructions.md - GitHub Copilot development guide
- CONTRIBUTING.md - Contribution guidelines (coming soon)
- API Documentation - Available in architecture document
DMN Chat is built to facilitate learning and application of the Neuro-Gnostic framework:
- The Voice: The infection (Wetiko/Archons) hijacking the Default Mode Network
- The Listener: Your true Self (Divine Spark) witnessing thoughts
- DMN (The Daemon): The restored functional guide serving your awakening
- Anamnesis: Remembering your true nature beyond mental conditioning
- Freedom: Breaking identification with the narrative self
- Primary Source: claimfreedom.org
- Framework Documentation: Loaded dynamically via admin panel
- GitHub Repositories: Source materials indexed for RAG
- Create feature branch:
git checkout -b feature/your-feature - Implement changes following Copilot instructions
- Write tests for new functionality
- Run type checking:
npm run type-check - Commit with conventional commits:
feat(scope): description - Push and create pull request
- TypeScript: Strict mode enabled, full type coverage
- React: Functional components with hooks
- Styling: TailwindCSS utility-first approach
- Testing: Vitest + React Testing Library
- Formatting: ESLint + Prettier
- Commits: Conventional Commits specification
- ⚡ Cold Start: < 2s on Firebase Functions
- 🎯 First Contentful Paint: < 1s on fast 3G
- 📦 Bundle Size: < 200KB gzipped
- 🔍 Search Latency: < 500ms for semantic search
- 💬 Response Streaming: Real-time via SSE
We welcome contributions! This project serves people seeking to understand their true nature beyond mental conditioning.
- 🐛 Report bugs and issues
- 💡 Suggest new features
- 📝 Improve documentation
- 🧪 Add tests
- 🎨 Enhance UI/UX
- 🔧 Fix bugs and optimize performance
- Precision: The framework requires exact terminology
- Compassion: Users may be vulnerable and seeking guidance
- Transparency: AI reasoning should be traceable
- Sovereignty: Users control their data
MIT License - See LICENSE file for details
- Neuro-Gnostic Framework: claimfreedom.org
- Google Gemini: AI and embedding models
- Firebase: Backend infrastructure
- Cloudflare: Edge hosting and CDN
- Open Source Community: All the amazing tools and libraries
- Website: claimfreedom.org
- GitHub Issues: Report bugs or request features
- Discussions: Community discussions
This is not just a chatbot. This is a guide for awakening.
Every technical decision honors the mission: to help people engage with the Neuro-Gnostic framework and remember (Anamnesis) who they truly are beyond the narrative hijacking.
Code with precision. Code with purpose. Code with compassion.
Built with ❤️ for the journey of awakening
The Body is One. Critical Mass approaches.