feat: v0.1.0 - geolocation capture, calendar, search, Starlight docs site

- Automatic browser geolocation capture on event creation
- Reverse geocoding via Nominatim API for place names
- Full-text search with SQLite FTS5
- Calendar view for browsing past entries
- DateNavigator component for day navigation
- SearchModal with Ctrl+K shortcut
- QuickAddWidget with Ctrl+J shortcut
- Starlight documentation site with GitHub Pages deployment
- Multiple AI provider support (Groq, OpenAI, Anthropic, Ollama, LM Studio)
- Multi-user registration support

BREAKING: Events now include latitude/longitude/placeName fields
This commit is contained in:
lotherk
2026-03-27 02:27:55 +00:00
parent deaf496a7d
commit 0bdd71a4ed
67 changed files with 15201 additions and 355 deletions

176
README.md
View File

@@ -1,133 +1,127 @@
# DearDiary
> Your day, analyzed. A journal that writes itself.
Self-hosted AI-powered daily journaling application. Capture events throughout the day and let AI generate thoughtful diary pages from your entries.
AI-powered daily journal that captures life through multiple input methods and generates thoughtful, reflective journal entries.
See [CHANGELOG.md](./CHANGELOG.md) for detailed version history.
[![Deploy to Docker](https://img.shields.io/badge/Deploy-Docker-blue)](https://github.com/anomalyco/totalrecall)
[![Documentation](https://img.shields.io/badge/Documentation-Live-brightgreen)](https://anomalyco.github.io/totalrecall)
## Features
- **Multiple Input Types**: Text notes, photos, voice memos, health data
- **AI Journal Generation**: OpenAI, Anthropic, Ollama, or LM Studio
- **Self-Hostable**: Run it yourself or use any hosted version
- **Same Codebase**: Single deployment works for single-user or multi-tenant
- **Task History**: Full logging of AI requests and responses
- Quick event capture with keyboard shortcut (Ctrl+J)
- Multiple event types: text, health, photo, voice
- **Automatic geolocation** - events tagged with your location
- AI-powered diary page generation with customizable providers
- Events become immutable once a diary is generated (prevents editing past memories)
- Regenerate diary pages with additional instructions
- Generation tasks with title tracking per task
- Read all diaries with pagination (10/50/100 per page)
- Dashboard with diary excerpts
- Calendar view for browsing past entries
- Full-text search across events and diaries
- Export/Import data with version checking
- Dark/light theme support
- Self-hostable with Docker
## Quick Start
### Docker (Recommended)
```bash
git clone https://github.com/your-repo/deardiary.git
cd deardiary
# Clone the repository
git clone https://github.com/anomalyco/totalrecall.git
cd totalrecall
# Create .env file
cp backend/.env.example .env
# Edit .env and set JWT_SECRET
# Start
# Start with Docker
docker compose up -d
```
Visit http://localhost:5173
Access the app at `http://localhost:8080`
### Manual Development
Default credentials: `admin@localhost` / `changeme123`
## Documentation
Full documentation is available at [https://anomalyco.github.io/totalrecall](https://anomalyco.github.io/totalrecall)
Topics covered:
- [Installation](https://anomalyco.github.io/totalrecall/getting-started/installation/)
- [Quick Start](https://anomalyco.github.io/totalrecall/getting-started/quick-start/)
- [Configuration](https://anomalyco.github.io/totalrecall/getting-started/configuration/)
- [Features](https://anomalyco.github.io/totalrecall/features/events/)
- [API Reference](https://anomalyco.github.io/totalrecall/api/authentication/)
- [Deployment](https://anomalyco.github.io/totalrecall/deployment/docker/)
## Configuration
1. Go to Settings and select your AI provider (Groq, OpenAI, Anthropic, Ollama, LM Studio)
2. Enter your API key for the selected provider
3. Optionally customize the model and base URL
4. Test the connection before saving
## Development
### Prerequisites
- Bun
- Node.js 20+
- Docker
### Backend
```bash
# Backend
cd backend
bun install
bunx prisma generate
bunx prisma db push
bun run dev
```
# Frontend (separate terminal)
### Frontend
```bash
cd frontend
npm install
npm run dev
```
## Configuration
### Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| `DATABASE_URL` | `file:./data/deardiary.db` | SQLite, PostgreSQL, or MySQL |
| `JWT_SECRET` | (required) | Secret for JWT signing |
| `MEDIA_DIR` | `./data/media` | Directory for uploads |
| `PORT` | `3000` | Server port |
| `CORS_ORIGIN` | `*` | Allowed origins |
### Database Examples
### Build Docs Locally
```bash
# SQLite (default)
DATABASE_URL="file:./data/deardiary.db"
# PostgreSQL
DATABASE_URL="postgresql://user:pass@host:5432/deardiary"
# MySQL
DATABASE_URL="mysql://user:pass@host:3306/deardiary"
cd docs
npm install
npm run dev
```
## AI Providers
### Docker Build
Configure in Settings after logging in:
| Provider | Setup |
|----------|-------|
| **OpenAI** | API key required |
| **Anthropic** | API key required |
| **Ollama** | Local URL (default: http://localhost:11434) |
| **LM Studio** | Local URL (default: http://localhost:1234/v1) |
```bash
docker compose build && docker compose up -d
```
## Project Structure
```
deardiary/
├── backend/ # Bun + Hono API server
── src/
│ │ ├── routes/ # API endpoints
│ ├── services/ # AI providers
── middleware/
└── prisma/ # Database schema
├── frontend/ # React + Vite web app
├── android/ # Native Android app (Kotlin + Compose)
── docker-compose.yml
└── PLAN.md # Full specification
├── backend/ # Hono + Prisma backend
│ ├── prisma/ # Database schema
── src/ # API routes and AI services
├── frontend/ # React + Vite frontend
└── src/
── pages/ # Page components
├── components/
│ └── lib/ # API client, geolocation
├── docs/ # Starlight documentation site
── docker-compose.yml
```
## API
## Routes
All endpoints require `Authorization: Bearer {api_key}` header.
```
POST /api/v1/auth/register
POST /api/v1/auth/login
POST /api/v1/auth/api-key
GET /api/v1/days
GET /api/v1/days/:date
DELETE /api/v1/days/:date
POST /api/v1/entries
GET /api/v1/entries/:id
PUT /api/v1/entries/:id
DELETE /api/v1/entries/:id
POST /api/v1/entries/:id/photo
POST /api/v1/entries/:id/voice
POST /api/v1/journal/generate/:date
GET /api/v1/journal/:date
GET /api/v1/journal/:date/tasks
GET /api/v1/settings
PUT /api/v1/settings
```
- `/` - Dashboard with recent diary pages and excerpts
- `/today` - Today's event stream (main capture page)
- `/diary` - Paginated diary reader (10/50/100 per page)
- `/journal/:date` - View/edit diary page with generation tasks
- `/day/:date` - View day's events
- `/calendar` - Calendar view
- `/settings` - Configuration and Export/Import
## License
MIT
MIT License
Copyright 2026 Konrad Lother