LumenHealth is a lightweight, AI-assisted electronic medical record (EMR) system built for clinics, mobile health teams, and care providers operating in resource-constrained or low-connectivity environments. It prioritizes speed, clarity, and reliability over bloated hospital software.
At its core, LumenHealth combines AI-powered clinical intelligence with secure, blockchain-based payments to support both care delivery and sustainability.
- AI-assisted clinical workflows: Uses Google Gemini to generate visit summaries, assist documentation, and surface key clinical insights without replacing clinician judgment.
- Offline-friendly by design: Built to function in environments with unstable or intermittent connectivity.
- Lightweight EMR, not a hospital ERP: Focused on essential patient records and encounters, not administrative overload.
- Crypto-native payments: Enables fast, low-cost payments via the Stellar network, supporting clinics without access to traditional banking.
- Open-source & extensible: Designed to be adapted for NGOs, startups, and public health pilots.
LumenHealth is a Monorepo managed by Turborepo and NPM Workspaces. This allows us to share configuration, types, and logic between the frontend, backend, and blockchain services.
| Layer | Technology | Description |
|---|---|---|
| Monorepo Tooling | Turborepo / NPM | Orchestration and workspace management |
| Frontend | Next.js (React) | Clinic dashboard and patient management UI |
| Backend | Node.js + Express | REST API using a Modular Monolith architecture |
| Blockchain | Stellar SDK | Payment processing and access control service |
| Database | MongoDB | Off-chain storage for patient data and logs |
| AI Layer | Google Gemini | Clinical summarization and intelligence |
The project is divided into Apps (deployable services) and Packages (shared libraries).
lumen-health/
├── apps/
│ ├── api/ # Express Backend (The Core Logic)
│ │ ├── src/modules/ # Domain-driven modules (Patients, Encounters, etc.)
│ │ └── src/app.ts # API Entry point
│ ├── web/ # Next.js Frontend Application
│ └── stellar-service/ # Isolated service for Blockchain interactions
├── packages/
│ ├── config/ # Shared Environment variables & Configuration
│ └── types/ # (Future) Shared TypeScript interfaces
├── .env # Root "Source of Truth" for Environment Variables
├── turbo.json # Build pipeline configuration
└── package.json # Root workspace definition
The API follows a Modular Monolith pattern. Code is organized by domain, not just technical layer.
modules/auth: Users, roles, sessions (JWT)modules/patients: Patient demographics & lookupmodules/encounters: The core append-only medical historymodules/payments: Subscription & Stellar payment logicmodules/ai: Gemini prompt management
Base URL: http://localhost:4000/api/v1
POST /patients- Create new recordGET /patients/:id- Retrieve patient details
POST /encounters- Log a new visitGET /encounters/:id- View visit detailsGET /encounters/patient/:patientId- Full history
POST /payments/intent- Generate payment requestPOST /payments/confirm- Verify on-chain transaction
- Node.js (v18 or higher)
- npm (v10+ recommended)
- MongoDB (Local or Atlas URL)
- Google Gemini API Key
- Stellar Testnet Account
- Clone the Monorepo
git clone https://github.com/your-org/lumen-health.git
cd lumen-health
- Install Dependencies (Root) This installs dependencies for all apps and packages at once.
npm install
- Environment Setup
Create a single
.envfile in the root directory. Thepackages/configmodule will distribute these variables to all apps.
cp .env.example .env
Example .env:
API_PORT=4000
MONGO_URI=mongodb://localhost:27017/lumenhealth
STELLAR_NETWORK=testnet
GEMINI_API_KEY=your_key_here
To start Frontend, Backend, and Services simultaneously:
npm run dev
- Frontend: http://localhost:3000
- Backend: http://localhost:4000
If you only want to work on one part of the system:
npm run dev -w apps/api # Run only Backend
npm run dev -w apps/web # Run only Frontend
LumenHealth is open-source. We welcome contributions from engineers, designers, and healthcare technologists.
- Fork the repository.
- Create a branch for your feature (
git checkout -b feature/amazing-feature). - Commit your changes.
- Push to the branch.
- Open a Pull Request.
- Respect the Monorepo: Ensure you are installing dependencies via the root
package.jsonor usingnpm install <pkg> -w apps/<app-name>. - Strict Types: We use TypeScript. Please avoid
anywherever possible. - Patient Privacy: Never include real patient data in tests or screenshots.
For questions, discussions, or contributor support, join the LumenHealth Telegram group:
👉 Telegram: LumenHealth
LumenHealth is released under the MIT License.