A React-based frontend application that provides spiritual guidance from sacred texts across multiple religions and languages.
- Multi-Religious Support: Bhagavad Gita, Vedas, Quran, Bible, Guru Granth Sahib, Tripitaka, Tao Te Ching, Analects of Confucius, Dhammapada, Upanishads, Talmud, and Avesta
- Multi-Language Support: English, Hindi, Spanish, Portuguese, French, German, Arabic, Punjabi, Urdu, and more
- Four Guidance Modes: Seek Guidance, Understand, Reflect, and Ask Me (Socratic) — see below
- Crisis-Aware Compassion: Detects acute distress and responds with human warmth and real-world help, never a verse-dump
- Intellectual Humility: Every substantive response is accompanied by a transparency disclaimer
- Interactive UI: Breathing background animations, floating particles, and spiritual loader
- Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- Performance Optimized: Lazy loading, code splitting, and efficient rendering
Epic is built around a few deliberate principles:
- Lead with the human, not the verse. When a message signals acute distress or crisis, the app responds first with compassion and concrete real-world resources (helplines, support links) instead of parsing scripture into quotes.
- Meet people where they are. Four distinct modes let a user choose between comfort, learning, contemplation, and self-inquiry.
- Stay humble. Substantive responses carry a transparency disclaimer making clear this is reflective guidance, not authoritative religious ruling.
| Mode | Button | What it does |
|---|---|---|
| Guidance | Seek Guidance | Warm, personalized reflections rooted in scripture for your situation |
| Understand | Understand | Educational answers about religious teachings, concepts, and history |
| Reflect | Reflect | A single passage to sit with quietly, plus an open question to carry |
| Socratic | Ask Me | Returns the questions a tradition might gently ask you, instead of answers |
- React 19 - Modern React with hooks and functional components
- Vite - Fast build tool and development server
- FontAwesome - Icon library
Colour is derived, not hand-picked. Each of the ten traditions contributes a
single hue and saturation to src/styles/tokens.css, and every surface, ink
and accent shade is generated from it at fixed lightness steps. That keeps the
themes consistent and makes WCAG AA contrast a property of the system rather
than something to remember — tokens.contrast.test.js checks all ten
traditions against both colour schemes on every run. Dark mode follows the
operating system.
- Code Splitting - Lazy loading of components and chunks
- Service Worker - Caching and offline functionality
- Canvas Optimizations - Hardware-accelerated animations
- Memoization - React.memo and useMemo for performance
- Bundle Optimization - Tree shaking and minification
# Clone the repository
git clone <repository-url>
cd epic
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run buildsrc/
├── components/ # React components
│ ├── BreathingBackground.jsx
│ ├── FloatingParticles.jsx
│ ├── GuidanceForm.jsx
│ ├── ResponseSection.jsx
│ └── ...
├── hooks/ # Custom React hooks
│ ├── useGuidance.js
│ └── useTheme.js
├── pages/ # Routed pages
│ └── ConversationsPage.jsx
├── styles/ # CSS stylesheets
├── test/ # Test setup (jsdom + jest-dom)
├── scriptures.js # Single source of truth for all 13 sacred sources
├── prompts.js # Prompt templates, fed by the scripture registry
├── responseParser.js # Parses the labelled response contract
├── crisisDetection.js # Crisis-language detection + compassionate message
├── utils.js # Utility functions
└── App.jsx # Main application component
Everything that varies per sacred text — its label, glyph, theme, blurb,
placeholder copy, example verses, citation format, reference URL pattern and
breadth hint — lives in one row in src/scriptures.js. The header, the form,
the theme, the response heading, the archive filters and every prompt read from
it. Adding a tradition is one row, not ten edits across the codebase.
Nothing you write is stored unless you explicitly ask for it to be. The "share this anonymously" checkbox under the form is off by default, and only when it is ticked does a reflection reach the public archive. What people bring here reveals religious belief and personal circumstance — special-category data under GDPR Article 9 — which warrants explicit opt-in rather than silent collection.
Input that trips crisis detection is never sent to the model and never stored.
- Code Splitting: Separate chunks for React, prompts, and app logic
- Lazy Loading: ResponseSection component loaded on demand
- Tree Shaking: Unused code eliminated during build
- Minification: Aggressive code and CSS minification
- Memoization: Components and expensive calculations cached
- Canvas Optimization: Hardware acceleration for animations
- Caching: Service worker for static assets and API responses
- Component Cleanup: Proper cleanup of event listeners and animations
- Request Cancellation: In-flight guidance requests aborted when superseded
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run clean- Clean build directorynpm test- Run the test suite oncenpm run test:watch- Run tests in watch modenpm run coverage- Run tests with a coverage report
The project uses Vitest with @testing-library/react and a jsdom environment.
npm testCoverage includes:
- Crisis detection — language matching and the compassionate response shape
resolveMode— prompt/system selection across all four modesGuidanceForm— the four-mode toggle (render, active state, callbacks)ResponseSection— crisis support card, humility disclaimer, and normal scripture parsing
Tests run automatically in CI (.github/workflows/ci.yml) on every push and
pull request, and gate the GitHub Pages deploy (.github/workflows/deploy.yml).
The application includes built-in performance monitoring:
- Parse time tracking
- Render time optimization
- API call performance
- Memory usage monitoring
The application is optimized for deployment on Vercel, Netlify, or any static hosting service. The build process creates optimized static files in the dist/ directory.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details.