Use this method if you need to customize specific steps or prefer understanding what each command does.
Prerequisites
Ensure all system requirements are met before proceeding.Installation Process
Install PHP Dependencies
Install all backend dependencies using Composer:This installs:This excludes development dependencies like Pest (testing) and Laravel Pint (code styling).
- Laravel 12 framework
- Livewire 3 and Flux UI components
- Laravel Fortify (authentication)
- DomPDF (PDF generation)
- All required PHP packages
The installation may take 1-3 minutes. Composer will download packages from Packagist and configure autoloading.
Development vs Production
For production environments, use:Create Environment File
Copy the example environment file:This creates your local configuration file. The
.env file contains sensitive settings and is not tracked by Git.Generate Application Key
Create a unique encryption key for your application:This generates a random
APP_KEY in your .env file, used for:- Encrypting session data
- Hashing passwords
- Securing cookies
- Signing URLs
Run Database Migrations
Create all database tables by running migrations:This creates tables for:
- Users and authentication
- Appointments and scheduling
- Medical records (attentions)
- Personal data and profiles
- Notifications and jobs queue
You’ll be asked to confirm in production environments. Use
--force flag to skip confirmation.Seed the Database
Populate the database with initial data:This creates:
- Admin user with default credentials
- Default roles and permissions
- System configuration
Default Admin Account
You can customize the admin password by setting
ADMIN_PASSWORD in your .env file before seeding.Install Node.js Dependencies
Install frontend build tools and dependencies:This installs:
- Vite 7 - Build tool with hot module replacement
- Tailwind CSS 4 - Utility-first CSS framework
- Axios - HTTP client for API requests
- Concurrently - Run multiple commands in parallel
Compile Frontend Assets
Build CSS and JavaScript files:This creates optimized, minified assets in This starts Vite’s development server with:
For Production
public/build/.For Development
- Hot module replacement (HMR)
- Instant CSS updates
- Source maps for debugging
- Auto-reload on file changes
Keep
npm run dev running in a separate terminal during development for the best experience.Set Permissions (Linux/macOS)
Ensure Laravel can write to required directories:If using a web server (Apache/Nginx), set ownership:
Start Development Servers
You have two options for running the application:This starts:
Option 1: Automated (Recommended)
Run all services in parallel:- Laravel development server (port 8000)
- Queue worker for background jobs
- Vite dev server for assets
Option 2: Manual (Multiple Terminals)
Terminal 1: Web Server
Terminal 2: Queue Worker
Terminal 3: Vite Dev Server
The queue worker is essential for sending email notifications. Don’t skip this step.
Post-Installation Tasks
Configure Email Service
For email notifications to work, configure mail settings in.env:
Set Up Scheduled Tasks (Optional)
For automatic appointment reminders, add to crontab:- Sending appointment reminders 24 hours in advance
- Cleaning up old notifications
- Database maintenance tasks
Optimize for Development
Clear all cached configuration:- Configuration cache
- Route cache
- View cache
- Application cache
Run this command after changing
.env or config files to ensure changes take effect.Troubleshooting
”Please provide a valid app key”
Run:“SQLSTATE[HY000]: General error: 1 no such table”
Run migrations:“Mix manifest does not exist”
Compile assets:“Class not found”
Regenerate autoload files:Permission Denied Errors
Fix storage permissions:Next Steps
Configuration
Customize environment settings, database, mail, and queue configuration
Getting Started
Learn about NutriFit’s features and start using the platform