Requirements

Server

  • PHP 8.2 or higher
  • Composer 2.x
  • MySQL 8 or MariaDB 10.4+
  • Laragon, XAMPP, or plain php artisan serve

PHP extensions

  • pdo_mysql, mbstring, openssl
  • tokenizer, xml, ctype, json
  • bcmath
Nothing else to install. No Node.js, no npm, no global packages. Bootstrap and icons load from a CDN in the browser.

Windows or Linux/macOS?

The download includes two setup scripts that do the same thing — pick the one for your machine:

PlatformRun
Windows (Laragon / XAMPP)setup.bat — double-click it, or run from Laragon's terminal
Linux / macOSchmod +x setup.sh && ./setup.sh

Unzip the project and open a terminal in it

Extract the zip anywhere on disk — C:\laragon\www\carechart on Windows, or wherever your local sites live on Linux/macOS. Open a terminal in that folder before continuing.

Create an empty database

Using phpMyAdmin, HeidiSQL, or the command line, create a new empty MySQL database — the name doesn't matter, you'll enter it in the next step. Nothing needs to be inside it yet.

CREATE DATABASE carechart;

Run the setup script and answer its prompts

The script installs Composer dependencies, copies .env.example to .env, generates an app key, asks for your database details, migrates and seeds demo data, links storage, and creates the upload folders.

# Linux / macOS
chmod +x setup.sh
./setup.sh

# Windows — run from Laragon's terminal or any shell with PHP + Composer in PATH
setup.bat

When it asks for database host / name / username / password / table prefix, enter what you set up in Step 2. Leave the table prefix blank unless you specifically need one.

Log in

The script offers to start php artisan serve for you. Visit http://localhost:8000 and log in with any seeded demo account — password password for all of them.

RoleEmail
Super Adminsuperadmin@hms.test
Hospital Adminadmin@hms.test
Doctor (×8)doctor1@hms.test … doctor8@hms.test
Nursenurse@hms.test
Receptionistreception@hms.test
Cashiercashier@hms.test
Pharmacistpharmacist@hms.test
Lab Technicianlabtech@hms.test
Radiologistradiologist@hms.test
Accountantaccountant@hms.test
HR Managerhrmanager@hms.test
Insurance Officerinsurance@hms.test
Patientpatient@hms.test

Environment Variables

Everything lives in .env, created from .env.example by the setup script. The ones you'll actually touch:

KeyPurpose
DB_HOST / DB_PORT / DB_DATABASE / DB_USERNAME / DB_PASSWORDYour MySQL connection
DB_PREFIXOptional table prefix — see below
APP_URLYour local or production URL — affects generated links and file URLs
OPENAI_API_KEYOnly needed if you enable AI features from Settings

Using a Table Prefix

If your hosting environment requires a shared database with prefixed tables, set it before migrating:

DB_PREFIX=carechart_
Every migration in this project has already been audited for MySQL's 64-character identifier limit, including with a prefix applied — you won't hit the "identifier name too long" error some Laravel projects run into on renamed installs.

Turning on AI Features

  1. Log in as Super Admin or Hospital Admin
  2. Go to Settings in the sidebar
  3. Toggle "Enable AI Symptom Checker & Visit Summaries" on
  4. Paste your OpenAI API key and save

Leave it off and the app runs exactly the same — patients are simply told to book an appointment directly instead of using the symptom checker.

File Upload Folders

The setup script creates these automatically, but if you ever need to recreate them by hand:

public/uploads/doctors
public/uploads/patients
public/uploads/branding
public/uploads/radiology
public/uploads/staff

Troubleshooting

"Identifier name … is too long"

This happens when a long table prefix combines with an auto-generated index name past MySQL's 64-character limit. Every index in this project has an explicit short name to prevent it — if you hit this on a custom migration you've added yourself, give that index an explicit name as the second argument.

A role's dashboard looks empty or gives a 403

Make sure you ran a full migrate:fresh --seed rather than a partial migration — the demo accounts and their role assignments depend on every migration completing in order.

Pagination or table styling looks broken

This shouldn't happen out of the box — the app registers Bootstrap 5 pagination views on boot. If you've customized AppServiceProvider, confirm Paginator::useBootstrapFive() is still called in boot().

Composer install fails

Confirm PHP 8.2+ and the required extensions above are enabled in your php.ini. Run php -m to list active extensions.

Starting Over (Fresh Install)

If you need a completely clean slate — new demo data, reset passwords, cleared uploads:

php artisan migrate:fresh --seed
This drops every table and re-seeds from scratch. Only run it against a database you're fine losing data in — never on a live hospital's data.