A minimalist mood journal application with AI-powered insights. Reflect on your emotions, write freely, and receive personalized summaries and themes from your journal entries.
- Emotion Check-in: Select how you're feeling with a simple, color-coded interface
- Free-form Reflection: Write your thoughts without judgment or limits
- AI Insights: Get personalized 2-3 sentence summaries and 3-5 key themes from each entry
- Pattern Tracking: View your emotional patterns over time
- Theme Discovery: See recurring themes across your journal entries
- Database Storage: All entries and insights are stored locally in SQLite
npm install
# or
pnpm install
# or
yarn installCreate a .env.local file in the root directory:
GEMINI_API_KEY=your_google_gemini_api_key_hereTo get a Google Gemini API key:
- Go to Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Copy it to your
.env.localfile
Note: The app will work without an API key, but AI insights will show a fallback message. To get personalized insights, you'll need to add your Google Gemini API key.
npm run dev
# or
pnpm dev
# or
yarn devOpen http://localhost:3000 in your browser.
The application uses SQLite for local storage. The database file is automatically created in the data/ directory when you first save an entry.
- journal_entries: Stores journal entries with date, emotion, and reflection text
- ai_insights: Stores AI-generated summaries and themes for each entry
POST /api/entries- Create a new journal entry (generates AI insights automatically)GET /api/entries- Get all journal entries (optional query params:?days=7or?date=2024-01-01)GET /api/entries/[id]- Get a specific journal entry by ID
- Next.js 16 - React framework
- TypeScript - Type safety
- SQLite (better-sqlite3) - Local database
- Google Gemini API - AI insights generation
- Tailwind CSS - Styling
- Radix UI - Component library
- date-fns - Date utilities
├── app/
│ ├── api/
│ │ └── entries/ # API routes for journal entries
│ ├── page.tsx # Main landing page
│ ├── layout.tsx # Root layout
│ └── globals.css # Global styles
├── components/
│ └── ui/ # UI components
├── lib/
│ ├── db.ts # Database setup and queries
│ ├── ai.ts # Google Gemini integration
│ └── utils.ts # Utility functions
└── data/ # SQLite database (auto-created)
npm run build
npm start- The database is stored locally in the
data/directory - All journal entries are private and stored on your machine
- AI insights require a Google Gemini API key (free tier available)
- The app works offline for viewing entries, but AI insights require internet connection
- Live App: https://mood-tracker-six-phi.vercel.app/