Skip to main content

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

LayerTechnology
FrameworkReact Native + Expo
LanguageTypeScript
NavigationExpo Router
State ManagementRedux + Redux Persist
AuthenticationFirebase Auth
Internationalizationi18next
AnimationsReact Native Reanimated
IconsLucide React Native
API ClientAxios

Getting Started

New to the codebase? Start here:

  1. Quick Start — Setup, mandatory patterns, and common pitfalls (~30 min read)
  2. Theme System — Dynamic theming with 3 built-in themes
  3. Internationalization — English and Spanish support
  4. Navigation — Type-safe routing with useAppNavigation()

Guides

Hand-written documentation covering key systems and patterns:

GuideDescription
Quick StartSetup, mandatory patterns, project structure, and common pitfalls
Theme SystemHow to use useTheme() and available theme properties
InternationalizationUsing i18next for multi-language support
Navigation HookThe useAppNavigation() hook for type-safe navigation
JS Stack NavigationCustom Stack navigator for transparent screens
Protected RoutesAuth-based route protection architecture
Keyboard HandlingThe useKeyboardOffset() hook for forms
Banner OffsetHandling network banner overlap
Input ValidationForm validation with useFieldValidation()
LoggerStructured logging with the logger utility
Network AwarenessHandling offline/online states
TestingTest patterns and setup

Code Reference

Auto-generated documentation from JSDoc comments in the codebase:

SectionDescription
HooksCustom React hooks (useTheme, useAppNavigation, useKeyboardOffset, etc.)
ContextsReact contexts (AuthContext, NetworkContext, etc.)
ComponentsReusable UI components
UtilitiesHelper functions and services

Project Structure

DirectoryPurpose
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:

  1. Add or update JSDoc comments in your code
  2. Run npm run docs:generate to 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