Skip to content

adamchok/DiaConnect

Repository files navigation

DiaConnect

DiaConnect is a full-stack, collaborative healthcare platform focused on diabetes care coordination. It connects patients, doctors, and nutritionists in one ecosystem for consultations, treatment planning, progress tracking, and continuous education.

This repository showcases a production-style architecture with:

  • A modern role-based frontend
  • A Spring Boot core backend
  • Domain microservices for knowledge and content
  • A serverless notification pipeline (SQS + Lambda)
  • Cloud-ready observability and deployment patterns

Why This Project Matters

Diabetes management is not a single appointment problem; it is an ongoing coordination problem. DiaConnect is designed to close that gap by:

  • Enabling communication between care team members and patients
  • Supporting medication, goals, and activity tracking
  • Integrating education, diet planning, and prescriptions into one workflow
  • Delivering timely reminders through push/email notifications

This project demonstrates system design, backend engineering, frontend UX implementation, and cloud-native integration in a real collaboration setting.


Key Features

Multi-Role Experience

  • Patients: registration, profile, appointments, medication/activity tracking, reports, chat, video calls
  • Doctors: patient management, appointments, prescriptions, checklist/research workflows, messaging, video consults
  • Nutritionists: profile and scheduling, diet plans, recipes, supplements, patient communication

Core Healthcare Workflows

  • Appointment booking and time-slot management
  • Prescription and diet plan handling
  • Physical activity + health goal tracking
  • Report and document management
  • Real-time communication (chat + video)

Education and Content Domains

  • Knowledge hub / education resources
  • Nutrition recipes
  • Supplement information
  • Research notes
  • Clinical checklists

Notification Engine

  • Push subscription support
  • Event-driven notification routing via SQS
  • Lambda-based processing for push and email channels
  • Dead-letter queue strategy and observability hooks

Architecture Overview

DiaConnect uses a modular architecture with a central backend and supporting microservices:

  • Frontend: diaconnect-frontend (Next.js + TypeScript)
  • Core API: diaconnect-backend (Spring Boot, Gradle)
  • Domain Microservices (Spring Boot, Maven):
    • education
    • recipe
    • supplement
    • research
    • checklist
  • Serverless Notifications:
    • notification (Java Lambda, SQS-triggered via AWS SAM template)

Supporting infrastructure patterns:

  • PostgreSQL for relational data
  • DynamoDB for selected domain content tables
  • AWS S3/CloudFront integration points
  • Stream Chat/Video integration
  • AWS X-Ray + Spring Actuator for tracing and health visibility

Tech Stack

Frontend

  • Next.js 14 (App Router)
  • React 18 + TypeScript
  • Tailwind CSS + Ant Design
  • Redux Toolkit
  • Stream Chat and Stream Video SDKs

Backend

  • Java 21
  • Spring Boot 3.x
  • Spring Security, JPA, Validation, Actuator
  • JWT authentication
  • MapStruct + Lombok
  • PostgreSQL

Cloud and Integrations

  • AWS S3, DynamoDB, SNS, SQS
  • AWS Lambda (notification service)
  • AWS X-Ray tracing
  • Mailgun (email channel)
  • Web Push (VAPID)

Repository Structure

DiaConnect/
|-- diaconnect-frontend/      # Next.js role-based web app
|-- diaconnect-backend/       # Core Spring Boot API gateway/business logic
|-- education/                # Education/knowledge hub microservice
|-- recipe/                   # Recipe microservice
|-- supplement/               # Supplement microservice
|-- research/                 # Research notes microservice
|-- checklist/                # Clinical checklist microservice
|-- notification/             # SQS-driven serverless notification function
`-- LICENSE

Service Ports (Local Docker Defaults)

  • Frontend: 3000 (Next.js dev server)
  • Core backend: 8080
  • Education: 8081
  • Recipe: 8082
  • Supplement: 8083
  • Research: 8084
  • Checklist: 8085
  • Notification service (app property): 9090 (Lambda/event-driven design)
  • X-Ray daemon ports: 2000 to 2005 mapped by service

Local Development Setup

1) Prerequisites

  • Node.js 18+
  • Java 21
  • Docker + Docker Compose
  • Maven (for Maven modules) and Gradle (for core backend)
  • AWS credentials/config values for integrated cloud features

2) Clone

git clone <your-repository-url>
cd DiaConnect

3) Frontend

cd diaconnect-frontend
npm install
npm run dev

Frontend will run on http://localhost:3000.

4) Core Backend

cd diaconnect-backend
docker compose up --build

5) Domain Microservices

Each domain service has its own docker-compose.yml:

cd education && docker compose up --build
cd recipe && docker compose up --build
cd supplement && docker compose up --build
cd research && docker compose up --build
cd checklist && docker compose up --build

6) Notification Service (Serverless)

The notification module includes an AWS SAM template (template.yml) with:

  • FIFO SQS queue
  • Dead-letter queue
  • Java 21 Lambda function trigger

Use your standard SAM workflow to package/deploy in AWS environments.


Environment Configuration

This project expects environment variables for:

  • Database (DB_URL, DB_USERNAME, DB_PASSWORD)
  • Security (JWT_SECRET_KEY)
  • AWS (AWS_ACCESS_KEY, AWS_SECRET_KEY, AWS_REGION, service-specific resource names)
  • Stream (STREAM_API_KEY, STREAM_API_SECRET)
  • Notifications (AWS_SNS_NOTIFICATION_TOPIC_ARN, Mailgun keys, VAPID keys)
  • Frontend integration (FRONTEND_URL, NEXT_PUBLIC_API_BASE_URL, NEXT_PUBLIC_VAPID_PUBLIC_KEY)

Recommended approach:

  • Keep secrets in untracked local .env files and CI/CD secret stores.
  • Do not commit real credentials.

API and Domain Coverage Snapshot

The core backend includes controllers/modules for:

  • Authentication and account flows
  • Admin, patient, doctor, nutritionist domains
  • Appointments and time slots
  • Prescriptions and diet plans
  • Medication and physical activity tracking
  • Health goals and reports
  • Document upload and push subscriptions
  • Chat and video call integration

Domain microservices extend specialized content capabilities:

  • Education resources and analytics
  • Nutrition recipes and supplements
  • Research notes
  • Clinical checklists

Observability and Reliability

DiaConnect includes several production-oriented practices:

  • Health checks through Spring Actuator
  • Tracing integration via AWS X-Ray
  • Retry-capable/event-driven notification design
  • DLQ for failed notification message handling
  • Dockerized services for reproducible environments

License

This project is licensed under the terms in the LICENSE file.

About

DiaConnect is a full-stack, cloud-ready diabetes care platform that connects patients, doctors, and nutritionists through role-based workflows for appointments, tracking, education, chat/video consultations, and event-driven notifications.

Topics

Resources

License

Stars

Watchers

Forks

Contributors