Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:
  • PHP 8.2 or higher with extensions: sqlite3, pdo, mbstring, xml, curl, zip, gd
  • Composer (PHP package manager)
  • Node.js 18+ and npm
  • Git
Make sure PHP 8.2+ is installed. Nguhöe EHR uses modern PHP features that require this version.

Installation steps

1

Clone the repository

Clone the Nguhöe EHR repository to your local machine:
git clone https://github.com/your-org/nguho-ehr.git
cd nguho-ehr
2

Run the setup script

Nguhöe EHR includes a convenient setup script that handles everything:
composer setup
This command will:
  • Install PHP dependencies via composer install
  • Copy .env.example to .env
  • Generate application encryption key
  • Run database migrations
  • Install JavaScript dependencies via npm install
  • Build frontend assets
The composer setup script runs these commands in sequence:
"setup": [
    "composer install",
    "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
    "@php artisan key:generate",
    "@php artisan migrate --force",
    "npm install",
    "npm run build"
]
From composer.json:50-57
3

Start the development server

Launch all development services with one command:
composer dev
This starts four concurrent processes:
  • Laravel server on http://localhost:8000
  • Queue worker for background jobs
  • Log viewer (Laravel Pail)
  • Vite dev server for hot module replacement
The dev server uses concurrently to run multiple processes. You’ll see color-coded output from each service.
You should see output like:
[server] Laravel development server started: http://127.0.0.1:8000
[vite]   VITE v7.0.4  ready in 824 ms
[queue] Processing jobs from queue
[logs]  Listening for logs...
4

Create your first user

Open your browser to http://localhost:8000 and click “Register” to create your first account.The first registered user will need to be manually assigned the admin role. In a new terminal:
php artisan tinker
Then run:
$user = App\Models\User::first();
$user->assignRole('admin');
exit
For development, you can also use database seeders to create test data. See the Installation guide for production user setup.
5

Access the application

Navigate to http://localhost:8000 and log in with your credentials.You’ll see the dashboard with access to:
  • Patient management
  • Appointment scheduling
  • Consultation records
  • Prescription management
  • Payment tracking
  • Staff management (admin only)
  • Reports (admin only)

Default configuration

The quick start uses these default settings:
SettingValueLocation
DatabaseSQLite (database/database.sqlite).env:23
QueueDatabase driver.env:38
CacheDatabase.env:40
SessionDatabase.env:30
MailLog driver (development).env:50
App URLhttp://localhost.env:5
SQLite is perfect for development and small deployments. For production, see the Installation guide for MySQL or PostgreSQL setup.

Exploring the features

Patient management

Create your first patient record:
  1. Navigate to Patients in the sidebar
  2. Click Add New Patient
  3. Fill in the patient information
  4. Save the record
Patient records include:
  • Personal information (name, ID, birth date, gender)
  • Contact details (phone, email, address)
  • Medical history (antecedents, allergies, chronic diseases)
  • Current medications
  • File attachments

Scheduling appointments

Book an appointment:
  1. Go to Appointments
  2. Click Schedule Appointment
  3. Select patient and doctor
  4. Choose date and time
  5. Add reason for visit
  6. Confirm booking

Creating consultations

Consultations can only be created by users with the doctor or admin role.
Document a patient visit:
  1. Navigate to Consultations
  2. Click New Consultation
  3. Select patient (optionally link to appointment)
  4. Record vital signs
  5. Document reason for visit and clinical findings
  6. Add diagnosis and treatment plan
  7. Save consultation

Generating prescriptions

Create a prescription from a consultation:
  1. Open a consultation record
  2. Click Create Prescription
  3. Add medications with:
    • Medication name
    • Dosage
    • Frequency
    • Duration
  4. Add general instructions
  5. Save and generate PDF

Development workflow

Running tests

Nguhöe EHR uses Pest for testing:
# Run all tests
php artisan test

# Run specific test file
php artisan test --filter=PatientTest

# Run with coverage
php artisan test --coverage

Code formatting

Format PHP code with Laravel Pint:
# Fix code style
composer lint

# Check without fixing
composer test:lint
Format JavaScript/TypeScript code:
# Fix formatting
npm run format

# Check formatting
npm run format:check

Type checking

Check TypeScript types:
npm run types

Linting

Lint JavaScript/TypeScript:
npm run lint

Troubleshooting

If port 8000 is already in use, you can specify a different port:
php artisan serve --port=8080
Don’t forget to update APP_URL in .env to match.
If you see a database error, create the SQLite file manually:
touch database/database.sqlite
php artisan migrate
If you see “Unable to locate file in Vite manifest”, rebuild assets:
npm run build
Or ensure npm run dev is running in a separate terminal.
Ensure proper permissions on storage and cache directories:
chmod -R 775 storage bootstrap/cache
If Composer install fails, try:
composer install --ignore-platform-reqs
Note: Only use this for development if you can’t upgrade PHP immediately.

Next steps

Now that you have Nguhöe EHR running:

Production installation

Deploy Nguhöe EHR to production with proper security and optimization

Configuration

Customize the system for your clinic’s needs

User management

Set up staff accounts and configure roles

Backup configuration

Configure automated backups for data protection
The quick start setup is for development only. For production deployments, follow the Installation guide for proper security configuration.

Build docs developers (and LLMs) love