# Swimming Container Appointment Booking System

A web-based appointment booking system for swimming containers, built with Symfony and React.

## Features

- Online appointment booking with calendar view
- Email notifications for bookings, cancellations, and reminders
- Admin interface for managing appointments and availability
- GDPR-compliant data handling
- Responsive design for all devices
- Role-based access control (Admin, Customer)

## Requirements

- PHP 8.1 or higher
- Composer
- Node.js and npm
- MySQL 5.7 or higher
- SMTP server for email notifications

## Installation

1. Clone the repository:
```bash
git clone [repository-url]
cd [project-directory]
```

2. Install PHP dependencies:
```bash
composer install
```

3. Install JavaScript dependencies:
```bash
npm install
```

4. Configure your environment:
```bash
cp .env .env.local
```
Edit `.env.local` and set your database and mailer configuration.

5. Create the database:
```bash
php bin/console doctrine:database:create
php bin/console doctrine:migrations:migrate
```

6. Create an admin user:
```bash
php bin/console app:create-admin
```

7. Build assets:
```bash
npm run build
```

8. Start the development server:
```bash
symfony server:start
```

## Usage

### Customer Interface

1. Visit the homepage to view available time slots
2. Select a time slot from the calendar
3. Fill in your details in the booking form
4. Submit the form to book your appointment
5. Receive a confirmation email with booking details
6. Use the links in the email to manage your booking

### Admin Interface

1. Log in with admin credentials
2. Access the admin dashboard at `/appointments/admin`
3. View and manage all appointments
4. Set up availability for different days and times
5. Export appointment data if needed

## Security

- All data is encrypted in transit using HTTPS
- Passwords are hashed using bcrypt
- Personal data is automatically deleted after the retention period
- reCAPTCHA protection for the booking form
- Role-based access control

## Development

### Running Tests

```bash
php bin/phpunit
```

### Code Style

```bash
composer run cs-fix
```

## Contributing

1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Support

For support, please contact [support-email] 