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,openssltokenizer,xml,ctype,jsonbcmath
Windows or Linux/macOS?
The download includes two setup scripts that do the same thing — pick the one for your machine:
| Platform | Run |
|---|---|
| Windows (Laragon / XAMPP) | setup.bat — double-click it, or run from Laragon's terminal |
| Linux / macOS | chmod +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.
| Role | |
|---|---|
| Super Admin | superadmin@hms.test |
| Hospital Admin | admin@hms.test |
| Doctor (×8) | doctor1@hms.test … doctor8@hms.test |
| Nurse | nurse@hms.test |
| Receptionist | reception@hms.test |
| Cashier | cashier@hms.test |
| Pharmacist | pharmacist@hms.test |
| Lab Technician | labtech@hms.test |
| Radiologist | radiologist@hms.test |
| Accountant | accountant@hms.test |
| HR Manager | hrmanager@hms.test |
| Insurance Officer | insurance@hms.test |
| Patient | patient@hms.test |
Environment Variables
Everything lives in .env, created from .env.example by the setup script. The ones you'll actually touch:
| Key | Purpose |
|---|---|
DB_HOST / DB_PORT / DB_DATABASE / DB_USERNAME / DB_PASSWORD | Your MySQL connection |
DB_PREFIX | Optional table prefix — see below |
APP_URL | Your local or production URL — affects generated links and file URLs |
OPENAI_API_KEY | Only 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_
Turning on AI Features
- Log in as Super Admin or Hospital Admin
- Go to Settings in the sidebar
- Toggle "Enable AI Symptom Checker & Visit Summaries" on
- 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