- FTS search results now ORDER BY processed_at DESC (was rank) - Full search page shows processed timestamp with formatDateTime - Quick search dropdown shows formatted date next to category - Fixed formatDate to handle timezone-aware timestamps |
||
|---|---|---|
| static | ||
| templates | ||
| .gitignore | ||
| AGENTS.md | ||
| BOOTSTRAP.md | ||
| HEARTBEAT.md | ||
| IDENTITY.md | ||
| README.md | ||
| SOUL.md | ||
| TOOLS.md | ||
| USER.md | ||
| ai.go | ||
| ai.go.bak-20260228-005328 | ||
| db.go | ||
| docsys.bak-20260225-134659 | ||
| docsys.service | ||
| go.mod | ||
| go.sum | ||
| install.sh | ||
| main.go | ||
| migrate-ids.sh | ||
| progress.go | ||
| smb.go | ||
| test_stats.go | ||
README.md
DocSys 📁
A beautiful, modern document management web UI built in Go.
Features
- 🎨 Modern UI - Clean design with Sora font, Tailwind CSS, smooth animations
- 🌙 Dark Mode - Toggle between light and dark themes
- 🔍 Full-Text Search - Search across all OCR content using SQLite FTS5
- 📱 Mobile Responsive - Works great on all devices
- 📄 PDF Viewer - Inline PDF viewing with PDF.js
- 🏷️ Categories - Organize documents by type (taxes, bills, medical, etc.)
- 📤 Drag & Drop Upload - Easy file upload to inbox
- ✏️ Edit Metadata - Update titles, categories, and notes
- 📊 Export CSV - Export filtered results for analysis
- ⚡ htmx Powered - Fast, lightweight interactivity without heavy JS
Tech Stack
- Backend: Go with Chi router
- Database: SQLite with FTS5 for full-text search
- Frontend: Tailwind CSS, htmx, PDF.js
- Font: Sora (Google Fonts)
Installation
Prerequisites
- Go 1.22+
- Documents directory at
~/documents/with:records/{category}/*.md- Document record filesstore/*.pdf- PDF filesindex/- Database directory
Build
cd /home/johan/dev/docsys
# Build with FTS5 support
CGO_ENABLED=1 go build -tags "fts5" -o docsys .
Run
./docsys
# Server starts at http://localhost:9201
Install as Service
chmod +x install.sh
./install.sh
Configuration
The app uses these default paths:
| Path | Purpose |
|---|---|
~/documents/records/{category}/*.md |
Document record files |
~/documents/store/*.pdf |
PDF storage |
~/documents/index/docsys.db |
SQLite database |
~/documents/inbox/ |
Upload inbox |
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Dashboard |
/browse |
GET | Category browser |
/browse/{category} |
GET | Documents in category |
/document/{id} |
GET | Document detail view |
/search?q= |
GET | Search page |
/pdf/{hash} |
GET | Serve PDF file |
/api/search |
POST | HTMX search |
/api/documents |
GET | List documents (JSON) |
/api/upload |
POST | Upload file to inbox |
/api/document/{id} |
PUT | Update document |
/api/document/{id} |
DELETE | Delete document |
/api/export |
GET | Export to CSV |
/api/reindex |
POST | Rebuild index |
Document Record Format
Documents are stored as Markdown files:
# Document Record
**ID:** abc123def
**Original File:** invoice.pdf
**Processed:** 2026-01-15T10:30:00
**Category:** bills
**Type:** invoice
## Extracted Info
| Field | Value |
|-------|-------|
| Date | January 15, 2026 |
| Vendor | Example Corp |
| Amount | $99.99 |
## Summary
Brief summary of the document...
## Full Text
OCR text content here...
## Files
- **PDF:** [store/abc123def.pdf](../../store/abc123def.pdf)
License
MIT
