Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Userfront example: Nextjs + Spring Boot

An example implementation of Nextjs + Spring Boot.

Note: The included Dockerfiles are not ready for production. See the appropriate framework's documentation for production best practices.

Running locally

Prerequisites

  1. Have a Userfront account
  2. Have Docker Desktop installed
  3. Have mkcert installed

Setup

  1. install a localhost CA and generate a localhost cert

    npm run gen-cert

  2. Copy .env.example into a file called .env.local

    cp .env.example .env.local

  3. Set the following environment variables in .env.local (make sure you are in "test mode"):
    1. USERFRONT_JWT_PUBLIC_KEY (Can be found at https://userfront.com/dashboard/jwt?tab=public )
    2. NEXT_PUBLIC_USERFRONT_WORKSPACE_ID (Can be found at https://userfront.com/dashboard )

Running

  1. bring up the frontend (Nextjs) and backend (Spring Boot) containers

    docker compose up

  2. visit https://localhost:3000