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.
- Have a Userfront account
- Have Docker Desktop installed
- Have mkcert installed
- install a localhost CA and generate a localhost cert
npm run gen-cert
- Copy
.env.exampleinto a file called.env.localcp .env.example .env.local
- Set the following environment variables in
.env.local(make sure you are in "test mode"):- USERFRONT_JWT_PUBLIC_KEY (Can be found at https://userfront.com/dashboard/jwt?tab=public )
- NEXT_PUBLIC_USERFRONT_WORKSPACE_ID (Can be found at https://userfront.com/dashboard )
- bring up the frontend (Nextjs) and backend (Spring Boot) containers
docker compose up
- visit https://localhost:3000