🌐 English · Português (BR)
A management system for long-term care homes for the elderly (LTCFs).
Runs on the home's own computer, works offline, has no subscription fee and depends on no external service.
Note: the application interface and its documentation for end users are in Brazilian Portuguese (it was built for a care home in Brazil). This README is available in English and Portuguese.
Morada started from a real request: a charitable care home for the elderly in Brazil kept all its records by hand, with no logs. Commercial systems in this field are paid, cloud-based and need a stable internet connection, which is not always available to charitable institutions.
The idea here is the opposite: a complete system that is simple to install and maintain, fits on an ordinary computer, keeps everything in a single database file, and can be copied, audited and adapted by any similar institution.
An independent project, not affiliated with any commercial product. Built by a software engineering student, based on the day-to-day needs of the home.
- Zero npm dependencies. Plain Node.js server, built-in SQLite (
node:sqlite) and a framework-free HTML, CSS and JavaScript interface. Nonpm install, nonode_modules, no build step. - Works offline. Fonts, icons and charts are all local. The internet is used only once, to download portable Node.js.
- Two-click setup on Windows:
Iniciar Sistema.batdownloads portable Node.js by itself, with no administrator rights needed. - Phone access on the internal network, with a QR code.
- Designed for health data (Brazil's LGPD, similar to GDPR): per-person login, screen lock, an audit trail of who opened and changed each record, and encrypted backups. The database never goes into the repository.
- Formal A4 printing with letterhead, numbered footer and signature lines, ready for inspections and shift handover.
| Group | What it does |
|---|---|
| Residents | Full profile with photo, health, allergies, dependency level (Anvisa RDC 502/2021), family, guardian and emergency contact. Status: at the home, hospitalized, left or deceased, with date and reason. |
| Daily log | Shift-by-shift logbook with severity (normal, attention, serious). Pending entries stay highlighted until resolved. Printable shift handover sheet. |
| Medication | Prescriptions with fixed times or "as needed", a daily administration sheet with one-tap confirmation, allergy alerts, and blocks on double doses and on early marking. |
| Vital signs | Daily round for all residents, out-of-range values highlighted, one chart per measurement (7, 30 or 90 days). |
| Assessments | Katz (independence), Braden (pressure injury risk) and Morse (fall risk) scales, with automatic scoring and classification. |
| Care plan (PIA) | Individual Care Plan across 7 areas, with the current situation suggested from the system's data, versions and review deadlines. |
| Medical record | A single printable view combining identification, allergies, medication, assessments, vitals, vaccines and the log for the chosen period. |
| Vaccines | Per-resident panel, printable vaccination card and campaigns (e.g. flu) applied to many residents at once. |
| Schedule and tasks | Appointments, exams and activities, with recurrence, owner and companion. Tasks with deadlines and urgency. |
| Stock and assets | Stock in, out and counts, with warnings for items running low or expired. Medication administration deducts from stock and estimates "N days left". Asset inventory with maintenance history. |
| Staff | Professional records (medical council numbers, etc.) and monthly shift roster (12x36, 6x1, 5x2), with alerts for uncovered shifts. |
| Finance | Accounts payable and receivable, monthly fees, results by category and a two-copy receipt with the amount in words. Restricted to administrators. |
| Settings | Institution name, logo and CNPJ for printed documents, users and roles, automatic encrypted backups (AES-256-GCM), access QR code, one-button updates and the audit trail. |
The clinical rules (normal ranges for vital signs, vaccine intervals, assessment questions, care plan template) are provisional and must be validated by each institution's technical lead before use. This software is not a medical device and does not replace professional verification.
- Windows 10 or 11 (the automatic installer is Windows-only).
- A current web browser. Other computers and phones only need a browser.
- Internet only on the first run, to download portable Node.js.
git clone https://github.com/kevinhsdev/morada.git
cd morada- Double-click
Iniciar Sistema.bat. A black window opens (this is the server running, do not close it while using the system) and the browser opens athttp://localhost:3001. - Sign in with the initial user listed in
LEIA-ME.txt(in Portuguese). Changing the password is mandatory on first login. - Under Configurações › Usuários (Settings › Users), create an account for each person.
- To explore without real data: Configurações › Geral › Carregar a demonstração (Settings › General › Load the demo), which loads fictional residents, staff and amounts, with no national ID numbers.
The system is plain Node.js and should run anywhere with Node.js 22 or newer (cd app && node --no-warnings server.js), but only the Windows flow has been tested. Contributions adding a Linux and macOS launcher are welcome.
Configurações › Celular e rede › Liberar para o celular (Settings › Phone and network). The system restarts and shows a QR code. Use it on the internal network only, never on a guest Wi-Fi. By default, only the computer running the server can access the system.
| Variable | Default | Effect |
|---|---|---|
APP_PORTA |
3001 |
Server port |
APP_REDE |
(empty) | When 1, allows network access without going through the settings screen |
- Passwords are stored with
scryptand a per-user salt. Sessions store only the token hash. - Brute-force protection: 5 wrong passwords trigger a 1-minute wait.
- Screen lock after inactivity, enforced on the server too (reloading the page does not bypass it).
- Audit trail: who did what and who opened each record, filterable by person, action and resident.
- Concurrent editing: a warning when two people change the same record.
- Automatic backup every 6 hours, optionally encrypted with AES-256-GCM, with restore from the interface. Test your restores: a backup that has never been restored is not a backup.
- The database and backups never enter the repository.
.gitignoreblocksdados/,*.db, backups, spreadsheets, photos and PDFs. - When reporting problems or opening issues, never publish real resident data.
morada/
├── Iniciar Sistema.bat # starts the server (downloads portable Node.js on first run)
├── LEIA-ME.txt # quick guide for end users (Portuguese)
├── app/
│ ├── server.js # HTTP server, sessions, authentication and routing
│ ├── lib/ # database (SQLite), encrypted backup, updates, demo data
│ ├── rotas/ # one API route per module (residents, medication, finance…)
│ └── public/ # interface: plain HTML, CSS and JS, one file per module
├── ferramentas/ # automated test, print-to-PDF check, icons, Node installer
├── HANDOFF.md # context, decisions and how to create modules (Portuguese)
└── LICENSE
Design decisions
- Local web app, not cloud. One computer is the server and the others use a browser. Data never leaves the institution.
- No dependencies. Smaller attack surface and nothing to break over time. The system keeps working years from now on an offline computer.
- New module = one route + one screen.
HANDOFF.mddescribes the architecture, the visual style and the steps to create modules.
The automated test starts a temporary server (with a throwaway database, never touching real data), checks the server rules through the API, loads the demo data and opens every screen in a headless Edge (desktop, mobile and dark mode), reporting any JavaScript error:
node ferramentas/testar-telas.mjsTo check the look of the printed documents (generates one A4 PDF per document in ferramentas/prints/pdf):
node ferramentas/imprimir-telas.mjs- Screenshots and a demo video in this README
- Linux and macOS launcher
- Validation of clinical rules with nursing professionals
- Data export in open formats (CSV)
- Translated interface and end-user docs
Ideas and suggestions are welcome in the issues.
Contributions are welcome: fixes, accessibility improvements, translations, new modules and validation of the care rules.
- Fork the repository and create a branch (
git checkout -b my-improvement). - Run
node ferramentas/testar-telas.mjsbefore submitting. It must finish without errors. - Use only fictional data in commits, issues and screenshots.
- Open a Pull Request describing what changed, what it is for and how to test it.
Released under the MIT license. See LICENSE.
Each institution sets its own name, logo and CNPJ under Configurações › Geral (Settings › General). They are stored in the local database, never in the code.
Kevin Henrique Silva, software engineering student (UMC).