Skip to content

DanChigo/cf_ai_dailyjournal

Repository files navigation

Daily Reflection Journal

An AI-powered journaling app built with Cloudflare Workers that helps you reflect deeper on your daily experiences through thoughtful, context-aware questions.

Features

  • ** AI-Powered Reflection** - Get thoughtful follow-up questions from JerAI (powered by Llama 3.3 70B)
  • Voice Input - Speak your thoughts using voice-to-text transcription
  • ** Context-Aware** - AI remembers your previous entries and recurring themes
  • ** Pattern Recognition** - Track your journaling patterns and common themes
  • ** Entry Management** - Edit and delete entries as needed
  • ** Persistent Storage** - All data stored securely in Cloudflare Durable Objects

Backend

Frontend

  • Vanilla JavaScript
  • Web Speech API
  • CSS3
  • HTML5

Architecture

┌─────────────────────────────────────────────────────────────┐
│                      Cloudflare Edge                        │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│  ┌──────────────┐         ┌──────────────┐                 │
│  │   Worker     │────────▶│  Workers AI  │                 │
│  │  (index.ts)  │         │ (Llama 3.3)  │                 │
│  └──────┬───────┘         └──────────────┘                 │
│         │                                                    │
│         ▼                                                    │
│  ┌──────────────────────────────────────┐                  │
│  │      Durable Object Storage          │                  │
│  │      (JournalStorage)                │                  │
│  │  • Journal Entries                   │                  │
│  │  • User Profiles                     │                  │
│  │  • Theme Tracking                    │                  │
│  └──────────────────────────────────────┘                  │
│                                                              │
│  ┌──────────────────────────────────────┐                  │
│  │         Static Assets                │                  │
│  │  • HTML, CSS, JavaScript             │                  │
│  └──────────────────────────────────────┘                  │
│                                                              │
└─────────────────────────────────────────────────────────────┘

📦 Project Structure

cfaidailyjournal/
├── src/
│   ├── index.ts              # Main Worker entry point
│   └── journal-storage.ts    # Durable Object implementation
├── public/
│   ├── index.html           # Main page
│   ├── app.js               # Frontend logic
│   └── styles.css           # Styling
├── wrangler.jsonc           # Cloudflare Workers config
├── package.json             # Dependencies
├── tsconfig.json            # TypeScript config
├── Prompts.md              # AI prompts documentation
└── README.md               # This file

🛠️ Setup & Installation

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Cloudflare account (free tier is fine!)

Installation

  1. Clone the repository

    git clone https://github.com/DanChigo/cf_ai_dailyjournal.git
    cd cf_ai_dailyjournal
  2. Install dependencies

    npm install
  3. Login to Cloudflare

    npx wrangler login
  4. Start development server

    npm run dev

    The app will be available at http://localhost:8787

  5. Deploy to production

    npm run deploy

Future Roadmap

  • Export entries to PDF/Markdown
  • Calendar view of entries
  • Custom AI personalities
  • Streak tracking and reminders
  • Dark mode toggle

Start your reflection journey today!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors