philipp-meier / Edap

:date: A very simple .NET appointment planner with OpenID Connect integration, that can be hosted within a Docker container.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

đź“… .NET Appointment Planner

CI MIT License

A simple .NET appointment planner with OpenID Connect (OAuth) integration, that can be hosted within a Docker container.

Note: Participation-links like https://localhost:7298/polls/participate/e84203a2509748d2bcafa209365707bc do not require an authenticated user.

Preview

Use cases

  • As an administrator I want to create polls, so that I can find the date, where most of the participants are available.
  • As an administrator I want to generate invitation links, so that I can send them to people that will participate in the poll.
  • As an administrator I want to close and archive a poll, so that the result can't be changed after a specific date.
  • As a user I want to open an invitation link, so that I can participate in a poll.

Features

  • Simple admin interface for creating polls.
  • Simple user interface to see the current result and vote.
  • Invitation links
  • Docker support
  • OpenID Connect (OAuth) integration

Restrictions (Current version)

  • Only the administrator can create polls.
  • Every authenticated "Edap"-client user is currently an administrator (no claim checks).

Tech stack

  • ASP.NET Razor pages, C#, EF Core, Sqlite3

Run

  • Step 1: Create a poll database in the "Data" directory.
    mkdir Data && sqlite3 Data/polls.db "VACUUM;"

  • Step 2: Update the database.
    dotnet ef database update

  • Step 3: Enter your IdP data in the "IdentityProvider"-section of the appsettings.json.

  • Step 4: Run the application
    dotnet run or dotnet watch for hot reload

Deployment

  • Step 1: Build the image and publish it to your docker registry.
    docker login <DOCKER_REGISTRY_HOST>
    docker build -t <DOCKER_REGISTRY_HOST>/edap .
    docker push <DOCKER_REGISTRY_HOST>/edap

  • Step 2: Create a volume on the host to persist data.
    docker volume create edap_volume

  • Step 3: Copy your polls.db database to the edap_volume.
    Use docker volume inspect edap_volume to find the location of the edap_volume.

  • Step 4: Download the image on the host machine and run the container.
    docker login <DOCKER_REGISTRY_HOST>
    docker pull <DOCKER_REGISTRY_HOST>/edap
    docker run --name edap -d -p 5850:80 --mount source=edap_volume,target=/app/Data <DOCKER_REGISTRY_HOST>/edap

About

:date: A very simple .NET appointment planner with OpenID Connect integration, that can be hosted within a Docker container.

License:MIT License


Languages

Language:C# 55.9%Language:HTML 38.9%Language:CSS 2.5%Language:Shell 1.1%Language:Dockerfile 1.1%Language:JavaScript 0.5%