ChakraGuru Documentation
Internal documentation for the ChakraGuru mobile app — a wellness platform that combines yoga, spirituality, and Mayan calendar knowledge into one holistic wellness solution.
Tech Stack
| Layer | Technology |
|---|---|
| Framework | React Native + Expo |
| Language | TypeScript |
| Navigation | Expo Router |
| State Management | Redux + Redux Persist |
| Authentication | Firebase Auth |
| Internationalization | i18next |
| Animations | React Native Reanimated |
| Icons | Lucide React Native |
| API Client | Axios |
Getting Started
New to the codebase? Start here:
- Quick Start — Setup, mandatory patterns, and common pitfalls (~30 min read)
- Theme System — Dynamic theming with 3 built-in themes
- Internationalization — English and Spanish support
- Navigation — Type-safe routing with
useAppNavigation()
Guides
Hand-written documentation covering key systems and patterns:
| Guide | Description |
|---|---|
| Quick Start | Setup, mandatory patterns, project structure, and common pitfalls |
| Theme System | How to use useTheme() and available theme properties |
| Internationalization | Using i18next for multi-language support |
| Navigation Hook | The useAppNavigation() hook for type-safe navigation |
| JS Stack Navigation | Custom Stack navigator for transparent screens |
| Protected Routes | Auth-based route protection architecture |
| Keyboard Handling | The useKeyboardOffset() hook for forms |
| Banner Offset | Handling network banner overlap |
| Input Validation | Form validation with useFieldValidation() |
| Logger | Structured logging with the logger utility |
| Network Awareness | Handling offline/online states |
| Testing | Test patterns and setup |
Code Reference
Auto-generated documentation from JSDoc comments in the codebase:
| Section | Description |
|---|---|
| Hooks | Custom React hooks (useTheme, useAppNavigation, useKeyboardOffset, etc.) |
| Contexts | React contexts (AuthContext, NetworkContext, etc.) |
| Components | Reusable UI components |
| Utilities | Helper functions and services |
Project Structure
| Directory | Purpose |
|---|---|
app/ | Screens and layouts using Expo Router file-based routing |
app/(auth)/ | Login, forgot password — shown when unauthenticated |
app/(onboarding)/ | Email verification, profile setup — shown during registration |
app/(app)/ | Main app with tabs and drawer — shown when fully authenticated |
components/ | Reusable UI components (buttons, inputs, cards, navigation) |
hooks/ | Custom React hooks (useAppNavigation, useKeyboardOffset, etc.) |
contexts/ | React contexts (AuthContext, NetworkContext) |
theme/ | Theme system with useTheme() hook and color schemes |
i18n/ + locales/ | i18next config and translation files (en, es) |
store/ | Redux store with slices for user, onboarding, dev settings |
utils/ | Utilities including validation system and logger |
api/ | Axios client with auth interceptor and endpoint functions |
firebase/ | Firebase Auth configuration |
Contributing to Docs
Manual Documentation
Add new guides to docs/guides/ and update website/sidebars.js to include them in the navigation.
Code Reference
Code reference is auto-generated from JSDoc comments in the source code. To update:
- Add or update JSDoc comments in your code
- Run
npm run docs:generateto regenerate the reference
Development
# Generate API reference from JSDoc
npm run docs:generate
# Start local documentation server
npm run docs:dev
# Build for production
npm run docs:build
# Preview production build
npm run docs:serve