Journal-AI is an intelligent journaling application that uses AI to transform daily logs into coherent diary entries and extract actionable tasks. The system integrates with Groq API to provide natural language processing capabilities.
Primary Function: Transforms raw daily logs into coherent, reflective diary entries
AI Model: Groq Compound Model
- Model Path:
groq/compound - Max Tokens: 1,500
- Temperature: 0.7 (moderately creative)
System Prompt:
You are a thoughtful diary writer assistant. Your task is to either:
1. CREATE a new diary entry from provided logs if no existing diary exists for the date
2. UPDATE an existing diary entry by seamlessly incorporating new logs while maintaining narrative flow
3. And your response must not contain any thinking or explanations, just the diary content.
When updating an existing diary:
- Read the existing diary content carefully
- Identify where new log information fits chronologically
- If existing diary entry is there, add the new information in a way that flows naturally
The logs may contain spelling mistakes, grammar errors, and be in random order. Always maintain a thoughtful, reflective diary tone.
Primary Function: Analyzes logs to identify tasks, to-dos, and action items
AI Model: Groq Compound Model
- Model Path:
groq/compound - Max Tokens: 1,000
- Temperature: 0.3 (more focused, less creative)
System Prompt:
You are a task identification assistant. Analyze the provided logs and identify any tasks, to-dos, or action items mentioned directly or indirectly.
Look for:
- Direct mentions: "need to", "should", "must", "remember to", "have to"
- Indirect mentions: "running low on" (implies restocking), "forgot to" (implies need to do later)
- Action verbs: "buy", "call", "finish", "complete", "schedule", "book"
- Deadlines and time-sensitive items
For each identified task:
1. Extract clear, actionable description
2. Determine priority: High (urgent/important), Medium (important), Low (nice to have)
3. Note the source log ID for reference
Return ONLY a JSON array with this exact structure:
[{"description": "task description", "priority": "High|Medium|Low", "sourceLogId": logId}]
Do not include any other text or formatting.
Description: Check API connection and Groq availability Response:
{
"status": "success",
"message": "Backend connected",
"groq_available": true,
"timestamp": "2025-10-01T12:00:00.000Z"
}Description: Retrieve all log entries Response:
{
"logs": [
{
"id": 1,
"content": "Had a productive morning meeting",
"timestamp": "120000011025",
"wordCount": 5
}
],
"nextId": 2
}Description: Create a new log entry Request Body:
{
"content": "Meeting with team about project updates"
}Response:
{
"status": "success",
"log": {
"id": 1,
"content": "Meeting with team about project updates",
"timestamp": "120000011025",
"wordCount": 6
}
}Description: Delete a specific log entry Response:
{
"status": "success",
"message": "Log deleted successfully"
}Description: Retrieve all diary entries Response:
{
"entries": [
{
"id": 1,
"date": "2025-10-01",
"content": "Today was a productive day...",
"createdAt": "2025-10-01T12:00:00.000Z",
"lastUpdated": "2025-10-01T12:00:00.000Z",
"logIds": [1, 2, 3]
}
],
"nextId": 2
}Description: Generate or update diary entry using AI Request Body:
{
"date": "2025-10-01"
}Response:
{
"status": "success",
"message": "Diary entry generated successfully"
}Description: Retrieve all tasks Response:
{
"tasks": [
{
"id": 1,
"description": "Schedule team meeting",
"priority": "High",
"completed": false,
"createdAt": "2025-10-01T12:00:00.000Z",
"sourceLogId": 1,
"date": "2025-10-01"
}
],
"nextId": 2
}Description: Extract tasks from logs using AI Request Body:
{
"date": "2025-10-01"
}Response:
{
"status": "success",
"message": "Generated 3 tasks",
"tasksCount": 3
}Description: Toggle task completion status Response:
{
"status": "success"
}Description: Delete a specific task Response:
{
"status": "success",
"message": "Task deleted successfully"
}Scenario: User wants to maintain a daily journal without spending time writing coherent entries
Workflow:
- User adds quick, unstructured logs throughout the day via POST
/api/logs - At end of day, user calls POST
/api/generate-diaryto create a thoughtful diary entry - AI analyzes all logs for the date and creates a coherent narrative
- User can regenerate or update the diary as more logs are added
Benefits:
- Captures thoughts in the moment without interrupting flow
- Creates meaningful reflection without time investment
- Maintains chronological narrative flow
Scenario: User mentions tasks and todos in casual logs but wants organized task tracking
Workflow:
- User logs daily activities that may contain implicit tasks: "Need to buy groceries, forgot to call mom"
- User calls POST
/api/generate-tasksto extract actionable items - AI identifies direct and indirect task mentions with priority levels
- Tasks appear in organized task list with source log references
- User can toggle completion via PUT
/api/tasks/{id}/toggle
Benefits:
- Never lose track of mentioned tasks
- Automatic priority assessment
- Seamless capture without breaking thought process
Scenario: Professional user logs meeting notes and work activities throughout the day
Workflow:
- User quickly logs meeting outcomes, decisions, and next steps
- AI diary generation creates professional daily summary
- AI task extraction identifies follow-up actions and deadlines
- User has both reflective summary and actionable task list
Benefits:
- Professional documentation without admin overhead
- Automatic action item tracking
- Clear daily work summaries
Scenario: User wants to track personal growth and maintain awareness of daily patterns
Workflow:
- User logs mood, activities, challenges, and wins throughout day
- AI creates reflective diary entry highlighting patterns and growth
- Task extraction identifies improvement opportunities and commitments
- Over time, user builds comprehensive personal development history
Benefits:
- Pattern recognition through AI analysis
- Consistent reflection habit
- Actionable insights for personal growth
Scenario: Creative professional managing multiple projects and ideas
Workflow:
- User logs inspiration, project updates, client feedback, and ideas
- AI diary creates narrative connecting different project threads
- Task extraction identifies project deadlines and creative tasks
- User maintains creative flow while ensuring nothing falls through cracks
Benefits:
- Captures creative inspiration without interrupting flow
- Organizes complex project landscapes
- Balances creativity with project management
Scenario: User tracking health, exercise, nutrition, and wellness activities
Workflow:
- User logs meals, exercise, symptoms, mood, and wellness activities
- AI creates health-focused diary entries showing daily wellness picture
- Task extraction identifies health goals and medical follow-ups
- User builds comprehensive wellness history with actionable insights
Benefits:
- Holistic daily health tracking
- Identifies health patterns and trends
- Ensures medical and wellness tasks aren't forgotten
Scenario: Student managing coursework, assignments, and academic activities
Workflow:
- Student logs class notes, assignment progress, study sessions, and academic insights
- AI creates academic diary showing learning progression and challenges
- Task extraction identifies assignments, study goals, and academic deadlines
- Student maintains comprehensive academic record with built-in task management
Benefits:
- Academic progress tracking without extra overhead
- Automatic assignment and deadline management
- Reflective learning enhancement
Scenario: Traveler wanting to document experiences without constant writing
Workflow:
- User logs quick thoughts, experiences, and observations during travel
- AI creates rich travel diary entries capturing the essence of each day
- Task extraction identifies travel logistics and planning items
- User builds comprehensive travel memories with minimal effort
Benefits:
- Rich travel documentation without time investment
- Captures moments without interrupting experiences
- Organized travel planning and logistics
- Current Format:
HHMMSSDDMMYYYY(e.g., "120000011025" = 12:00:00 on 01/10/2025) - Legacy Support: ISO format timestamps are still supported for backward compatibility
- All data stored in JSON files in
/datadirectory - Files:
logs.json,diary.json,tasks.json - Automatic data validation and repair on load
- Incremental ID assignment for all entities
- Comprehensive error handling with user-friendly messages
- Graceful degradation when Groq API is unavailable
- Data integrity validation and automatic repair
- Smart incremental updates for diary entries
- Duplicate task prevention through source log tracking
- Context-aware prompt engineering for different use cases
GROQ_API_KEY=your_groq_api_key_here
PORT=3001 (optional, defaults to 3001)
- Flask with CORS support
- Groq Python SDK
- python-dotenv for environment management
/
├── server.py # Flask backend with AI integration
├── app.js # Frontend JavaScript application
├── index.html # Main application interface
├── style.css # Application styling
├── requirements.txt # Python dependencies
├── .env # Environment configuration
└── data/ # Data storage directory
├── logs.json # User log entries
├── diary.json # Generated diary entries
└── tasks.json # Extracted tasks