Inspiration
Our inspiration for the AI Mind Journal came from the fundamental need for a safe, private, and accessible space for mental self-reflection. We recognized that while the desire for mental wellness is universal, barriers like cost, social stigma, and the impersonality of digital tools often prevent people from seeking support. We were driven to create more than just a journaling app; we wanted to build a compassionate companion that listens, remembers, and grows with the user, making them feel genuinely understood on their wellness journey.
What it does
AI Mind Journal is a privacy-first web application that functions as a personal mental wellness companion, running entirely on the user's device. • Private Journaling: It offers a secure space for users to write down their daily thoughts and feelings. • AI Therapist: Users can engage in supportive conversations with an empathetic AI therapist, "溫老師" (Dr. Sage in English). • Intelligent Memory: The AI builds a multi-layered memory of the user by summarizing past journals and conversations. This allows for deeply personal and context-aware dialogue. • Mood Analysis: The app can generate a "7-Day Mood Report," analyzing the user's recent entries to provide a mood score, trend analysis, and actionable suggestions. • Guided Exercises: If the AI detects stress or anxiety, it can suggest and guide the user through a calming 4-7-8 breathing exercise. • Absolute Privacy: As a purely client-side application, all data is stored exclusively in the user's local browser storage. Nothing is ever sent to a server, ensuring 100% privacy. • Full Data Ownership: Users have complete control over their data, with simple tools to export all their journals and memories for backup, or import them into a new browser.
How we built it
We architected the AI Mind Journal with a "privacy-by-design" philosophy from the ground up. • Architecture: The application is a 100% client-side, serverless web app built with HTML, modern CSS, and JavaScript (ES Modules). This choice was crucial for guaranteeing user privacy. • Data Persistence: All application state, including journal entries, AI-generated summaries, and user settings, is stored and managed using the browser's localStorage API. • On-Device AI: The core logic is designed to interface with powerful AI models. We integrated a system capable of using Chrome's built-in window.ai API, which allows for all AI processing to happen directly on the user's device without data ever leaving their machine. • Memory System Engineering: We developed a sophisticated, multi-layered memory system. The logic is programmed to periodically process new journal entries into concise summaries and, after a certain threshold, consolidate those into higher-level "meta-summaries" that capture long-term personal narratives.
Challenges we ran into
• Creating a "Remembering" AI: The biggest challenge was moving beyond a stateless chatbot. We overcame this by engineering the multi-layered memory system. Implementing the logic for summarization and meta-summarization was complex but vital to creating the feeling of a continuous, evolving conversation. • Ensuring Absolute Privacy with AI: Reconciling advanced AI features with a strict privacy guarantee was a major hurdle. Our solution was the commitment to a serverless architecture and leveraging on-device AI. This ensures our privacy promise is a technical reality, not just a policy statement. • Maintaining a Consistent AI Persona: It was challenging to ensure the AI consistently embodied its role as a warm, supportive therapist. This required meticulous prompt engineering, where we crafted detailed system instructions to define its personality, goals, and conversational boundaries.
Accomplishments that we're proud of
• Achieving True Privacy by Design: We are most proud of creating a powerful AI tool that requires zero trust from the user. The client-side architecture and on-device processing mean that user privacy is guaranteed by the code itself. • The Multi-Layered Memory System: We successfully designed an innovative memory system that provides the AI with genuine long-term context, allowing it to have conversations that are more personal and insightful than typical chatbots. • A Genuinely Empathetic AI: Through careful prompt engineering, we've created an AI persona that users find warm, supportive, and non-judgmental, fulfilling our initial vision for an empathetic digital companion. • Full Data Portability: We empowered users with full ownership of their data through easy-to-use import/export functions, reinforcing our commitment to user control.
What we learned
• On-Device AI is the Future of Private Apps: We learned that on-device AI is a game-changing technology. It unlocks the ability to build intelligent, personalized applications that are fast, can work offline, and are fundamentally more secure and respectful of user privacy. • Prompt Engineering is a Core Development Skill: Crafting the right prompts is as important as writing the code. We learned to design detailed instructions that effectively shape the AI's behavior, from its conversational tone to its complex analytical tasks. • A Serverless Approach is Viable: We learned that a complex, stateful application can be built entirely on the client-side. This project deepened our understanding of browser storage and state management, proving that a backend is not always necessary to deliver a rich user experience.
What's next for AI Mind Journal
We are excited about the future of the AI Mind Journal and plan to expand its capabilities while staying true to our privacy-first principles. • Expanded Guided Wellness Exercises: We plan to introduce a wider range of AI-guided exercises, such as mindfulness, gratitude prompts, and cognitive reframing techniques. • Deeper Personal Insights: We aim to enhance the dashboard with longer-term trend analysis, keyword clouds from journals, and the ability to identify connections between events and emotions. • Voice Journaling: We want to add a speech-to-text feature to allow users to speak their journal entries, offering a more natural and accessible way to capture their thoughts. • Personalized Goal Setting: We envision a feature where users can set personal wellness goals (e.g., managing anxiety), and the AI companion will help them track their progress and stay motivated by referencing their journal entries.
Built With
- ai
- browser-local-storage
- chrome?s
- css
- google-gemini-api
- html
- javascript-(es-modules)
- on-device
- phosphor-icons
- phosphor-icons-?-architecture:-purely-client-side
- progressive-web-app-(pwa)
- progressive-web-app-(pwa)-?-programming:-modern-javascript-(es-modules)-?-data-&-storage:-browser-local-storage-(privacy-first
- tailwind-css
Log in or sign up for Devpost to join the conversation.