# Infra24 Marketplace Platform

Welcome to the Infra24 project! This is the Milestone 1 completion, featuring full authentication, multi-tenancy, job postings, and freelancer applications.

## Prerequisites
- PHP >= 8.2
- Composer
- Node.js & NPM
- MySQL Database

## Setup Instructions

1. **Clone the repository**
2. **Install Composer Dependencies:**
   ```bash
   composer install
   ```
3. **Install NPM Dependencies:**
   ```bash
   npm install && npm run build
   ```
4. **Environment Setup:**
   Duplicate `.env.example` as `.env` and configure your database settings, Mailpit, etc. Make sure to set `FILESYSTEM_DISK=public`.
   ```bash
   cp .env.example .env
   php artisan key:generate
   ```
5. **Database Setup:**
   Create a database named `infra24` and run migrations and seeders. The seeder will set up the roles and super admin.
   ```bash
   php artisan migrate:fresh --seed
   ```
   *Note: If you encounter an issue running seeders directly, ensure `RolesSeeder` and `AdminSeeder` are properly registered in `DatabaseSeeder.php`, or run them manually:*
   ```bash
   php artisan db:seed --class=RolesSeeder
   php artisan db:seed --class=AdminSeeder
   ```
6. **Storage Link:**
   ```bash
   php artisan storage:link
   ```
7. **Start the Development Server:**
   ```bash
   php artisan serve
   ```

## Roles
The system has four default roles:
- `super_admin`: Has full access and platform oversight.
- `company_admin`: Can manage the company profile, team (invite planners), and job postings.
- `planner`: Can manage job postings and application acceptance.
- `executor` (Freelancer): Can apply to jobs and manage their profile/portfolio.

## Default Accounts
A default Super Admin is created via the seeder:
- Email: `admin@infra24.com`
- Password: `password`
