Case Study · Full-Stack · Mobile
MEDICHELPER
PLATFORM
ASP.NET Core 8 backend with JWT auth, SignalR real-time notifications, and Hangfire scheduled jobs. Paired with a native Android Java frontend. 32 REST endpoints. Built from scratch.
Architecture
SYSTEM LAYERS
ASP.NET Core 8
RESTful API with 32 endpoints covering user management, medication tracking, appointment scheduling, and notifications. Repository pattern throughout — no raw SQL in controllers. Swagger/OpenAPI documentation generated automatically.
JWT + ASP.NET Identity
ASP.NET Identity manages user records and password hashing. On login, a signed JWT is issued with role claims (Patient, Doctor, Admin). Refresh token rotation implemented — tokens expire every 15 minutes, refresh tokens after 7 days.
SignalR WebSocket
SignalR hub pushes medication reminders, appointment confirmations, and doctor messages in real-time. Android client connects on login and maintains a persistent WebSocket connection. Falls back to long polling on poor connections.
Hangfire Scheduler
Hangfire runs recurring jobs: daily medication reminder dispatch, weekly appointment digest, and cleanup of expired refresh tokens. Jobs are persisted in PostgreSQL — survive server restarts. Dashboard accessible at /hangfire in dev.
PostgreSQL via Npgsql
Normalised schema with Users, Medications, Schedules, Appointments, and Notifications tables. EF Core migrations manage schema evolution. Connection pooling via Npgsql — handles concurrent requests without connection exhaustion.
Android Java Frontend
Native Android app in Java. Retrofit handles HTTP to the ASP.NET Core API. Volley manages the SignalR WebSocket connection. Local Room database caches medication schedules for offline access.
Engineering Decisions
WHY THIS, NOT THAT
ASP.NET Core over Node
Medical data. Strong typing, mature middleware ecosystem, and built-in DI container. ASP.NET Identity is a solved problem for user management — no need to roll auth from scratch.
SignalR over polling
Medication reminders need to arrive in real-time. Polling every 30s kills battery on mobile. SignalR maintains a single persistent connection and pushes on server-side events only.
Hangfire over cron
Hangfire persists jobs to PostgreSQL. If the server restarts mid-schedule, jobs are not lost — they resume from where they left off. Cron-based approaches are stateless and can't recover from failures.
Repository pattern
Controllers should not contain query logic. The repository pattern keeps business logic testable and data access swappable. When the client later asked about switching to a different ORM, it was a 1-file change per entity.
Next case study
Job Aggregation System →