Skip to content

edify/spring-htmx-todo-demo

Repository files navigation

spring-htmx-todo-demo

This as a PoC demo project for using HTMX with Spring Boot and Kotlin HTML library as a way to create React like components.

Requirements

  • An Auth0 account with a "Regular Web Application" configured

  • Docker installed and running

  • SDKMan to manage Java versions (optional)

  • JDK 21

Setup

  • Install Java 21 with SDKMan (optional)

    sdk install java 21.0.5-tem
    sdk use java 21.0.5-tem
  • Configure the Auth0 web application with the following callback URL http://localhost:8080/login/oauth2/code/auth0

  • Create a user in your Auth0 account that can access the configured application.

  • Create a src/main/resources/application-local.yml config file with the following:

    spring:
      security:
        oauth2:
          client:
            registration:
              auth0:
                client-id: "YOUR_AUTH0_APP_CLIENT_ID"
                client-secret: "YOUR_AUTH0_APP_CLIENT_SECRET"
                scope:
                  - profile
                  - email
                  - openid
            provider:
              auth0:
                issuer-uri: https://YOUR_AUTH0_TENANT_NAME.us.auth0.com/
    Note
    A different OIDC provider like Google or Okta can be used instead of Auth0

Running the application

./gradlew bootTestRun --args='--spring.profiles.active=local'

Go to http://localhost:8080 and test it out

License

This repo is available under the MIT License. See LICENSE for the full license text.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors