A personal health diary application for tracking illnesses, prescriptions, and doctor appointments. Built with modern technologies for performance and reliability.
- Illness Tracking - Record and monitor illnesses with start/end dates, notes, and status (active/resolved/chronic)
- Prescription Management - Track medications, dosages, frequencies, and link them to illnesses and doctors
- Doctor Directory - Maintain a contacts list of doctors with specialty, phone, email, and notes
- Doctor Appointments - Schedule and manage medical appointments with list view
- Calendar View - Monthly calendar showing prescriptions and appointments
- Dashboard - Statistics and charts showing health overview
- Analytics - DuckDB-powered analytics for health trends and statistics
- RESTful API built with Bun.js and Hono
- SQLite for persistent data storage (via bun:sqlite)
- DuckDB for time-series analytics
- Angular 19+ standalone components with new control flow (@if, @for)
- Lazy loading for routes
- GitHub Pages documentation
| Component | Technology |
|---|---|
| Runtime | Bun.js 1.1+ |
| Framework | Hono 4.0+ |
| SQLite | bun:sqlite |
| Analytics DB | DuckDB |
| Language | TypeScript 5.6+ |
| Frontend | Angular 19+ |
- Bun.js 1.1+
- Git
# Clone the repository
git clone https://github.com/Xflofoxx/healthdiary.git
cd healthdiary
# Install dependencies for server and client
cd server && bun install && cd ..
cd client && bun install && cd ..# On Windows
bin\start.bat
# On Linux/Mac
bun bin/start# Terminal 1: Start the server
cd server
bun run migrate # Only first time
bun run dev
# Terminal 2: Start the client
cd client
bun startThe server will be available at http://localhost:3000 and the client at http://localhost:4200.
http://localhost:3000/api/v1
| Method | Endpoint | Description |
|---|---|---|
| GET | /illnesses | List all illnesses |
| GET | /illnesses/:id | Get illness by ID |
| POST | /illnesses | Create new illness |
| PUT | /illnesses/:id | Update illness |
| DELETE | /illnesses/:id | Delete illness |
Query Parameters:
search- Search by namestatus- Filter by status (active/resolved/chronic)
| Method | Endpoint | Description |
|---|---|---|
| GET | /prescriptions | List all prescriptions |
| GET | /prescriptions/:id | Get prescription by ID |
| POST | /prescriptions | Create new prescription |
| PUT | /prescriptions/:id | Update prescription |
| DELETE | /prescriptions/:id | Delete prescription |
Query Parameters:
search- Search by medication nameillnessId- Filter by illnessactive- Filter active prescriptions
| Method | Endpoint | Description |
|---|---|---|
| GET | /appointments | List all appointments |
| GET | /appointments/:id | Get appointment by ID |
| POST | /appointments | Create new appointment |
| PUT | /appointments/:id | Update appointment |
| DELETE | /appointments/:id | Delete appointment |
Query Parameters:
illnessId- Filter by illnessdateFrom- Filter from datedateTo- Filter to datespecialty- Filter by specialty
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Health check with service status |
healthdiary/
├── bin/ # Startup scripts
│ ├── start # Bun script (Unix)
│ └── start.bat # Windows batch script
├── docs/ # GitHub Pages documentation
├── spec/ # Project specifications
│ ├── server/ # Server requirements (SERV-001 to SERV-006)
│ ├── client/ # Client requirements (CLIENT-001 to CLIENT-005)
│ ├── CONTEXT.md # Development constitution
│ ├── ROADMAP.md # Version roadmap
│ ├── WORKFLOW.md # Git workflow
│ ├── CODING_STYLE.md # Coding standards
│ ├── TESTS.md # Test strategy
│ └── SERVER.md # Server architecture
├── server/ # Bun.js server
│ ├── src/
│ │ ├── index.ts # Entry point
│ │ ├── routes/ # API routes
│ │ │ ├── illnesses.ts
│ │ │ ├── prescriptions.ts
│ │ │ ├── appointments.ts
│ │ │ └── health.ts
│ │ ├── models/ # Data models
│ │ ├── db/ # Database connections
│ │ │ ├── sqlite.ts
│ │ │ ├── duckdb.ts
│ │ │ └── migrate.ts
│ │ ├── middleware/ # Express-like middleware
│ │ └── utils/ # Utilities
│ └── package.json
└── client/ # Angular client
├── src/
│ ├── app/
│ │ ├── components/ # UI components
│ │ │ ├── illness-list/
│ │ │ ├── illness-form/
│ │ │ ├── prescription-list/
│ │ │ ├── prescription-form/
│ │ │ ├── appointment-list/
│ │ │ └── appointment-form/
│ │ ├── services/ # API services
│ │ └── models/ # TypeScript interfaces
│ └── styles.css
└── package.json
# Server tests
cd server && bun test
# With coverage
cd server && bun test --coveragecd server && bun run migrate# Lint (server)
cd server && bun run lint
# Format (server)
cd server && bun run format- Create a feature branch:
git checkout -b feat/xxx-description - Follow the Workflow Specification
- Write tests for new features
- Ensure all tests pass
- Submit a pull request
ISC License - see LICENSE file for details
Dario Olivini xflofoxx@gmail.com
Built with ❤️ using Bun.js, SQLite, DuckDB, and Angular