medigo

Medigo - Medical Management System

A modern medical management application built with Laravel 12, Vue.js 3, Inertia.js, Jetstream, Filament Admin Panel, and PostgreSQL.

πŸš€ Tech Stack

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed on your system:

πŸ”§ Installation

1. Clone the Repository

git clone <repository-url>
cd medigo

2. Install PHP Dependencies

composer install

3. Environment Configuration

Copy the .env.example file to .env:

cp .env.example .env

Generate the application key:

php artisan key:generate

4. Configure Database

Edit the .env file and update your PostgreSQL credentials:

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=medigo
DB_USERNAME=postgres
DB_PASSWORD=your_password

5. Create PostgreSQL Database

Connect to PostgreSQL and create the database:

psql -U postgres -c "CREATE DATABASE medigo;"

Or if you’re already in psql:

CREATE DATABASE medigo;

6. Run Database Migrations

php artisan migrate

This will create all necessary tables including:

7. Install Frontend Dependencies

npm install --legacy-peer-deps

🎯 Running the Application

Start both Laravel and Vite dev server with a single command:

npm run start

This will start:

Option 2: Use Composer Dev Script

composer dev

This runs Laravel server, queue worker, logs, and Vite all together.

Option 3: Run Servers Separately

Terminal 1 - Laravel Server:

php artisan serve

Terminal 2 - Vite Dev Server:

npm run dev

πŸ‘€ Creating Admin Users

php artisan make:filament-user

Follow the interactive prompts to create your admin user:

Method 2: Using Tinker

php artisan tinker

Then run:

$user = \App\Models\User::create([
    'name' => 'Admin User',
    'email' => 'admin@example.com',
    'password' => bcrypt('password'),
]);
$user->email_verified_at = now();
$user->save();

🌐 Accessing the Application

Log in with the credentials you created using one of the methods above.

πŸ“ Project Structure

medigo/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Actions/              # Jetstream actions (user management)
β”‚   β”œβ”€β”€ Filament/              # Filament admin resources, pages, widgets
β”‚   β”œβ”€β”€ Http/
β”‚   β”‚   β”œβ”€β”€ Controllers/
β”‚   β”‚   └── Middleware/
β”‚   β”œβ”€β”€ Models/
β”‚   └── Providers/
β”‚       └── Filament/          # Filament admin panel configuration
β”œβ”€β”€ config/                    # Configuration files
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/           # Database migrations
β”‚   └── seeders/              # Database seeders
β”œβ”€β”€ public/                    # Public assets
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ css/                   # CSS files
β”‚   β”œβ”€β”€ js/                    # Vue.js components and pages
β”‚   β”‚   β”œβ”€β”€ Components/       # Reusable Vue components
β”‚   β”‚   β”œβ”€β”€ Layouts/          # Inertia layouts
β”‚   β”‚   └── Pages/            # Inertia pages
β”‚   └── views/                # Blade templates (minimal, mainly for Inertia)
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ web.php               # Web routes
β”‚   └── api.php               # API routes
└── storage/                   # Storage for logs, cache, etc.

🎨 Admin Panel Features

The Filament admin panel includes:

πŸ” Authentication

The application uses:

πŸ› οΈ Development Commands

Build for Production

npm run build

Run Tests

php artisan test

Clear Caches

php artisan config:clear
php artisan cache:clear
php artisan view:clear
php artisan route:clear

Code Formatting

composer pint

πŸ“ Key Configuration Files

πŸ› Troubleshooting

npm Permission Errors

sudo chown -R 501:20 "/Users/bindeshpandya/.npm"

Database Connection Issues

  1. Verify PostgreSQL is running
  2. Check .env database credentials
  3. Ensure database exists: psql -U postgres -l

Vite Assets Not Loading

  1. Ensure npm run dev is running
  2. Check browser console for errors
  3. Clear browser cache

Filament Panel Not Accessible

  1. Verify user has canAccessPanel() returning true in User model
  2. Check app/Providers/Filament/AdminPanelProvider.php is registered
  3. Clear config cache: php artisan config:clear

πŸ“š Additional Resources

πŸ“„ License

This project is open-sourced software licensed under the MIT license.

πŸ‘₯ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Happy Coding! πŸš€