How edwinrajesh/selene works
Project Type and Purpose
• This is a mobile client app built on Expo + React Native + TypeScript.
• It offers journaling, task management, media browsing, chat/AI-powered transcription, and user profiles.
• It uses file-based routing under the app/ directory and integrates with Firebase (via FirebaseConfig.ts) and an external AI API (via app/chat/grokapi.ts).
File Structure
• Top-level “app/” folder: file-based screens and layouts
• (tabs)/…: tab-based navigation pages (Home, Journal, Media, Task)
• chat/…: AIJournalScreen, Transcription, and API wrapper
• journals/…: CRUD pages for journal entries, tags, search
• tasks/…: task pages
• global layouts: _layout.tsx, Login.tsx, Profile.tsx
• src/components/: reusable UI components (buttons, lists, calendars, search bars)
• src/providers/: React Context providers for user data and date state
• FirebaseConfig.ts: initialization of Firebase services
• babel.config.js, tsconfig.json: build and type configuration
• assets/: fonts/images
README
• Confirms Expo/React Native, file-based routing, start commands.
• No backend server code here—backend responsibilities are fully offloaded to Firebase and external AI.
Main Components
a. Mobile Client Layer (Expo app)
• Entrypoint: app/index.tsx → Root layout _layout.tsx
• Navigation: file-based router → Tab navigator under app/(tabs)
• Screens: Home, Journal, Media, Task, Login, Profile, Chat module, Journals module, Tasks module
• UI Components: those under src/components/
b. State Management Layer
• UserDataProvider
• dateProvider
c. Service Layer
• Firebase services: Auth, Firestore (user profiles, journal entries, tasks), Storage (media)
• External AI API: grokapi wrapper calling OpenAI or similar
d. Static Assets
e. Build & Config
• Babel, TypeScript, package.json
Relationships and Data Flows
• UI Screens ↔ Providers (React Context)
• Providers ↔ Firebase SDK (reads/writes user data, journals, tasks, media URLs)
• Chat screens → grokapi.ts → External AI API → chat/transcriptions
• Assets → loaded by components at runtime
• Navigation flows: top-level layout → tab navigator → nested screens
Architectural Patterns & Design Principles
• File-based routing for navigation (Expo Router)
• Component-based UI layer
• Context API for global state (user, date)
• Service layer abstraction (FirebaseConfig, grokapi)
• Separation of concerns: UI, state, services, assets