Refactoring of FreeMED in Golang / Gin + SvelteKit.
| Component | Technology |
|---|---|
| Language | Go 1.26 |
| Web framework | Gin |
| Auth | gin-jwt v2 (bcrypt, JWT with jti blacklist via Redis) |
| Database | MySQL via go-sql-driver/mysql |
| Query layer | sqlc (type-safe SQL generation, ~100 query files) |
| Migrations | golang-migrate (17 migrations) |
| Sessions | Redis via go-redis |
| Logging | lumberjack (rolling logger) |
| Graceful shutdown | manners |
| Component | Technology |
|---|---|
| Framework | SvelteKit 5 (runes mode) |
| Styling | Tailwind CSS 4 |
| Calendar | FullCalendar 6 |
| Adapter | @sveltejs/adapter-static (SPA fallback) |
| Build | Vite |
# Backend
make binary && ./freemed
# Frontend dev server
make frontend-deps frontend-dev
# Full stack with Docker
make docker-build docker-up127+ API endpoints across 45 modules. See .hermes/plans/ for feature parity analysis.
config, dashboard, search, users, facilities, providers, acl, tools
patients, patient (info, addresses, tags, history, diagnoses, photo-id, phones, allergies, vitals, medications, immunizations, coverages)
encounters, progress-notes, labs, drug-samples, episodes-of-care, growth-charts, workflow-status, clinical-orders
scheduler (appointments, recurring, next-available, blocks, groups, templates)
procedures, payments (ledger, copays, deductibles), claims, authorizations, aging, remitt, superbills, action-items, superbill-templates
messages (tags, bulk ops), notifications (task inbox, timestamps)
documents (unfiled, unread), scanned-documents
annotations, letters, correspondence, referrals, events, holidays, callin, reporting, rx-refill, sms-providers, provider-specialties, emr/data-store, support (picklists)
- sqlc + database/sql replaces GORM (compile-time SQL validation)
- bcrypt password hashing with automatic MD5 legacy upgrade
- JWT token blacklist (Redis-backed jti) — logout invalidates tokens
- RBAC middleware (
RequireRole) replaces hardcoded ACL checks - SvelteKit 5 SPA replaces GWT + jQuery/Knockout/Bootstrap frontend
- golang-migrate replaces GORM AutoMigrate for versioned schema changes
- Redis sessions replace MySQL-backed sessions
- Environment variable config overrides (
FREEMED_DB_HOST, etc.) for Docker
- MySQL's
ONLY_FULL_GROUP_BYneeds to be disabled for legacy queries billing/module requires externalremitt-serverandratagodependencies- Code compatible with FreeMED 0.9.x database schemas
- Background image: CC BY-SA 2.0
