Your AI-Powered Mental Health Companion
A compassionate desktop application providing 24/7 mental health support through AI conversations, mood tracking, and emergency assistance.
β¨ Features β’ πΈ Screenshots β’ π Quick Start β’ π Documentation β’ π οΈ Development
- Overview
- Why SoulSync?
- Features
- Screenshots
- Tech Stack
- Prerequisites
- Quick Start
- Installation
- Running as Desktop App
- Building for Distribution
- Project Structure
- Configuration
- Development Guide
- Troubleshooting
- Contributing
- License
SoulSync 2.0 is a privacy-first, desktop mental health companion designed to provide a safe, secure, and supportive environment for users seeking emotional support. Built with Electron, React, and FastAPI, SoulSync offers real-time AI conversations, comprehensive mood tracking, crisis detection, and emergency contact integration.
- π Privacy First: All data stored locally on your device - no cloud storage
- π€ AI-Powered Support: Empathetic AI conversations available 24/7
- π Mood Tracking: Visualize and understand your emotional patterns over time
- π¨ Crisis Detection: Automatic detection and emergency contact notification
- π Calming Design: Wellness-focused green theme designed for comfort and peace
- π₯οΈ True Desktop App: Runs completely offline after installation
- π Free & Open Source: No subscriptions, no hidden costs
- β Secure local user registration and login
- β Emergency contact setup with Telegram integration
- β Personalized onboarding experience
- β Privacy-focused - all data stays on your device
- β Real-time conversations with empathetic AI
- β Context-aware responses trained on mental health therapy
- β Conversation history with easy management
- β Crisis detection and automatic support
- β Supportive responses for anxiety, depression, and stress
- β Daily mood tracking with interactive slider (1-10 scale)
- β Emotion tags: Happy, Sad, Anxious, Calm, Stressed, Excited, Lonely, Grateful
- β Visual mood history with statistics
- β 7-day mood average tracking
- β Personalized wellness tips and recommendations
- β Optional notes for journaling thoughts
- β Quick access panic button (Ctrl/Cmd+Shift+E)
- β Instant notification to emergency contacts via Telegram
- β Desktop notifications for immediate response
- β Confirmation modal to prevent accidental triggers
- β Visible from all pages
- β Profile management (name, email, username)
- β Emergency contact configuration
- β Telegram Chat ID validation
- β Data export functionality (coming soon)
- β Account management
- β System tray integration - minimize to tray
- β Global keyboard shortcuts - quick access anywhere
- β Desktop notifications - stay informed
- β Window state persistence - remembers size and position
- β Cross-platform - Windows, macOS, and Linux support
- β Offline-first - works without internet after installation
Clean, calming interface with wellness-focused aesthetics
Secure registration with optional emergency contact setup
Configure Telegram emergency notifications for safety
Introduction to SoulSync features
Track your emotional wellness with daily mood check-ins
Features visible:
- Daily mood check-in with slider (1-10)
- Emotion tag selection (Happy, Calm, Anxious, Sad, Stressed, Excited, Lonely, Grateful)
- 7-day mood average tracking
- Wellness tips section
- Quick access to AI chat
- Sidebar navigation
Get support from empathetic AI trained on mental health therapy
Features visible:
- Friendly greeting with user's name
- Quick action buttons (Emotional Support, Coping Strategies, Reflection)
- Conversation starters (Grounding Exercise, Mood Check, Journaling Starter)
- Clean message input with voice and attachment support
- Sidebar showing recent conversations
Manage your profile and emergency contacts
Features visible:
- Profile information management
- Emergency contact configuration with Telegram
- Clear explanation of safety features
- Easy-to-use form interface
| Technology | Version | Purpose |
|---|---|---|
| Electron | ^28.0.0 | Desktop application framework |
| React | ^19.0.0 | UI library with hooks |
| React Router | ^7.5.1 | Client-side routing |
| Tailwind CSS | ^3.4.17 | Utility-first styling |
| Framer Motion | ^12.23.25 | Smooth animations |
| Radix UI | Latest | Accessible component primitives |
| Chart.js | ^4.5.1 | Mood visualization charts |
| Lucide React | ^0.507.0 | Beautiful icon set |
| Axios | ^1.8.4 | HTTP client for API calls |
| Technology | Version | Purpose |
|---|---|---|
| FastAPI | 0.110.1 | Modern Python web framework |
| Uvicorn | 0.25.0 | Lightning-fast ASGI server |
| Pydantic | ^2.6.4 | Data validation with type hints |
| Aiofiles | ^25.1.0 | Async file operations |
| Python | 3.11+ | Programming language |
- Local JSON Files - All user data, conversations, and mood history
- electron-store ^8.1.0 - Persistent application settings
- No Database Required - Works completely offline
- CRACO - Create React App Configuration Override
- electron-builder ^24.9.1 - Package and distribute application
- Concurrently ^8.2.2 - Run multiple processes
- Wait-on ^7.2.0 - Wait for resources before starting
Before installing SoulSync, ensure you have the following on your system:
β
Node.js >= 16.x (Recommended: v20.x)
β
npm >= 8.x or Yarn >= 1.22.x
β
Python >= 3.11.x
β
pip (Python package manager)β
No dependencies required!
β
Just download and install the app for your platform# Check Node.js version
node --version
# Expected: v16.x or higher
# Check npm version
npm --version
# Expected: 8.x or higher
# Check Yarn version (if using Yarn)
yarn --version
# Expected: 1.22.x or higher
# Check Python version
python3 --version
# Expected: Python 3.11 or higher
# Check pip version
pip --version
# Expected: pip 21.x or higherComing Soon! Pre-built installers will be available for:
- πͺ Windows -
.exeinstaller - π macOS -
.dmgdisk image - π§ Linux -
.AppImageor.debpackage
Simply download, install, and run. No technical setup required!
# 1. Clone the repository
git clone https://github.com/yourusername/soulsync-desktop.git
cd soulsync-desktop
# 2. Install all dependencies (this will take a few minutes)
yarn install
# 3. Start the application in development mode
yarn dev
# The app will open automatically!That's it! SoulSync will start with both the backend and frontend running.
git clone https://github.com/yourusername/soulsync-desktop.git
cd soulsync-desktop# This installs everything: root, frontend, and backend dependencies
yarn installThe postinstall script automatically:
- β Installs root Electron dependencies
- β Installs frontend React dependencies
- β Installs backend Python dependencies
# Install root dependencies (Electron)
yarn install
# Install frontend dependencies
cd frontend
yarn install
cd ..
# Install backend dependencies
cd backend
pip install -r requirements.txt
cd ..The backend uses local JSON file storage and doesn't require MongoDB or any external database.
Optional: Configure Telegram Emergency Notifications
If you want to enable emergency contact notifications via Telegram:
-
Create a Telegram Bot:
- Open Telegram and search for
@BotFather - Send
/newbotand follow the instructions - Copy your bot token
- Open Telegram and search for
-
Update
backend/.env:
# Optional: Telegram Bot for Emergency Alerts
TELEGRAM_BOT_TOKEN=your_bot_token_here- Get your Telegram Chat ID:
- Send a message to
@userinfoboton Telegram - It will reply with your Chat ID
- Users can configure this in the Settings page
- Send a message to
The frontend is already configured to communicate with the local backend:
# frontend/.env (already configured)
REACT_APP_BACKEND_URL=http://localhost:8001No changes needed! The app is ready to run.
Run all services together with hot reload enabled:
# Start everything: backend + frontend + Electron
yarn devThis command:
- β
Starts the FastAPI backend on
localhost:8001 - β
Starts the React dev server on
localhost:3000 - β Launches the Electron desktop window
- β Enables hot reload for both frontend and backend
To run the app with production builds:
# 1. Build the frontend
cd frontend
yarn build
cd ..
# 2. Start Electron with production build
yarn startWhen running the desktop app, use these shortcuts:
| Shortcut | Action |
|---|---|
Ctrl/Cmd + N |
New chat conversation |
Ctrl/Cmd + K |
Open search |
Ctrl/Cmd + , |
Open settings |
Ctrl/Cmd + Shift + E |
π¨ Trigger SOS emergency button |
Ctrl/Cmd + Q |
Quit application |
Create standalone installers for different platforms:
Windows:
- Windows 7 or later
macOS:
- macOS 10.12 or later
- Xcode Command Line Tools:
xcode-select --install
Linux:
- Build tools:
sudo apt-get install build-essential
# Build for your current platform
yarn electron:build
# Build for specific platforms
yarn electron:build:win # Windows .exe installer
yarn electron:build:mac # macOS .dmg image
yarn electron:build:linux # Linux .AppImage and .debBuilt applications will be in the dist/ directory:
dist/
βββ SoulSync Setup.exe # Windows installer (NSIS)
βββ SoulSync.dmg # macOS disk image
βββ SoulSync.AppImage # Linux AppImage (universal)
βββ soulsync_amd64.deb # Debian package
# Navigate to dist folder
cd dist
# On Windows
./SoulSync Setup.exe
# On macOS
open SoulSync.dmg
# On Linux
chmod +x SoulSync.AppImage
./SoulSync.AppImageThe build configuration is in package.json:
{
"build": {
"appId": "com.soulsync.desktop",
"productName": "SoulSync",
"directories": {
"output": "dist",
"buildResources": "electron/resources"
},
"files": [
"electron/**/*",
"frontend/build/**/*",
"backend/**/*"
]
}
}soulsync-desktop/
β
βββ electron/ # Electron main process
β βββ main.js # Main process entry (window, tray, shortcuts)
β βββ preload.js # Preload script for secure IPC
β βββ icon.png # Application icon
β
βββ frontend/ # React frontend
β βββ public/ # Static assets
β βββ src/
β β βββ components/ # React components
β β β βββ ui/ # Reusable UI components (Radix)
β β β βββ AppShell.jsx # Main application layout
β β β βββ Sidebar.jsx # Navigation sidebar
β β β βββ SOSButton.jsx # Emergency panic button
β β β βββ ...
β β βββ pages/ # Page components
β β β βββ AuthPage.jsx # Login/Signup
β β β βββ OnboardingPage.jsx # User onboarding
β β β βββ MoodDashboard.jsx # Mood tracking
β β β βββ ChatPage.jsx # AI chat interface
β β β βββ SettingsPage.jsx # User settings
β β βββ hooks/ # Custom React hooks
β β β βββ useAuth.js # Authentication
β β β βββ useElectron.js # Electron integration
β β β βββ useConversations.js # Chat management
β β β βββ useMood.js # Mood tracking
β β βββ lib/ # Utility functions
β β βββ App.js # Root component
β β βββ index.js # Entry point
β βββ package.json
β βββ craco.config.js # CRACO configuration
β βββ tailwind.config.js # Tailwind CSS config
β βββ .env # Environment variables
β
βββ backend/ # FastAPI backend
β βββ server.py # Main FastAPI application
β βββ data/ # Local JSON storage
β β βββ users.json # User data
β β βββ conversations.json # Chat history
β β βββ mood_entries.json # Mood tracking data
β β βββ status_checks.json # System status
β βββ requirements.txt # Python dependencies
β βββ .env # Backend configuration
β
βββ screenshots/ # Application screenshots
β βββ 01-auth-login.png
β βββ 02-auth-signup.png
β βββ ...
β
βββ package.json # Root package.json (Electron)
βββ yarn.lock # Dependency lock file
βββ README.md # This file
| File | Purpose |
|---|---|
electron/main.js |
Electron main process - manages window, tray, keyboard shortcuts |
electron/preload.js |
Secure bridge between Electron and React |
frontend/src/App.js |
React root component with routing |
backend/server.py |
FastAPI backend with all API endpoints |
package.json (root) |
Electron and build configuration |
frontend/package.json |
React dependencies and scripts |
backend/requirements.txt |
Python dependencies |
Desktop app settings are configured in the root package.json:
{
"build": {
"appId": "com.soulsync.desktop",
"productName": "SoulSync",
"win": {
"target": ["nsis"],
"icon": "electron/icon.png"
},
"mac": {
"target": ["dmg"],
"category": "public.app-category.healthcare-fitness"
},
"linux": {
"target": ["AppImage", "deb"],
"category": "Education"
}
}
}SoulSync follows Electron security best practices:
- β Context Isolation - Enabled
- β Node Integration - Disabled in renderer
- β Preload Script - Used for secure IPC
- β Remote Module - Disabled
- β External Links - Opened in default browser
- Default size: 1280x800
- Minimum size: 1024x600
- Window state persistence: Remembers size, position, maximized state
- Minimize to tray: Optional, configurable
| Endpoint | Method | Description |
|---|---|---|
/api/ |
GET | Health check |
/api/health |
GET | Detailed health status |
/api/users/register |
POST | Register new user |
/api/users/login |
POST | User login |
/api/users/{id} |
GET | Get user profile |
/api/users/{id} |
PATCH | Update user |
/api/chat |
POST | Send chat message |
/api/conversations/{user_id} |
GET | Get all conversations |
/api/mood |
POST | Create mood entry |
/api/mood/{user_id} |
GET | Get mood history |
/api/mood/{user_id}/stats |
GET | Get mood statistics |
/api/emergency/notify |
POST | Send emergency alert |
# Clone and install
git clone https://github.com/yourusername/soulsync-desktop.git
cd soulsync-desktop
yarn install# Terminal 1: Start everything
yarn dev
# Or run separately:
# Terminal 1: Backend only
cd backend
uvicorn server:app --reload --host 0.0.0.0 --port 8001
# Terminal 2: Frontend only
cd frontend
yarn start
# Terminal 3: Electron only
yarn startFrontend Changes:
- Edit files in
frontend/src/ - Hot reload is automatic
- Changes appear instantly
Backend Changes:
- Edit
backend/server.py - Uvicorn auto-reloads with
--reloadflag - Changes applied automatically
Electron Changes:
- Edit
electron/main.jsorelectron/preload.js - Restart Electron: Close window and run
yarn start
# Create new component
touch frontend/src/components/NewFeature.jsx// frontend/src/components/NewFeature.jsx
import React from 'react';
export const NewFeature = () => {
return (
<div className="p-4 bg-primary/10 rounded-lg">
<h2 className="text-2xl font-bold text-primary">New Feature</h2>
<p className="text-muted-foreground">Feature description</p>
</div>
);
};# backend/server.py
@api_router.post("/new-feature")
async def new_feature(data: dict):
"""New feature endpoint."""
# Process data
result = {"success": True, "data": data}
return result// electron/main.js
ipcMain.handle('new-feature', async (event, data) => {
console.log('New feature called:', data);
return { success: true };
});// electron/preload.js
contextBridge.exposeInMainWorld('electron', {
newFeature: (data) => ipcRenderer.invoke('new-feature', data)
});- Follow ESLint configuration
- Use functional components with hooks
- Use Tailwind CSS utility classes
- Follow component naming conventions
- Follow PEP 8 style guide
- Use type hints with Pydantic models
- Async/await for all I/O operations
- Clear docstrings for all functions
# Frontend tests (if configured)
cd frontend
yarn test
# Backend tests
cd backend
pytest
# E2E tests (coming soon)
yarn test:e2e- Frontend: React hot reload works automatically
- Backend: Uvicorn auto-reloads with
--reloadflag - Electron Main Process: Manual restart required
- Electron Renderer: Uses React hot reload
Problem: yarn install fails or takes too long
Solutions:
# Clear yarn cache
yarn cache clean
# Remove node_modules and reinstall
rm -rf node_modules frontend/node_modules
yarn install
# Use npm instead if Yarn fails
npm install
cd frontend && npm installProblem: yarn start shows Electron errors
Solutions:
# Check if Electron is installed
ls node_modules/.bin/electron
# Reinstall Electron
yarn add electron@^28.0.0 --dev
# Clear Electron cache
rm -rf node_modules/electron
yarn install
# Try rebuilding native modules
cd node_modules/electron && npm run installProblem: Backend server fails to start
Solutions:
# Check Python dependencies
cd backend
pip list | grep fastapi
# Reinstall requirements
pip install -r requirements.txt --force-reinstall
# Check if port 8001 is available
lsof -i :8001 # macOS/Linux
netstat -ano | findstr :8001 # Windows
# Start manually to see errors
cd backend
python -m uvicorn server:app --reload --port 8001Problem: yarn build fails with errors
Solutions:
cd frontend
# Clear cache
rm -rf node_modules/.cache
# Check for syntax errors
npx eslint src/
# Reinstall dependencies
rm -rf node_modules
yarn install
# Try building again
yarn buildProblem: Backend fails with import error
Solution:
cd backend
pip install aiofiles
pip freeze > requirements.txtProblem: User data disappears after restart
Check:
# Verify data directory exists
ls -la backend/data/
# Check file permissions
chmod 755 backend/data/
chmod 644 backend/data/*.json
# View data files
cat backend/data/users.jsonProblem: Emergency notifications not sent
Solutions:
- Verify bot token in
backend/.env:TELEGRAM_BOT_TOKEN=123456:ABC-DEF...
- Test bot token:
curl "https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getMe" - Verify Chat ID is correct (send message to
@userinfobot)
Problem: Backend or frontend port is already in use
Solutions:
# Kill process on port 8001 (backend)
lsof -ti:8001 | xargs kill -9 # macOS/Linux
netstat -ano | findstr :8001 # Windows - note PID, then:
taskkill /PID <PID> /F # Windows
# Kill process on port 3000 (frontend)
lsof -ti:3000 | xargs kill -9 # macOS/LinuxEnable debug logging:
# Backend debug mode
cd backend
DEBUG=1 uvicorn server:app --reload --log-level debug
# Frontend debug mode
cd frontend
REACT_APP_DEBUG=true yarn start
# Electron debug mode with DevTools
# DevTools automatically open in development modeIf you encounter issues not listed here:
-
Check the logs:
# Backend logs tail -f backend/logs/app.log # Frontend console # Open DevTools in Electron: View β Toggle Developer Tools
-
Search existing issues on GitHub
-
Open a new issue with:
- Error messages (full stack trace)
- Steps to reproduce
- System information:
node --version python --version yarn --version uname -a # macOS/Linux systeminfo # Windows
-
Join our community:
- Discord: discord.gg/soulsync
- Reddit: r/soulsync
We welcome contributions from the community! Here's how you can help:
- π Bug Reports - Report issues you encounter
- β¨ Feature Requests - Suggest new features
- π Documentation - Improve or translate docs
- π» Code - Submit bug fixes or new features
- π¨ Design - Improve UI/UX
- π§ͺ Testing - Write tests or test releases
-
Fork the Repository
# Click "Fork" on GitHub, then: git clone https://github.com/YOUR_USERNAME/soulsync-desktop.git cd soulsync-desktop
-
Create a Feature Branch
git checkout -b feature/amazing-feature # or git checkout -b fix/bug-description -
Make Your Changes
- Write clean, documented code
- Follow existing code style
- Add comments for complex logic
- Test your changes thoroughly
-
Commit Your Changes
git add . git commit -m "feat: add amazing feature"
Commit Message Format:
<type>: <description> [optional body] [optional footer]Types:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style (formatting, no logic change)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
-
Push to Your Fork
git push origin feature/amazing-feature
-
Create a Pull Request
- Go to the original repository
- Click "New Pull Request"
- Select your branch
- Fill in the PR template
- Submit for review
- Automated Checks - CI/CD runs tests and linting
- Maintainer Review - Core team reviews code
- Feedback - Address any requested changes
- Approval - Once approved, PR is merged
- Release - Your contribution is included in the next release
- β Keep changes focused and atomic
- β Write clear commit messages
- β Add tests for new features
- β Update documentation
- β Follow the existing code style
- Use functional components with hooks
- Keep components small and focused
- Use Tailwind CSS for styling
- Add
data-testidfor testing - Ensure accessibility (ARIA labels)
- Use async/await for I/O operations
- Add type hints with Pydantic
- Write clear docstrings
- Handle errors gracefully
- Log important events
- Be respectful and inclusive - treat everyone with kindness
- Help others learn - we're all here to grow
- Give constructive feedback - focus on improvement
- Maintain a positive environment - mental health matters
Contributors will be:
- β¨ Listed in the CONTRIBUTORS.md file
- π Mentioned in release notes
- π Thanked in the project README
- π Eligible for special Discord roles
This project is licensed under the MIT License.
MIT License
Copyright (c) 2024 SoulSync Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
β
Free to use - personal or commercial
β
Free to modify - adapt to your needs
β
Free to distribute - share with others
β
Free to sublicense - include in your projects
β No warranty - use at your own risk
β Attribution required - keep the copyright notice
- Electron - Making desktop apps with web technologies possible
- React - Powerful and flexible UI framework
- FastAPI - Modern, fast Python web framework
- Radix UI - Accessible, unstyled component primitives
- Tailwind CSS - Utility-first CSS framework
- Lucide Icons - Beautiful icon set
- Framer Motion - Production-ready animations
- Mental health professionals worldwide
- Open source mental health initiatives
- The supportive developer community
- All contributors who help improve SoulSync
- Mental health advocates and users
- The open source community
- π Documentation: This README and docs/ folder
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Discussions
- π¬ Community Chat: Discord Server
If you're in crisis, please reach out:
- πΊπΈ USA: 988 (Suicide & Crisis Lifeline)
- π¬π§ UK: 116 123 (Samaritans)
- π¨π¦ Canada: 1-833-456-4566 (Talk Suicide Canada)
- π¦πΊ Australia: 13 11 14 (Lifeline)
- π International: findahelpline.com
SoulSync is a support tool, not a replacement for professional help.
- π¦ Twitter: @SoulSyncApp
- π§ Email: support@soulsync.app
- π¬ Discord: Join our community
- π Website: soulsync.app
If you find SoulSync helpful, please consider giving it a star β
Your support helps us reach more people who need mental health support.
- AI model integration (GPT-4, Claude, etc.)
- Voice input for chat
- Mood visualization charts with trends
- Daily wellness reminders
- Journaling feature
- Export conversation history
- Multiple language support
- Dark mode improvements
- Mobile app companion (iOS/Android)
- End-to-end encryption for cloud sync
- Group therapy sessions
- Integration with wearables (Apple Watch, Fitbit)
- Meditation timer and guides
- Sleep tracking integration
- Professional therapist matching
- Insurance integration
Have a feature idea? Share it on GitHub Discussions!
Your mental health matters. You're not alone.
Thank you for using SoulSync!
Star β this repository if SoulSync helped you!






