# Guestlist

Minimal guest list app with admin/maintainer login, guest access code and MongoDB.

## Preview

![Guestlist preview 1](Preview/ex1.png)

![Guestlist preview 2](Preview/ex2.png)

![Guestlist preview 3](Preview/ex3.png)

![Guestlist preview 4](Preview/ex4.png)

## Quick Start With Docker Compose

```bash
docker compose up -d --build
```

Open the app:

```text
http://localhost:8080
```

On first startup:

```text
http://localhost:8080/setup
```

Create the first admin user and the guest access code there.

## Useful Commands

Show logs:

```bash
docker compose logs -f app
```

Stop:

```bash
docker compose down
```

Stop and delete MongoDB data:

```bash
docker compose down -v
```

## Configuration

The app is configured in the container through environment variables:

```yaml
Mongo__ConnectionString: mongodb://mongo:27017
Mongo__DatabaseName: guestlist
ASPNETCORE_URLS: http://+:8080
```

MongoDB data is stored in the Compose volume `mongo_data`.

When setup is reset in the admin area, the app first copies the current database into a new backup database using the pattern `guestlist_backup_<timestamp>`. After that, the active database is recreated and setup is open again. The latest database backup can be restored from the setup page.
