Skip to content

tbenbow/FrogLog

Repository files navigation

Frog Log

A personal life-tracking application with a terminal-style interface. Log meals, time blocks, and custom events using natural language or structured commands.

Features

  • Terminal UI — Retro command-line aesthetic in the browser
  • Natural Language — "ate a burrito at chipotle" automatically estimates calories
  • Custom Categories — Define your own event types with custom fields
  • AI Insights — Ask questions across your data: "how does diet affect productivity?"
  • Data Portability — Export to JSON/CSV, import via drag & drop

Quick Start

Prerequisites

  • Node.js 18+
  • Turso account (free tier works)
  • OpenAI API key

Setup

  1. Clone and install dependencies

    git clone <repo-url>
    cd froglog
    npm install
  2. Configure environment variables

    cp .env.example .env.local

    Edit .env.local with your credentials:

    TURSO_DATABASE_URL=libsql://your-db.turso.io
    TURSO_AUTH_TOKEN=your-token
    OPENAI_API_KEY=sk-...
    SESSION_SECRET=random-32-char-string
    
  3. Initialize the database

    npm run db:push
    npm run db:seed
  4. Create your first user

    npm run user:create
  5. Start the development server

    npm run dev
  6. Open http://localhost:3000 and log in!

Usage

Commands

The full command reference (including auth flows, interactive edit/delete selection UI, categories/aliases/fields, and import/export) lives in:

  • docs/COMMANDS.md

Natural Language

You can also just type naturally. The AI will figure out what you mean and estimate details like calories and macros.

# Logging
ate a burrito at chipotle for lunch
worked 2 hours on the marketing site

# Correcting
actually that was 800 calories
the burrito was 1200 cal

# Insights
how does my diet affect my productivity?
what patterns do you see this month?

Architecture

  • Frontend: Next.js 16 with React, Tailwind CSS
  • Backend: Next.js API routes
  • Database: Turso (libSQL/SQLite) with Drizzle ORM
  • AI: OpenAI GPT-4o-mini for natural language parsing

Project Structure

src/
├── app/
│   ├── api/command/     # Command processing endpoint
│   ├── console/         # Terminal UI component
│   └── page.tsx         # Main page
├── core/
│   ├── ai.ts            # OpenAI integration
│   ├── commandHandler.ts # Command execution
│   ├── commandParser.ts  # Input parsing
│   ├── commandTypes.ts   # TypeScript types
│   └── repo.ts          # Database operations
├── db/
│   └── schema.ts        # Drizzle schema
└── lib/
    └── session.ts       # Auth utilities

Development

# Run development server
npm run dev

# Type checking
npx tsc --noEmit

# Linting
npm run lint

# Database management
npm run db:generate    # Generate migrations
npm run db:push        # Push schema changes
npm run db:studio      # Open Drizzle Studio

Scripts

Script Description
npm run dev Start development server
npm run build Build for production
npm run start Start production server
npm run db:push Push schema to database
npm run db:seed Seed default categories
npm run user:create Create a new user (CLI)

Default Categories

The app comes with two pre-configured categories:

Meals - Track food intake

  • meal_type, description, calories, protein_g, carbs_g, fat_g, note

Time Blocks - Track work/productivity

  • project, task, duration, focus_mode, note

License

MIT

About

A text based logging app app that logs activity to a db and does analysis with AI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages