Lueur β AI Companion, Mood Journal & Mindful Play
Your pocket companion. Talk to Luna, track your moods, breathe, draw, and grow together.
What is Lueur?
Lueur is a Flutter mobile app that pairs an AI mood journal with a small toolkit of calming activities. Users share how they feel through emoji and free-text thoughts, and Luna (a friendly AI companion backed by a Django REST API) replies with a warm, personalized note and is there for a follow-up chat. Luna is a companion, not a therapist or a medical tool. Beyond journaling, Lueur tracks mood history so you can see how your moods have looked over time, and gamifies consistency through a plant-growth streak system β and gives users guided breathing, free drawing, and sudoku for those days you just want to chill instead of talk.
The app supports English and Arabic (with full RTL layout), light/dark theming, and Firebase-based authentication (email/password + Google Sign-In).
User Journey
How a user moves through the app, from first launch to their saved memories. A brand-new device goes Splash β Onboarding β Register β Home with no second onboarding; a returning account goes straight to Home after signing in.
flowchart TD
A(["App launch"]) --> B["Splash"]
B --> C{"Signed in?"}
C -->|Yes| H["Home"]
C -->|No| D{"Seen onboarding?"}
D -->|No| ON["Onboarding"]
D -->|Yes| E{"Signed in before on this device?"}
ON --> E
E -->|Never| RG["Register"]
E -->|Before| LG["Login"]
LG -->|Forgot password| FP["Forgot password"]
FP --> LG
RG -->|Continue as guest| GS["Guest session"]
LG -->|Continue as guest, after a warning| GS
GS --> H
RG --> AG{"Which account?"}
LG --> AG
AG -->|New, email| CB["18+ checkbox on Register"]
AG -->|New, Google| MD["18+ modal, declining deletes the account"]
AG -->|Returning| H
CB --> H
MD --> H
H --> MI["Pick a mood and write a few words"]
MI --> MC["Mood choice dialog"]
MC --> AF["Affirmation card"]
AF -->|Talk to Luna| RS["Luna's reply"]
AF -->|Breathe| BR["Guided breathing"]
AF -->|Draw| DR["Free draw"]
AF -->|Sudoku| SU["Sudoku"]
RS -->|Guest| GB["Sign in to hear from Luna"]
RS -->|Bookmark| SQ["Saved quotes"]
RS -->|Talk again| CH["Chat with Luna"]
BR -->|Talk to Luna| CH
DR -->|Talk to Luna| CH
CH -->|Session ends| JE["Entry saved to the journal"]
RS -->|Entry saved| JR["Journal tab"]
JE --> JR
BR -->|Activity logged| JR
DR -->|Activity logged| JR
SU -->|Activity logged| JR
H -->|See all| TL["Timeline"]
JR --> TL
JR --> WL["Weekly letter"]
JR --> SC["Streak celebration"]
TL -->|Open a day| CH
H -.->|Bottom nav| JR
JR -.->|Bottom nav| PF["Profile tab"]
PF --> SQ
PF --> DV["Saved drawings viewer"]
PF --> SH["Sudoku history"]
PF --> ST["Theme and language"]
PF --> DE["Delete journal entries or account"]
PF --> LO["Log out"]
LO --> LG
style A fill:#FFD4B8,stroke:#E8825A,color:#3A2A1E
style H fill:#C8B4F8,stroke:#6E59C5,color:#3A2A1E
style RS fill:#E8825A,stroke:#B23A0A,color:#fff
style BR fill:#5BBFA0,stroke:#2E7D5F,color:#fff
style DR fill:#FFD4B8,stroke:#E8825A,color:#3A2A1E
style SU fill:#C8B4F8,stroke:#6E59C5,color:#3A2A1E
style JR fill:#FFF8F5,stroke:#8C6A52,color:#3A2A1E
style PF fill:#FFF8F5,stroke:#8C6A52,color:#3A2A1E
Chat ending: when a chat ends, the backend saves the session as a journal entry and the app shows the "saved to your journal" card. The one exception is a fallback reply (when Luna can't answer): it is never saved, never shows that card, and never reaches the Journal or Saved quotes.
Screenshots
The flow below follows the app in order β onboarding β sign in β capture a mood β get Luna's response β journal it β unwind with an activity β shown in both light and dark theme.
| Screen | Light | Dark |
|---|---|---|
| Splash | ![]() |
![]() |
| Onboarding (1/3) | ![]() |
![]() |
| Onboarding (2/3) | ![]() |
![]() |
| Onboarding (3/3) | ![]() |
![]() |
| Login | ![]() |
![]() |
| Register | ![]() |
![]() |
| Forgot password | ![]() |
![]() |
| Choose a mood | ![]() |
![]() |
| Mood choice dialog | ![]() |
![]() |
| Follow-up chat | ![]() |
![]() |
| Follow-up chat (continued) | ![]() |
![]() |
| Report a response | ![]() |
![]() |
| Journal Screen | ![]() |
![]() |
| Timeline | ![]() |
![]() |
| Affirmation cards | ![]() |
![]() |
| Breathing exercise | ![]() |
![]() |
| Free drawing | ![]() |
![]() |
| Sudoku | ![]() |
![]() |
| Profile & settings | ![]() |
![]() |
| Profile β more settings | ![]() |
![]() |
More screenshots live in screenshots/.
Features
| Feature | Description |
|---|---|
| AI Mood Response | Share an emoji + thoughts β Luna replies with a warm, personalized note. If Luna can't answer, a fallback reply is shown but never saved to the journal or to saved quotes, and never shows the "saved to your journal" card. When a chat ends normally, the backend saves it as a journal entry |
| Follow-up Chat | Continue the conversation with Luna after the initial response. Before each send, the history is trimmed to the last 10 turns, 5000 characters per item and 12000 in total, and failure or fallback bubbles are never sent |
| Journal Screen | Streak, weekly letter, and a "recent memories" teaser showing each day's single most recent entry (mood or activity) β tapping a card opens Timeline scrolled to that day |
| Activity Journal Entries | Completing a breathing session, sudoku puzzle, or drawing logs a journal card for it alongside mood entries |
| Timeline | Full scrollable/searchable memory history, grouped by day, listing every entry logged that day (not just one per type) with mood and month filters |
| Streak & Plant | Daily journaling grows a virtual plant (seed β sprout β blooming), with a streak celebration screen |
| Weekly Letter | A short, friendly weekly note from Luna, with a few stats |
| Saved Quotes | Bookmark Luna's responses for later, view and delete them (with Undo), with a retry option if loading them fails |
| Content Reporting | Flag one of Luna's chat replies (offensive/harmful, inaccurate, uncomfortable, or other) with an optional comment, satisfying Google Play's requirement that AI-generated content be reportable in-app |
| Breathing Exercise | Guided breathe-in/breathe-out cycle with animated ring visuals |
| Affirmations | Emoji-specific rotating affirmation cards |
| Free Drawing | Open canvas for expressive/calming drawing, with a gallery of saved drawings (deleting one can be undone) |
| Sudoku | Playable sudoku puzzles with move validation and saved results history (deleting a result can be undone) |
| Mood Choice Dialog | After every mood entry, a lightweight prompt offering Talk to Luna, Breathe, Draw or Sudoku; the choice leads to an affirmation card, then the activity |
| Auth | Email/password and Google Sign-In via Firebase Auth, plus forgot-password flow |
| Age Confirmation | Self-declaration checkbox ("I'm 18 or older") on register; for a new account created via a path with no checkbox (Google Sign-In on either auth screen), a mandatory modal gates access instead β declining rolls the account back. Confirmed per-account locally so returning users aren't re-prompted; never sent to the backend |
| Delete Journal Entries | From Profile, deletes all journal entries on the backend, which also clears Luna's saved memory on the server, so Luna no longer builds on the entries; any open chat is reset too. Saved drawings, quotes and Sudoku history stay on the device |
| Account Deletion | Permanently delete your account and all associated data from Profile settings |
| Profile Refresh | The Profile tab reloads its quotes, drawings and Sudoku history each time it becomes visible again |
| Dark / Light Theme | User-selectable, persisted locally, applied instantly across the app |
| Localization | English and Arabic, including RTL layout, via AppLocalizations (Flutter intl/l10n) |
| Analytics & Crash Reporting | Firebase Analytics + Sentry (with a privacy filter that scrubs sensitive data before sending) |
| Onboarding | First-launch walkthrough introducing Luna and the app's core loop. A returning account never sees it after login; a brand-new device goes Onboarding β Register |
| Guest Mode | Use breathing, drawing, and Sudoku without an account β Luna's AI responses require signing in, and guest-created content doesn't persist between sessions. Profile shows Log in / Register instead of Log out while in a guest session |
Tech Stack
| Layer | Technology |
|---|---|
| Framework | Flutter (Dart) |
| State Management | flutter_bloc (Cubit) |
| Navigation | go_router |
| Auth | Firebase Auth (email/password + Google Sign-In via google_sign_in) |
| Backend | Django REST Framework, deployed on Railway |
| Local Storage | Hive (see Local storage) + shared_preferences (theme, language) |
| Networking | Dio + PrettyDioLogger |
| DI | GetIt |
| Error Handling | dartz (Either<Failure, T>) |
| Code Generation | json_serializable, build_runner |
| Responsive UI | flutter_screenutil |
| Localization | flutter_localizations + intl (ARB-based, lib/l10n/) |
| Analytics / Crash Reporting | firebase_analytics, sentry_flutter, sentry_dio |
| Misc | confetti (streak celebration), lottie (animations), screenshot + share_plus (sharing saved content) |
Architecture
Clean Architecture with strict layer separation:
Presentation (Screens, Widgets, Cubits)
β
Domain (Entities, Repository interfaces, Use Cases)
β
Data (Models, Repository impls, DataSources)
β
External (Django API, Firebase, Hive, SharedPreferences, Dio)
Dependencies point downward only β presentation never talks to data directly, and the domain layer has zero Flutter imports. Two known deviations: MoodCubit takes MoodRepository directly (plus JournalRefreshSignal), and WeeklyLetterCubit takes a datasource directly; neither pattern is used for new code.
Feature Structure
lib/
βββ core/
β βββ chat/ β ChatResetSignal, tells open chats to forget their history after a journal wipe
β βββ constants/ β AppSizes, AppSpacing, AppLimits (chat size limits)
β βββ errors/ β Failure classes (NetworkFailure, ServerFailure, ...)
β βββ injection/ β single setupInjection() β all GetIt registrations
β βββ journal/ β JournalRefreshSignal, a lightweight cross-feature refresh signal
β βββ models/ β shared UI models (MoodType, JournalCardColor, MoodChoiceDestination)
β βββ monitoring/ β Sentry privacy filter (scrubs PII before reporting)
β βββ navigation/ β shell screen, bottom nav bar
β βββ networking/ β DioHelper, ApiEndpoints, AuthTokenInterceptor
β βββ preferences/ β OnboardingPrefs, AgeConfirmationPrefs, AuthPrefs, StreakCelebrationPrefs (small Hive-backed flags; onboarding and age are per-uid)
β βββ routing/ β GoRouter config (router_generation_config.dart, app_routes.dart)
β βββ startup/ β app_initializer.dart, the Firebase/Hive/SharedPreferences/DI bootstrap sequence
β βββ styling/ β AppTheme, AppColors, AppExtraColors, text styles, fonts
β βββ theme/ β theme-related core widgets/helpers
β βββ utils/ β shared helpers: calendar_days (calendarDaysAgo), local_entry_id (unique negative ids for local-only entries), streak_calculator, duration_format, list_ops
β βββ widgets/ β shared reusable widgets, incl. AppTopBar (canonical app bar for pushed/detail screens) and showUndoSnackBar (Undo snackbar for deletes)
β
βββ features/
β βββ affirmation/ β emoji-specific affirmation cards
β βββ auth/ β login, register, forgot password, age confirmation, Firebase + Django auth
β βββ breathing/ β guided breathe-in/breathe-out exercise
β βββ chat/ β follow-up chat with Luna
β βββ draw/ β free drawing canvas + saved drawings gallery
β βββ home/ β mood input, AI response trigger, history, weekly letter
β βββ journal/ β journal screen (streak, weekly letter, recent memories), and the full searchable/filterable timeline
β βββ language/ β language preference (C







































