Prerequisites
Before installing NutriFit, ensure your development environment meets these requirements:Required Software
PHP 8.2+
Modern PHP version with required extensions
Composer 2.x
PHP dependency manager
Node.js 18+
JavaScript runtime for asset compilation
Git
Version control system
Required PHP Extensions
Verify you have these PHP extensions enabled:pdo_sqlite(orpdo_mysqlfor production)mbstringtokenizerxmlctypejsonbcmathfileinfo
Optional Software
- MySQL 8.0+: For production database (SQLite used in development)
- Docker: For Laravel Sail containerized environment
- Mailtrap Account: For testing email notifications (free)
Installation
Quick Start (Recommended)
The fastest way to get NutriFit running:Run Automated Setup
- ✅ PHP dependency installation
- ✅ Environment configuration
- ✅ Application key generation
- ✅ Database creation and migration
- ✅ Node.js dependency installation
- ✅ Frontend asset compilation
Your application is now running at http://localhost:8000
Manual Installation (Step-by-Step)
If you prefer granular control over the installation process:Install PHP Dependencies
Install Node Dependencies
Environment Configuration
Edit your.env file to customize the application:
Basic Configuration
The application is built for Spanish-speaking markets. Change
APP_LOCALE if needed.Database Configuration
SQLite (Development - Default)
MySQL (Production)
Queue Configuration
Email Configuration
Development (Mailtrap)
For testing without sending real emails:Production (Real SMTP)
Admin Password Configuration
NutriAdmin123.
Running the Application
Development Mode (All Services)
The easiest way to run all required services:Web Server
Laravel on port 8000
Queue Worker
Processes email notifications
Vite Server
Hot module replacement for frontend
Manual Multi-Terminal Setup
If you prefer separate terminal windows for each service:- Terminal 1: Web Server
- Terminal 2: Queue Worker
- Terminal 3: Vite (Dev)
http://localhost:8000Production Mode
For production deployment:First Login
Administrator Access
After seeding the database, log in with the administrator account:Administrator Credentials
Email:
Password:
[email protected]Password:
NutriAdmin123 (or your custom ADMIN_PASSWORD from .env)Navigate to Login
Open http://localhost:8000 and click “Login”
Creating Test Users
From the admin dashboard, create test users for each role:- Create Nutritionist
- Create Patient
- Go to
/administrador/users/create - Fill in user details
- Select role: Nutricionista
- Set initial password
- User receives welcome email
Role-Based Dashboards
Each role has a dedicated dashboard:| Role | Dashboard URL | Features |
|---|---|---|
| Administrator | /administrador/dashboard | User management, system oversight, analytics |
| Nutritionist | /nutricionista/dashboard | Schedule management, patient records, appointments |
| Patient | /paciente/dashboard | Appointment booking, history viewing, profile management |
Verification & Testing
Verify Installation
Check Web Server
Visit http://localhost:8000 - you should see the landing page
Run Test Suite
NutriFit includes Pest tests (composer.json:28):Common Issues
Database Connection Error
Database Connection Error
Problem: Can’t connect to databaseSolutions:
- For SQLite: Ensure
database/database.sqlitefile exists and is writable - For MySQL: Verify credentials in
.envand database exists - Run:
php artisan config:clearto clear cached config
Queue Not Processing
Queue Not Processing
Problem: Emails not sendingSolutions:
- Ensure queue worker is running:
php artisan queue:work - Check
QUEUE_CONNECTION=databasein.env - View failed jobs:
php artisan queue:failed - Retry failed jobs:
php artisan queue:retry all
Assets Not Loading
Assets Not Loading
Problem: Styles or JavaScript not workingSolutions:
- Ensure Vite dev server is running:
npm run dev - For production: Run
npm run buildfirst - Clear browser cache
- Check
public/builddirectory exists and contains files
Fortify Routes Not Found
Fortify Routes Not Found
Problem: Login/register routes give 404Solutions:
- Clear route cache:
php artisan route:clear - Verify Fortify is installed:
composer show laravel/fortify - Check
config/fortify.phpexists - Run:
php artisan optimize:clear
Next Steps
Now that NutriFit is running:Explore Features
Learn about all available capabilities
Configure Schedules
Set up nutritionist availability schedules
Customize Settings
Configure system settings and branding
Deploy to Production
See deployment guides for going live
Development Workflow
Daily Development
Your typical development session:Adding Features
Scheduled Tasks
NutriFit includes a command for appointment reminders:Additional Resources
Laravel Documentation
Official Laravel 12 documentation
Livewire Documentation
Learn about Livewire components
Tailwind CSS
Tailwind CSS utility reference
Fortify Documentation
Authentication features
Need Help? Check the project’s GitHub repository for issues and discussions: NutriFit on GitHub