UBloom is a minimum viable product (MVP) demonstrating a goal-based mental health application. It connects user journaling with AI-powered reflection and gamification (pet status and points) to encourage positive habits and growth.
The primary loop of the MVP validates the core value proposition: Journaling
- AI Reflection Engine: Users submit a journal entry, and the Python backend uses the Kronos Labs API with a structured prompt (Guardrail) to return a three-part, non-therapeutic reflection:
- Insight: Empathetic mirroring of the user's emotion.
- Growth Path: A concrete mini-goal suggestion.
- Reflection Prompt: A question for deeper self-assessment.
- Goal-Based Gamification: The user can instantly convert an AI-suggested "Growth Path" into an actionable goal.
- Pet Status & Points: Completing a goal awards 10 points and sets the virtual pet to "Happy". Failing a goal sets the pet to "Sad", closing the gamification feedback loop.
- Dark Mode UI: A clean, dark-mode interface built with React, focusing on accessibility and a calming user experience.
This project requires two separate servers running concurrently: a Python Backend (for the AI) and a React Frontend (for the UI).
- Python (3.8+)
- Node.js and npm
- A Kronos Labs API Key
-
Navigate to the Root Directory (where
app.pyis located):cd ~/byte/
-
Create and Activate Virtual Environment (Recommended):
python3 -m venv venv source venv/bin/activate -
Install Dependencies:
pip install flask kronoslabs python-dotenv flask-cors
Or install from requirements.txt:
pip install -r requirements.txt
-
Set API Key: Create a file named
.envin the root directory and add your key:# .env KRONOS_API_KEY="your-api-key-here" -
Run the Server:
python app.py
Keep this terminal window open. The server listens on
http://127.0.0.1:5000.
- Open a New Terminal Tab and navigate to the React app folder:
cd bloombuddy-app - Install Dependencies:
npm install react-router-dom
- Start the React Development Server:
This will open the UBloom app in your browser (typically
npm start
http://localhost:3000).
- Journal: Navigate to the "Journal" tab. Write an entry and click "Get Insight" (or "ANALYZE").
- Action: The AI reflection card appears. Click "Set as Goal" on the generated Growth Path (mini-goal).
- Goals: Navigate to the "Goals" tab and find your new mini-goal. Click "Done" (or "Failed").
- Reward: Navigate to the "Home" tab. Your Growth Points will increase, and your Pet Status will change to "Happy," validating the core gamification loop.
- Frontend: React (JavaScript, JSX), React Router.
- Backend: Python 3, Flask,
python-dotenv. - AI: Kronos Labs API (
hermesmodel). - Styling: Custom component-scoped dark-mode CSS.