Mental Healthy Life

Mental Healthy Life

Feature Reference · v1.0.0 · 3bit.app/app/meditation/v1/

A mindfulness & meditation platform — daily schedule, AI-powered sessions, dual-mode player. Built on React 18 + TypeScript + Vite. Hybrid dark/light UI design.

3-Slot Daily Schedule AI Helper (Premium) Default & Relax Player Content Categories 5 Languages Resizable Panels
Night #1A1A2E · Teal #2EC4B6 · Light main #F0F4F8 React 18 · TypeScript · Vite · Firebase 2026
Section 1 — Design System
Visual Design

Hybrid Dark / Light UI

Mental Healthy Life uses a distinctive mixed theme: a dark navy sidebar (#0D0D1E) and dark right panel on the outer columns, with a light main content area (#F0F4F8) and white widget cards in the centre. The teal accent (#2EC4B6) runs throughout as the primary action colour. Auth pages are fully light-themed.

TokenHexWhere Used
--app-night-deep#0D0D1ESidebar, right panel, mobile player sheet
--app-night#1A1A2EApp global background, auth page card surface
--app-key (Teal)#2EC4B6Active nav, play buttons, progress bars, date widget, category accent
--app-key-dark#1A9E97Hover states, darker teal emphasis
--dash-bg#F0F4F8Dashboard main area background, auth page background
--dash-card#FFFFFFAll widget cards, schedule cards, recent session cards
AI gradient#2D2560 → #1A1A2EAI Helper panel background
AI border-top#6A5ACDAI Helper section divider line (2px top border)
ai-light#C4B5FDAI Helper text, chips, icons, topbar AI button
Section 2 — Authentication
Auth System

Authentication — Light Theme

Auth pages use a light theme#F0F4F8 background with a centred white card (max-width 390px). The card header always shows the real app logo SVG (meditation_logo_dark.svg) + "Mental Healthy Life" text. Inputs are white with dark text. The teal button is the primary action.

Login
9:41Mental Healthy Life
Mental Healthy Life
Sign In
Track your routes, explore the world.
Email
Password
Sign In
or
Continue with Google
Continue with Apple
Register
9:41
Mental Healthy Life
Create Account
Start your mindfulness journey.
Username
Email
Password
Confirm Password
Create Account
Password Forgot
9:41
Mental Healthy Life
Forgot Password?
Enter your email to receive a reset link.
Email address
Send Reset Link

All Auth Routes

  • /loginEmail + password. Google OAuth (Firebase). Apple Sign-In. Links to /register, /password-forgot, /login-passcode.
  • /register → /register-completeCreate account. On success shows registration complete confirmation screen.
  • /login-passcodePasswordless one-time passcode sign-in. Entered after requesting a code to email.
  • /password-forgot → /password-reset → /password-changeFull recovery flow. /password-change also available to authenticated users from Profile page.
  • /account-deletePermanent account deletion with confirmation. Accessible from Profile. Removes all user data.
JWT flow: Token in localStorage via authStorage. Axios interceptor adds Authorization: Bearer. Auto-refresh on 401. ProtectedRoute redirects to /login. PublicRoute redirects authenticated users to /dashboard.
Section 3 — Dashboard
Main Screen

Dashboard — 3-Column Hybrid Layout

The dashboard (/dashboard or /home) is a three-column resizable layout. Left: dark sidebar (#0D0D1E) with navigation. Centre: light main area (#F0F4F8) with white widget cards. Right: dark panel (#0D0D1E) with the media player on top and AI Helper below. On mobile (<900px) the sidebar becomes a drawer and the right panel is hidden — player opens as a bottom sheet.

Home
Schedule
Categories
Profile
Settings
Good morning, Alex
26 Jun 2026 | 09:41:15
Today's Schedule
08:00 · Morning
Morning Energy
Focus · 5 min
12:00 · Afternoon
Midday Reset
Productivity · 10 min
Categories
All
Sleep
Focus
Stress
Breathing
Body Scan
Recent Sessions
Sleep
Deep Sleep Journey
25 min
Focus
Morning Focus Flow
15 min
Breathing
4-7-8 Breathing
8 min
Meditations
Morning Focus Flow
Focus · 15 min
5:1415:00
AI Helper
Premium
Describe what you need — AI creates a personalised session.
Current Mood
Anxious
Sad
Tired
Good
Duration
5 min
10 min
20 min
Style
Guided Voice
Nature
Binaural
Add a personal note…
All three panel widths and player height are draggable and saved to localStorage

Dashboard Components

  • Schedule Strip — Horizontal Article Cards (92px height)3 cards (Morning/Afternoon/Evening). Each: left image (92×92px) with period badge overlay, then title, category with icon, duration. Teal play button on the right. Inactive slots use muted gray text..
  • Categories — 3-Column GridSmall square items with icon + label. Default: #F7F9FC bg. Active: teal accent (rgba(46,196,182,.08)). Clicking "All" navigates to /categories. Clicking a specific category opens Category Detail inline or loads category content.
  • Recent Sessions — 3-Column Article GridWhite cards with 16:9 image, category label in teal, bold title, duration. Box-shadow: 0 2px 8px rgba(46,196,182,.06). Border: #E6F9F8. Last 6 played items from UserContent API.
  • Top Bar — Greeting + Date/Time + ActionsTime-aware greeting: Sunrise (4–12h), Sun (12–20h), Moon (20–4h). Live clock updates every second. Date/time widget with teal background (rgba(46,196,182,.10)). Refresh, Bell, AI (sparkles), Profile buttons.
  • Resizable Drag HandlesTwo vertical handles (sidebar width 140–320px, right panel 160–380px) and one horizontal (player height 120–420px). 4px wide, teal on hover/active. Sizes persisted to localStorage.
  • Category Detail ViewWhen a category (non-All) is selected, replaces the widgets with a detail view: hero image (120×90px), title + thumbnail icon, description, tags as teal chips, and a full content list. Back button returns to home view.
Section 4 — Schedule Page
/schedule

Daily Schedule Configuration

The Schedule page (/schedule) lets users configure each of the three daily practice slots. The page uses the same hybrid layout (dark sidebar, light main content). Each slot has a 24-hour time picker (custom HH:MM select) and a media tag selector — a searchable dropdown of all content categories.

Schedule Page
Mental Healthy Life
Morning
Wake-up practice
Time
08
:
00
Tag
Focus
Afternoon
Midday reset
Time
12
:
00
Tag
Productivity
Evening
Wind-down session
Time
21
:
00
Tag
Calm
SlotPeriodDefault TimeAPI
MorningMORNING08:00Schedule configuration saved and content resolved automatically
AfternoonAFTERNOON12:00
EveningEVENING21:00
Section 5 — Categories
/categories

Content Library — Categories

Categories page shows the full content library. Clicking a category in the dashboard widget or navigating to /categories shows all categories. Clicking a category opens a Category Detail view inside the dashboard with: hero image (120×90px), thumbnail icon, name, description, tags as teal chips, and a scrollable content grid.

Content StatusCodePlayable
Free0 or 1 Yes — all registered users
Premium / Subscription2 Requires active plan
Unavailable-1Temporarily disabled
Draft-10Not published, hidden from users
Translations: All category names and descriptions are resolved via contentCategoryTranslations array — displayed in the user's selected app language. Tags are stored as a comma-separated string and split into chips.
Section 6 — Media Player
Player

Dual-Mode Media Player

The player lives in the top portion of the right panel on desktop (dark #0D0D1E background, resizable height 120–420px). On mobile (<900px) it opens as a bottom sheet with drag-up to fullscreen. Two visual modes: Default (standard media player) and Relax (full-frame media with dark gradient overlay and centred play button).

Mobile — Bottom Sheet Player
9:41Mental Healthy Life
Good morning, Alex
Today's Schedule
08:00 · Morning
Morning Energy
Morning Focus Flow
Focus · 15 min
5:1415:00
Relax Mode — Full-Frame Media
9:41
14:58
Wind Down Session
Calm · 8 min

Player Features

  • Default Player ModeVideo or picture thumbnail at top, title, category, progress bar with times, Skip Back / Play-Pause / Skip Forward controls. Expand button opens fullscreen (position:fixed; inset:0; background:#0d1117).
  • Relax ModeFull-frame media (video or picture) with dark gradient overlay. Centered play button (rgba(46,196,182,.82) + blur). Progress/countdown text. Info overlay at bottom. Mode toggled in Settings, persisted as playerType in localStorage.
  • Mobile Bottom SheetDark (#0D0D1E) bottom sheet with border-radius: 18px 18px 0 0. Default height 55% of viewport. Drag up → fullscreen (100dvh). Drag down past threshold → dismiss. White handle bar (44px wide, opacity .18). Auto-opens when track loads on mobile. Auto-closes when viewport >900px.
  • Mini-BarOptional compact strip shown when the player is not fully open on mobile. Enabled via minibarShow in localStorage (Settings toggle). Shows title + play/pause toggle + expand button.
  • Multi-Track ContentEach content item can have up to three separate media sources: Video (contentVideoLink), Background Music (contentMusicLink), Guided Voice (contentVoiceLink). All URLs are cache-busted with ?v=lastUpdated to force refresh after content updates.
Section 7 — AI Helper
AI (Premium)

AI Helper Panel

The AI Helper occupies the bottom portion of the right panel on desktop — below the player, separated by a horizontal resize handle. Background: linear-gradient(160deg, #2D2560 0%, #1A1A2E 100%). Top border: 2px solid #6A5ACD. On mobile, accessible via the Sparkles button in the top bar, which opens a full-screen bottom sheet (ModalAIHelper).

ParameterOptionsAPI Endpoint
Current MoodAnxious · Sad · Angry · Tired · Numb · Good
Duration5 min · 10 min · 15 min · 20 min
StyleGuided Voice · Nature Sounds · Binaural
Free promptText input — "I feel stressed about work…"
Premium badge: The header always shows a "Premium" badge (rgba(196,181,253,.15) background). AI text colour is #C4B5FD throughout. Active chip: rgba(46,196,182,.2) teal. The Send button (#C4B5FD circle) submits the request.
Section 8 — Settings
/settings

Settings Page

The Settings page (/settings) uses the same hybrid layout. The content area is light (#F0F4F8) with white section cards. All settings persist to localStorage and are applied immediately without restart.

Settings Screen
Mental Healthy Life
Language
EN
RU
UA
DE
IT
Player
Player Mode
Default
Relax
Show Mini-Bar
Data
Demo Mode
Schedule Tags
Morning
Focus
Afternoon
Productivity
Evening
Calm
SettingOptionslocalStorage Key
LanguageEnglish · Украинский-Русский · Українська · Deutsch · Italianoi18next store
Player Modedefault · relaxplayerType
Mini-Bartrue · falseminibarShow
Demo Datatrue · falsedemoData
Sidebar Width140–320 px (drag handle)db_sidebarWidth
Right Panel Width160–380 px (drag handle)db_rightPanelWidth
Player Height120–420 px (drag handle)db_playerHeight
Demo Mode: Pre-loads 6 hardcoded categories (Sleep, Focus, Stress, Breathing, Body Scan, All), 3 schedule slots with Unsplash images, and 3 recent sessions. No API calls. Toggles instantly via demoData key in localStorage.
Section 9 — Therapeutic Methodology
Methodology

Three-Tradition Therapeutic Framework

The platform integrates cutting-edge therapeutic methodologies drawn from three traditions: the contemplative wisdom of Tibetan Buddhism and Eastern philosophy, the somatic and mindfulness-based approaches of modern Western psychology, and the structured frameworks of European and American psychoanalysis. This fusion ensures every session is grounded in both ancient inner science and evidence-based clinical practice.

Tibetan & Eastern Wisdom

Vipassana, Tibetan Dzogchen, Zen breath, yogic pranayama. Cultivates present-moment awareness, compassion (Metta), dissolution of habitual thought patterns.

Modern Western Psychology

MBSR, MBCT, somatic body-scan, trauma-informed breathing, progressive muscle relaxation. All clinically validated in peer-reviewed research.

European & American Psychoanalysis

Jungian depth psychology, IFS, ACT, DBT skills. Emotional regulation, cognitive defusion, depth-psychological integration.

Section 10 — Tech Stack
Architecture

Technical Stack

Frontend

  • React 18 + TypeScriptStrict typing. Path aliases: @components, @pages, @utils, @contexts, @hooks.
  • ViteDev server + optimised ESM build.
  • Tanstack QueryServer state, caching, background refetch.
  • React Router v6SPA routing. ProtectedRoute + PublicRoute guards.
  • ZustandPlayer context: track, isPlaying, togglePlay, setTrack.
  • Howler.jsCross-platform audio playback engine.
  • i18next + react-i18next5 locales: en, uk, ru, de, it.
  • Lucide ReactAll icons: Home, Calendar, LayoutGrid, User, Settings, Bell, Sparkles, Sunrise, Sun, Moon, Play, Pause…

Infra & Services

  • Firebase HostingStatic SPA hosting with firebase.json rewrite rules. Build output in public/.
  • Firebase AuthGoogle OAuth provider. Apple Sign-In via Apple JS SDK.
  • MicroservicesAuthentication · Meditation · AI · Market
  • JWT AuthauthStorage localStorage. Axios interceptor. Auto-refresh on 401 via refreshToken.
  • Cache-BustingwithCacheBust — appends ?v=timestamp to force reload after content updates.
  • Translation UtilitypickTranslated — resolves content names in user's language from mediaContentTranslations.
Section 11 — User Flow & Routes
Navigation

End-to-End User Journey

Auth

Login / Register / Google / Apple

Schedule

Set 3 time slots + media tags

Dashboard

Schedule cards, categories, recent

Play

Default or Relax player mode

Browse

Categories → content list

AI Session

Mood + style → recommend or generate

Settings

Language · Player mode · Schedule

All Routes

RouteGuardDescription
/loginPublicEmail/password, Google, Apple, passcode link, forgot password link
/registerPublicCreate account → /register-complete
/login-passcodePublicPasswordless one-time code login
/password-forgotPublicRequest reset link
/password-resetPublicSet new password via reset token
/dashboard | /homeProtectedMain screen — 3-column layout with schedule, categories, player, AI
/scheduleProtectedConfigure Morning/Afternoon/Evening time + tag per slot
/categoriesProtectedFull content library by category
/profileProtectedUser profile — username, email, avatar
/password-changeProtectedChange password (authenticated users)
/settingsProtectedLanguage, player mode, mini-bar, demo data
/account-deleteProtectedPermanent account deletion with confirmation