# SKM Survey - Survey Kepuasan Masyarakat

Laravel 8 application for Survey Kepuasan Masyarakat (SKM) with OPD-based surveys.

## Features

- Public survey without login
- Admin dashboard with authentication
- 9 national SKM elements (U1-U9)
- OPD-based surveys
- Emoji rating scale (1-4)
- Charts (bar and radar) using Chart.js
- Export to Excel (maatwebsite/excel)
- Export to PDF (dompdf)
- Bootstrap 5 UI

## Installation

1. Install dependencies:
```bash
composer install
```

2. Copy environment file:
```bash
cp .env.example .env
```

3. Generate application key:
```bash
php artisan key:generate
```

4. Configure database in `.env`:
```
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=skm_survey
DB_USERNAME=root
DB_PASSWORD=
```

5. Run migrations:
```bash
php artisan migrate
```

6. Seed database:
```bash
php artisan db:seed
```

7. Start development server:
```bash
php artisan serve
```

## Default Login

- Email: admin@skm.local
- Password: password

## Project Structure

- Models: User, OPD, Question, Response
- Controllers: PublicController, LoginController, DashboardController, ExportController
- Views: Public views (index, survey, thankyou), Admin views (dashboard, opd-results), Auth views (login)
- Migrations: users, opds, questions, responses
- Seeders: UserSeeder, OPDSeeder, QuestionSeeder



