Gemini Agent 504f07a106 Add multiple entries per day, user management, reminders, and AI reflections
- Multiple entries per day: Home page now starts fresh, Save & New button
- Admin user management: Add/delete users, reset passwords, toggle admin
- Daily reminders: Browser notifications at configurable time
- AI reflections: Generate insights from entries using Claude API
- Remove cloud sync placeholder (already have user accounts)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 12:05:39 +00:00

Quiet Thanks

A calm, private gratitude and mood log. No streaks, no gamification—just a simple way to reflect on what you're grateful for.

Features

  • User accounts: Each user has their own private entries and tags
  • Quick check-in: One prompt, optional mood, optional tags. Entry capture takes 10-20 seconds.
  • Autosave: No save button needed. Your entry saves automatically as you type.
  • Timeline: View all entries in reverse chronological order with filters.
  • Weekly reflection: See your entry count and top tags from the past 7 days.
  • Export: Download all entries as Markdown or JSON.
  • Dark mode: Calm, minimal interface with soft colors.
  • Self-hosted: Your data stays on your server.

Quick Start

docker compose up -d

The app will be available at http://localhost:6124.

  1. Navigate to the app and click "Create one" to register
  2. Enter your email, password, and optional name
  3. Start logging your gratitude!

Manual Setup

  1. Install dependencies:

    npm install
    
  2. Generate and run database migrations:

    npm run db:generate
    npm run db:migrate
    
  3. Start the development server:

    npm run dev
    
  4. Open http://localhost:3000 in your browser.

Development

# Install dependencies
npm install

# Generate database migrations after schema changes
npm run db:generate

# Run migrations
npm run db:migrate

# Start dev server
npm run dev

# Build for production
npm run build

# Start production server
npm start

# View database with Drizzle Studio
npm run db:studio

Database

  • Location: ./data/quietthanks.db (SQLite)
  • Environment variable: DATABASE_PATH to customize location
  • Migrations: Stored in ./drizzle/

The database is created automatically when you run migrations. In Docker, the ./data directory is mounted as a volume to persist data.

Schema

  • users: User accounts with email and password hash
  • sessions: Session tokens for authentication (30-day expiry)
  • entries: Main gratitude entries with date, text, optional mood (1-5), rough day flag, and timestamps
  • tags: Normalized tag names per user
  • entry_tags: Junction table linking entries to tags

Authentication

  • Session-based authentication with HTTP-only cookies
  • Passwords are hashed with bcrypt
  • Sessions expire after 30 days
  • Each user can only see their own entries and tags

Export

Navigate to /export or use the Export tab to download your data:

  • Markdown: Human-readable format, grouped by date, includes mood and tags
  • JSON: Full data export with all fields and timestamps

Exports include all entries for the logged-in user.

Configuration

App Name

Change the app name by editing src/lib/constants.ts:

export const APP_NAME = "My Gratitude Log";

Port

In docker-compose.yml, change the port mapping:

ports:
  - "8080:3000"  # Change 8080 to your desired port

Tech Stack

  • Framework: Next.js 16 with App Router
  • Language: TypeScript
  • Styling: Tailwind CSS 4
  • Database: SQLite with Drizzle ORM
  • Authentication: bcryptjs for password hashing
  • Icons: Lucide React

API Routes

Authentication

  • POST /api/auth/register - Create new account
  • POST /api/auth/login - Sign in
  • POST /api/auth/logout - Sign out
  • GET /api/auth/me - Get current user

Entries

  • GET /api/entries - List entries (with optional filters)
  • POST /api/entries - Create or update entry for a date
  • GET /api/entries/[id] - Get single entry
  • PATCH /api/entries/[id] - Update entry
  • DELETE /api/entries/[id] - Delete entry

Tags

  • GET /api/tags - Get recent/search tags

Export

  • POST /api/export - Export all entries (markdown or json)

Future Extension Points

These features are not implemented but the architecture supports them:

  • Cloud sync: Add a sync service to enable cross-device access
  • LLM summaries: Integrate with an LLM API to generate monthly reflections
  • Notifications: Add push notifications for daily reminders
  • Import: Add an import endpoint to restore from JSON exports
  • OAuth: Add social login providers

License

MIT

Description
No description provided
Readme 398 KiB
Languages
TypeScript 96.3%
JavaScript 1.9%
CSS 1%
Dockerfile 0.8%