ZenLog is a modern, user-friendly web application designed to support your mental well-being. It offers tools for tracking your mood, monitoring sleep, practicing mindfulness, and setting personal goals. Whether you're looking to manage stress, improve your emotional awareness, or build better habits, ZenLog is your companion on the journey to a more mindful life.
-
π Mood Tracker
Log daily moods and visualize trends through intuitive charts powered by Chart.js -
π Daily Reflections
Answer AI-curated prompts to reflect on emotions and identify patterns or triggers -
π΄ Sleep Tracker
Record sleep duration, get recommendations based on age, and receive personalized feedback -
π§ Mindful Activities
Access calming breathing exercises, mindfulness challenges, and nature-based tasks to reduce stress -
π― Personal Goals
Set, achieve, and track mental wellness goals with interactive controls and progress indicators -
π± Responsive Design
Fully optimized for both desktop and mobile use -
π« Smooth UI/UX
Includes subtle animations, interactive elements, and a clean, calming interface
| Component | Technology |
|---|---|
| Frontend | HTML, CSS, JavaScript (Vanilla) |
| Backend | PHP + MySQL |
| Charts | Chart.js |
| AI Support | OpenAI API |
zenlog/
βββ dashboard.html # Main dashboard interface
βββ dashboard.php # PHP version with backend integration
βββ styles.css # Main stylesheet with responsive design
βββ tracker.html # Sleep tracking interface
βββ activities.html # Mindful exercises and challenges
βββ js/
β βββ goal.js # Goal setting and tracking logic
β βββ mood.js # Mood logging and analysis
β βββ chatbot.js # OpenAI API integration
βββ php/
β βββ add-goal.php # Add new goals endpoint
β βββ fetch-goals.php # Retrieve goals data
β βββ mood-data.php # Mood tracking backend
β βββ config.php # Database configuration
βββ sql/
β βββ schema.sql # Database structure
βββ .env.example # Environment variables template
- Web server (Apache/Nginx)
- PHP 7.4+
- MySQL 5.7+
- OpenAI API key (optional, for AI features)
-
Clone the repository
git clone https://github.com/your-username/zenlog.git cd zenlog -
Set up your database
mysql -u your_username -p your_database < sql/schema.sql -
Configure database connection Update
php/config.phpwith your database credentials:<?php $host = 'localhost'; $dbname = 'zenlog_db'; $username = 'your_username'; $password = 'your_password'; ?>
-
Configure OpenAI API (Optional) Create
.envfile:OPENAI_API_KEY=your_openai_api_key_here
-
Launch the application Open
dashboard.htmlordashboard.phpin your web browser
- Dashboard: Start by logging your current mood and setting daily goals
- Sleep Tracker: Record your sleep patterns and view weekly trends
- Activities: Practice mindfulness exercises and breathing techniques
- Goals: Set wellness objectives and track your progress over time
- Reflections: Use AI-powered prompts for deeper self-awareness
-- Goals table
CREATE TABLE goals (
id INT PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(255) NOT NULL,
description TEXT,
completed BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Mood entries table
CREATE TABLE mood_entries (
id INT PRIMARY KEY AUTO_INCREMENT,
mood_score INT NOT NULL,
notes TEXT,
date DATE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Sleep data table
CREATE TABLE sleep_data (
id INT PRIMARY KEY AUTO_INCREMENT,
hours DECIMAL(3,1) NOT NULL,
quality INT,
date DATE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);# Database Configuration
DB_HOST=localhost
DB_NAME=zenlog_db
DB_USER=your_username
DB_PASS=your_password
# OpenAI API (Optional)
OPENAI_API_KEY=your_api_key
# Application Settings
DEBUG_MODE=false- 1-10 mood scale with emoji indicators
- Weekly and monthly trend visualization
- Pattern recognition and insights
- Duration tracking with quality ratings
- Age-based sleep recommendations
- Sleep debt calculation and recovery tips
- Guided breathing exercises (4-7-8 technique)
- Daily mindfulness challenges
- Nature-based relaxation tasks
- SMART goal framework integration
- Progress tracking with visual indicators
- Achievement celebration system
- Fork the repository
- Create your feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
- Chart.js requires internet connection for CDN version
- OpenAI API responses may be slow during peak usage
- Mobile drag interactions need refinement
- User authentication system
- Data export functionality
- Offline mode support
- Mobile app version
- Advanced analytics dashboard
This project is intended for educational and personal use only.
- Do not share or expose API keys publicly
- Keep user data secure and private
- Use HTTPS in production environments
- Chart.js for beautiful data visualizations
- OpenAI for AI-powered insights
- Mental health professionals who inspired this project
ZenLog β Your journey to a calmer, more mindful life starts here. πΏ