A beautiful, emotionally intelligent diary app powered by Together.ai's advanced AI models (including Llama 3, Mixtral, and more) that helps users reflect on their day through conversational AI and voice interactions.
- Advanced AI Models: Chat with an empathetic AI companion using Together.ai's powerful models (Llama 3 70B, Mixtral 8x7B, and more)
- Voice Chat Integration: Real-time voice conversations with ElevenLabs Conversational AI
- Intelligent Responses: Context-aware responses that encourage deeper reflection
- Automatic Entry Creation: Transform your conversations into beautifully written diary entries
- Multiple Writing Styles: AI generates entries in various tones (poetic, narrative, introspective, conversational)
- Emotion Analysis: Advanced emotion detection that visualizes your emotional journey
- Photo Integration: Attach photos to your diary entries for richer memories
- Proactive Check-ins: AI reaches out based on patterns, milestones, and inactivity
- Memory System: AI remembers your patterns, preferences, and important moments
- Weekly Insights: Automated analysis of emotional patterns and growth observations
- Personality Modes: Choose from therapist, poet, coach, friend, or philosopher personalities
- Milestone Tracking: Celebrates journaling streaks and entry milestones
- Timeline View: Browse your reflections with emotion-colored cards and detailed analysis
- Calendar Integration: Navigate through your emotional journey by date
- Emotion Tracking: Visual indicators and intensity measurements
- Growth Insights: AI-generated observations about your personal development
- User Authentication: Secure sign-up/sign-in with Supabase Auth
- Database Storage: All entries stored securely in Supabase PostgreSQL with Row Level Security
- Data Encryption: Your personal reflections are protected and private
- Responsive Interface: Modern, intuitive design that works on all devices
- Smooth Animations: Thoughtful micro-interactions and transitions
- Emotion Colors: Visual representation of emotions with custom color schemes
- Apple-level Aesthetics: Premium design with attention to detail
npm install
- Get your Together.ai API key from Together.ai
- Sign up and add credits to access premium models like Llama 3 70B and Mixtral 8x7B
- Free tier available with rate limits
- Create a
.env
file in the root directory:
# Together.ai API Configuration
VITE_TOGETHER_API_KEY=your_together_api_key_here
# Optional: Custom Together.ai settings
VITE_TOGETHER_MODEL=meta-llama/Llama-3-70b-chat-hf
VITE_TOGETHER_MAX_TOKENS=1000
VITE_TOGETHER_TEMPERATURE=0.7
- Replace
your_together_api_key_here
with your actual Together.ai API key
- Create a Supabase project at supabase.com
- Add your Supabase credentials to the
.env
file:
# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
- Run the database migrations to create the required tables:
- Go to your Supabase dashboard β SQL Editor
- Run the migration files from
supabase/migrations/
in order
The app includes ElevenLabs Conversational AI for voice interactions. The default agent ID is pre-configured, but you can:
- Create your own agent at ElevenLabs
- Update the agent ID in the VoiceChat component
- Customize the voice personality and responses
npm run dev
- Sign Up/Sign In: Create an account or sign in to access your personal diary
- Start Chatting: Click on the Chat tab and begin sharing your thoughts with the AI companion
- Voice Conversations: Use the microphone button to start voice chats with the AI
- Add Photos: Upload photos to your conversations for richer diary entries
- Chat with AI: Have meaningful conversations about your day, feelings, and experiences
- Generate Entry: Click "Generate Diary Entry" to transform your chat into a beautiful reflection
- Review Timeline: Browse your emotional journey in the Timeline view
- Track Patterns: Use the Calendar view to see your mood patterns over time
- Proactive Check-ins: Your AI companion will reach out when it notices patterns or milestones
- Weekly Insights: Generate comprehensive analysis of your emotional patterns and growth
- Personality Settings: Customize your AI companion's personality and check-in frequency
- Memory System: The AI learns your preferences and patterns over time
- Start Voice Chat: Click the microphone button in the chat interface
- Natural Conversations: Speak naturally with the AI companion
- Real-time Responses: Get immediate voice responses powered by ElevenLabs
- Seamless Integration: Voice conversations can be included in diary entries
The app uses Together.ai's unified API for access to state-of-the-art AI models:
- Available Models: Llama 3 70B, Llama 3 8B, Mixtral 8x7B, Mistral 7B, and more
- Conversational AI: Empathetic responses that encourage deeper reflection
- Diary Generation: Transform conversations into thoughtful, first-person diary entries
- Emotion Analysis: Advanced emotion detection beyond simple keyword matching
- Agent Features: Proactive check-ins, weekly insights, and memory management
- Real-time Voice Chat: Natural voice conversations with AI
- Conversational AI Widget: Embedded voice interface
- Customizable Agents: Configure personality and voice characteristics
- Seamless Experience: Voice chats integrate with text conversations
Model | Description | Use Case |
---|---|---|
meta-llama/Llama-3-70b-chat-hf |
Meta's most capable Llama 3 model | Complex conversations, diary generation |
meta-llama/Llama-3-8b-chat-hf |
Efficient Llama 3 model | Quick responses, emotion analysis |
mistralai/Mixtral-8x7B-Instruct-v0.1 |
Mistral's powerful mixture of experts | Advanced reasoning, insights |
mistralai/Mistral-7B-Instruct-v0.1 |
Mistral's efficient 7B model | Fast responses, check-ins |
NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO |
Fine-tuned Mixtral for conversations | Empathetic responses |
teknium/OpenHermes-2.5-Mistral-7B |
Optimized Mistral for dialogue | Natural conversations |
If the Together.ai API key is not configured, the app gracefully falls back to:
- Mock AI responses for demonstration
- Rule-based emotion analysis
- Template-based diary generation
- Local storage for data persistence
The app uses Supabase PostgreSQL with comprehensive tables:
- diary_entries: Stores user diary entries with emotions, chat history, photos, and metadata
- agent_memories: AI memory system for patterns, preferences, milestones, and concerns
- agent_checkins: Proactive AI outreach messages and responses
- weekly_insights: Automated weekly emotional analysis and growth tracking
- agent_settings: User preferences for AI personality and behavior
- Row Level Security: Ensures users can only access their own data
- Authentication: Secure user management with Supabase Auth
- Data Encryption: All sensitive data is encrypted at rest
- API Security: Secure API endpoints with proper authentication
Variable | Description | Default | Required |
---|---|---|---|
VITE_TOGETHER_API_KEY |
Your Together.ai API key | - | For AI features |
VITE_TOGETHER_MODEL |
Together.ai model to use | meta-llama/Llama-3-70b-chat-hf |
No |
VITE_TOGETHER_MAX_TOKENS |
Maximum tokens per request | 1000 |
No |
VITE_TOGETHER_TEMPERATURE |
Response creativity (0-1) | 0.7 |
No |
VITE_SUPABASE_URL |
Your Supabase project URL | - | Yes |
VITE_SUPABASE_ANON_KEY |
Your Supabase anonymous key | - | Yes |
- Create a backend API to handle Together.ai requests
- Store API keys securely on the server
- Implement proper authentication and rate limiting
- Use environment variables on the server side
- Add request validation and sanitization
- Implement proper error handling and logging
npm run build
The built files will be in the dist
directory, ready for deployment.
- React 18 with TypeScript for robust development
- Tailwind CSS for beautiful, responsive styling
- Lucide React for consistent iconography
- Vite for fast development and optimized builds
- Together.ai API for advanced AI models and conversations
- ElevenLabs Conversational AI for voice chat capabilities
- Custom emotion analysis with AI-powered insights
- Supabase for database, authentication, and real-time features
- PostgreSQL with Row Level Security for data protection
- Automated migrations for database schema management
- Real-time updates with Supabase subscriptions
- Responsive design with mobile-first approach
- Progressive Web App capabilities
- Offline support with local storage fallbacks
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Test with both Together.ai API and fallback modes
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Submit a pull request
- Follow TypeScript best practices
- Maintain responsive design principles
- Test all AI integrations thoroughly
- Ensure fallback modes work properly
- Add proper error handling
- Update documentation for new features
MIT License - feel free to use this project for personal or commercial purposes.
- Together.ai for providing access to state-of-the-art AI models
- ElevenLabs for revolutionary voice AI technology
- Supabase for the excellent backend-as-a-service platform
- React & Tailwind communities for amazing development tools
Memorify - Transform your thoughts into beautiful reflections with the power of AI π