Dream Atlas is a dream journaling and sleep-tracking application built with React Native and Expo.
It lets users record and explore their dreams, track sleep data, view weekly dream insights, and connect dream experiences with sleep patterns.
- π Dream Journal β Create, edit, and browse daily dream entries
- π§ Dream Insights β Explore recurring themes and patterns across dreams
- π΄ Sleep Tracker β View sleep sessions, sleep stages, and heart-rate data
- ποΈ Audio Journaling β Record spoken dream entries
- π€ AI Processing β Process and analyze dream entries through the backend
- π Google Authentication β Sign in securely with Google and Firebase Authentication
- βοΈ Backend Integration β Communicate with the Dream Atlas backend API
- π± Cross-platform β Run on iOS, Android, and Web
- π Pastel Galaxy UI β A visual theme designed around dreams, stars, and nighttime
| Technology | Purpose |
|---|---|
| React Native | Cross-platform mobile application |
| Expo SDK 54 | Development and native app tooling |
| Expo Router | File-based navigation |
| TypeScript | Type-safe application development |
| Firebase Authentication | User authentication |
| expo-sqlite | Local data storage |
| expo-audio | Audio recording |
| Lottie | Animated UI elements |
| Google Cloud CLI | Local Google Cloud authentication |
| Dream Atlas Backend | API, AI processing, and cloud data services |
Before running the application locally, install the following:
- Node.js β LTS version recommended
- npm
- Git
- Xcode β required for iOS development on macOS
- CocoaPods β required for iOS native dependencies
- Google Cloud CLI (
gcloud) β required for Google Cloud authentication
You will also need access to a running Dream Atlas backend
The frontend does not operate completely independently. Features such as authentication, dream processing, and cloud-backed data require the backend API.
Clone the repository and enter the project directory:
git clone <repository-url>
cd <repository-directory>If you need to work on a specific branch:
git checkout <branch-name>Install the project's npm dependencies:
npm installSome application functionality communicates with Google Cloud services.
Authenticate your local Google Cloud environment using Application Default Credentials:
gcloud auth application-default loginFollow the browser prompts to authenticate with your Google account.
Create a .env file in the root of the project:
touch .envAdd the following variables:
# Backend API
# For local development, use the IP address of your computer
# so that devices/emulators can reach the backend.
EXPO_PUBLIC_API_URL=http://<your-wifi-ip-address>:8080
# Google Authentication
EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID=your_google_web_client_id
EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID=your_google_ios_client_id
# Firebase
EXPO_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
EXPO_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project_id.firebasestorage.app
EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
EXPO_PUBLIC_FIREBASE_APP_ID=your_firebase_app_idWhen running the backend on your computer, the mobile application needs to access it over your local network.
On macOS, you can find your Wi-Fi IP address with:
ipconfig getifaddr en0Do not use localhost when connecting from a physical device.
The device needs to use your computer's local network IP address instead.
The application uses Firebase Authentication.
Create or use a Firebase project and configure the required Firebase application credentials.
The Firebase values should correspond to the Firebase project used by the Dream Atlas backend.
Make sure the following variables are configured:
EXPO_PUBLIC_FIREBASE_API_KEY=
EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=
EXPO_PUBLIC_FIREBASE_PROJECT_ID=
EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=
EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
EXPO_PUBLIC_FIREBASE_APP_ID=Security note:
.envfiles containing local configuration should not be committed to the repository. Never commit private credentials, service-account keys, or other secrets.
The frontend communicates with the Dream Atlas backend through:
EXPO_PUBLIC_API_URLMake sure the backend is running before testing functionality that requires API access.
For example, if the backend is running locally on port 8080:
EXPO_PUBLIC_API_URL=http://<your-ip-address>:8080See the Dream Atlas Backend repository for backend installation and configuration instructions.
iOS development requires macOS and Xcode.
Run:
npx expo run:iosOr:
npm run iosThis builds the native iOS application and launches it in the iOS Simulator.
Run:
npx expo run:androidOr:
npm run androidStart the web development server:
npx expo start --webOr:
npm run webThe application will open in your browser.
To start the Expo development server:
npm startor:
npx expo startAt a high level, the application is organized into four layers:
βββββββββββββββββββββββββββββββ
β Expo App β
β React Native + Router β
ββββββββββββββββ¬βββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββ
β React Hooks β
β Context + UI Components β
ββββββββββββββββ¬βββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββ
β Services β
β API Β· SQLite Β· Export Β· etc. β
ββββββββββββββββ¬βββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββ
β Dream Atlas Backend β
β Auth Β· AI Β· Cloud Data β
βββββββββββββββββββββββββββββββ
The app/ directory contains the application's routes.
Because Dream Atlas uses Expo Router, files inside app/ automatically become navigable routes.
For example:
app/
βββ dream/
βββ [date].tsx
represents a dynamic route for a specific date.
Authentication is handled using:
- Google Authentication
- Firebase Authentication
- Firebase ID tokens
After authentication, the application uses the Firebase user's ID token when communicating with the backend API.
The authentication state is managed through:
context/AuthContext.tsx
Firebase initialization is handled in:
lib/firebase.ts
The Sleep Tracker provides a dedicated interface for exploring sleep data alongside dreams.
The main screen is:
app/(tabs)/sleep-tracker.tsx
Sleep-related data is retrieved through the backend API and presented alongside sleep sessions and associated dream entries.
Weekly dream analysis is available through:
app/(tabs)/insights.tsx
The Insights experience is designed to help users understand:
- Recurring dream themes
- Emotional patterns
- Weekly dream activity
- Connections between different dream entries
AI processing is performed through the backend rather than directly exposing AI credentials in the mobile application.
Reusable UI components are kept in:
components/
Examples include:
day-log-card.tsxβ Daily journal summarydream-preview-card.tsxβ Dream previewdream-processing-animation.tsxβ Dream processing animationinsights-loading.tsxβ Insights loading statestarfield.tsxβ Background starfieldtag-input.tsxβ Dream tag inputthemed-text.tsxβ Theme-aware textthemed-view.tsxβ Theme-aware container
Keeping these components separate from route files makes screens easier to maintain and reuse.