Check it out live at: https://moody-adi.netlify.app/
Moody is a minimalistic and modern mood-tracking web application built with Next.js, React, and Firebase. Designed for simplicity and ease of use, it allows users to log their daily moods, visualize their mood history, and manage their account securely with authentication. The app features a beautiful UI, accessibility enhancements, and real-time feedbackβall while maintaining a clutter-free, focused experience.
Current release channel: v3.0.3 for the Lumi chatbot experience.
- Features
- Tech Stack
- Docker Support
- Getting Started
- How to Use
- CI/CD & Docker Automation
- License
- Community
- Credits
- Mood Tracking: Log your daily mood with a single click and view your mood history on a calendar.
- User Authentication: Sign Up, Log In, and Log Out securely using Firebase Authentication.
- Visual Memories: Upload and keep track of photos for each day using Cloudinary integration, with a beautiful grid layout to view your memories with a full-screen viewer supporting zoom and navigation.
- Dashboard: Personalized dashboard showing mood stats, average mood, current streak, and time remaining in the day.
- AI-Powered Journal Insights: Get instant, personalized insights, mood analysis, emotional triggers, and actionable pro tips using Google Gemini Flash 3 Preview β powered by server-side Redis caching and Semantic Similarity Search (Embeddings) for context-aware repeat lookups.
- Lumi AI Chat (Beta): Real-time chat with Lumi with chat-bubble pacing, short-term + long-term memory, and daily session history.
- Lumi Demo Chat (Landing Experience): First-time visitors get a dedicated onboarding conversation tone with a 5-message demo cap and a clear limit toast before sign-in.
- Guest Mood Selector: Try out mood logging instantly without signing up, using the new Guest interactive section!
- Beautiful Landing Page: A fully redesigned landing page featuring dynamic scroll animations, a features grid, and a modern aesthetic.
- Secure Deletion: Full control over your data with the ability to delete specific memories (syncs with Firestore and Cloudinary) and a robust, sequential account deletion process that cleans up all Redis, Cloudinary, and Firebase records.
- π Highly Parallel Deletions: Account removal is now much faster, utilizing parallelized Cloudinary asset destruction and batched Redis key scanning.
- π‘οΈ CI/CD Hardening: GitHub Action workflows are now pinned to immutable commit SHAs for maximum supply-chain security.
- π HMAC-Signed Demo Sessions: Enhanced unauthenticated chat security with signed session cookies and robust Redis quota management.
- β‘ Next.js 16 Ready: Fully migrated to asynchronous cookie handling and optimized server-side flows.
- π©Ή Stability Patches: Fixed various edge cases in focus management, DOM ID collisions, and real-time calendar syncing.
- π€ Lumi Chat Companion (Beta): Added a dedicated conversational flow via
app/api/chat/route.jsand reusable chat UI viacomponents/chat/ChatContainer.js. - π§ Better Chat Resilience: Multi-model Gemini fallback for transient capacity failures, with cleaner user-facing error messaging for quota and high-demand states.
- π¬ Bubble-Aware Responses: Lumi chat now returns JSON bubble arrays; frontend renders each bubble separately with human-like staggered timing.
- π Chat History Sessions: Daily chat history grouped by session with quick restore in the chat modal.
- π§ͺ Demo Chat Onboarding Mode: Demo users now use a dedicated prompt variant tailored for first-time conversation flow, while preserving Lumi's core chat architecture in authenticated dashboard chat.
- π Demo Quota Reliability: Demo quota is scoped per session to avoid cross-visitor limit bleed, and the demo cap is currently 5 messages with a visible toast at limit.
- β¨ Discovery Improvements: Added a new landing-nav
Lumilink with new-feature indicator dot for faster feature discoverability. - π·οΈ Beta Branding Pass: Updated app branding to reflect
v3.0.0 (beta)across header, hero, footer, metadata, and chat UI.
- π Interactive Landing Page: An entirely new landing page experience with
ScrollAnimations,ComparisonSection,FeaturesGrid, and aScrollToTopButton. - π€ AI Insights with Semantic Caching: Journal insights are now generated server-side via Next.js Server Actions and cached in Upstash Redis. We use Gemini Embeddings (
gemini-embedding-001) and Cosine Similarity to find past similar journal entries. - π§ Context-Aware AI: If a semantic cache hit occurs (with a dynamic similarity threshold + recency factoring), the app utilizes a distinct lightweight prompt. It reuses the past mood and headline while generating a fresh, supportive response and a new follow-up question, saving API tokens and improving latency while remaining conversational.
- π€ Guest Experience: Try the
GuestMoodSectionright from the landing page. It uses local storage (hooks/useGuestDraft.js) to save your draft so you don't lose your entry if you decide to log in. - π€ Server-Side AI Insights: Removed the client-side
utils/analyzeJournal.jsutility, transitioning fully to server-side AI generation for enhanced security and performance. - βοΈ Legal Pages: Added dedicated
Privacy PolicyandTerms of Servicepages. - π₯ Streak Indicator: Dynamic streak display with celebratory animations, grayscale inactive state, and tooltip hints.
- π¨ Theme Reveal Animation: Beautiful flower-shaped mask animation on theme toggle, with reduced motion support.
- π€ Voice Input (Beta): Dictate your journal entries using the Web Speech API. Features smart punctuation, auto-capitalization, and a 5-minute listening limit to conserve resources.
- π Journal Modal with Edit & Delete: Click any calendar day to view, edit, or delete journal entries and mood in a sleek modal with unsaved changes detection.
- π― Radial Mood Menu: GTA-style radial mood selector for intuitive mood selection when editing past entries.
- Next.js (App Router)
- React 19+
- Firebase (Auth & Firestore)
- Cloudinary (Image storage & transformation)
- Google Gemini Models (AI Insights + Lumi Chat)
- Upstash Redis (Server-side caching)
- lucide-react (Icons)
- Tailwind CSS
- react-hot-toast
flowchart LR
%% Client Layer
User["User Device / Browser"]
CDN["Edge CDN (Cloudinary + Static Assets)"]
%% Application Layer
NextApp["Next.js App Router (Client + Server Components)"]
ServerActions["Server Actions / API Routes (Stateless Compute)"]
%% Service Layer
Auth["Firebase Authentication"]
DB["Firestore (Mood & Journal Data)"]
Cache["Upstash Redis (Vector Embeddings & AI Cache)"]
AI["Google Gemini API (Insights & Embeddings)"]
Media["Cloudinary Media Storage"]
%% Flow
User --> CDN
CDN --> NextApp
NextApp --> Auth
NextApp --> ServerActions
ServerActions --> DB
ServerActions --> Media
ServerActions --> AI_Embeddings["AI (Embeddings Model)"]
AI_Embeddings --> ServerActions
ServerActions --> Cache_Sim["Cache (Cosine Similarity Search)"]
Cache_Sim -- "Cache Hit (Sim > 0.85)" --> ServerActions_Partial["ServerActions (Partial Prompt)"]
Cache_Sim -- "Cache Miss" --> AI_Insights["AI (Insights Generation)"]
AI_Insights --> Cache_Save["Cache (Save Embedding)"]
AI_Insights --> ServerActions
ServerActions_Partial --> AI_Insights
ServerActions --> NextApp
NextApp --> User
A prebuilt Docker image is available for easier setup and consistent environments. This is ideal for contributors and quick local testing without needing to manage local Node.js versions.
You can pull the prebuilt image from Docker Hub or GitHub Container Registry (GHCR):
Docker Hub:
docker pull temaroon/moody:latestGitHub Container Registry (GHCR):
docker pull ghcr.io/aditya-2k23/moody:latestIf you cloned this repository, you can start Moody with Docker Compose:
docker compose up --buildThis maps port 3000:3000 automatically and includes safe defaults so the app can boot without manually passing env vars. If you want full integrations (Firebase Admin, Cloudinary deletion, AI insights, Redis cache), create a .env from .env.example and fill the real values.
Note: container logs may print a URL like http://<container-id>:3000. That is the internal Docker hostname. On your machine, open http://localhost:3000.
You must provide the required environment variables. You can pass them individually or use an .env file.
docker run -d -p 3000:3000 --name moody --env-file .env temaroon/moody:latestOnce running, access the application at http://localhost:3000.
If you prefer Docker, see the Docker Support section above.
-
Clone the repository:
git clone https://www.github.com/aditya-2k23/moody.git cd moody -
Install dependencies:
npm install
-
Set up environment variables:
Copy.env.exampleto.envand fill in your credentials.# Firebase Client NEXT_PUBLIC_API_KEY=... NEXT_PUBLIC_AUTH_DOMAIN=... NEXT_PUBLIC_PROJECT_ID=... NEXT_PUBLIC_STORAGE_BUCKET=... NEXT_PUBLIC_MESSAGING_SENDER_ID=... NEXT_PUBLIC_APP_ID=... # Cloudinary NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=... NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET=... # Firebase Admin (v2.0+) FIREBASE_SERVICE_ACCOUNT_KEY='{"project_id": "...", ...}' # AI Insights + Lumi Chat (v3.0.0 beta) GEMINI_API_KEY=... # Redis Caching (v3.0.0 beta) UPSTASH_REDIS_REST_URL=... UPSTASH_REDIS_REST_TOKEN=... # Demo session signing (recommended) DEMO_SESSION_SECRET=...
-
Run the development server:
npm run dev
- Log Your Day: Enter how you're feeling and write a short journal entry.
- Add Photos: Select up to 5 photos to capture the visual essence of your day.
- Get Insights: Hit save to get AI analysis of your mood and triggers instantly.
- Relive Memories: Tap on any image in your memories grid to open the full-screen viewer. Use Arrow keys to navigate through your month's photos.
- Chat with Lumi (Beta): Ask follow-up questions or simply talk through your day in the Lumi chat panel.
- Manage History: Use the calendar to jump between months and view your past emotional trends.
Moody uses GitHub Actions to automate the build and push process for Docker images.
- Automatic Versioning: The workflow triggers on every push to
main. - Image Tags: Images are tagged with the version from
package.jsonand the git commit SHA. - Latest Tag: The
latesttag always points to the most recent successful build from themainbranch.
This project is licensed under the MIT License. See the LICENSE file for more details.
Have ideas, questions, or feedback? We'd love to hear from you! π Join the Discussion on GitHub