Skip to content

A Next.js template that uses Hono as the API framework and Lucia for authentication.

License

Notifications You must be signed in to change notification settings

TheBinaryGuy/next-hono-lucia

Repository files navigation

Hono x Lucia


This is a Next.js template that uses Hono as the API framework and Lucia for authentication. This also uses hono's Zod to OpenAPI package to generate OpenAPI schema available at /api/swagger.json and the editor / playground at /api/scalar.

Uses:

Getting Started (Development Environment)

  • Clone this template using:
pnpm create next-app your-app-name -e https://github.com/TheBinaryGuy/next-hono-lucia
  • Create a database on your local postgres instance called example.
  • Then run the following commands:
cd your-app-name
pnpm db:migrate
pnpm dev
  • That's it!

Environment Variables

Name Description
NEXT_PUBLIC_DOMAIN The domain of the website, defaults to localhost:3000
DATABASE_URL Postgres connection string, defaults to postgres://postgres@localhost/example
EMAIL_FROM Email from address, defaults to "Example [email protected]"
EMAIL_PROVIDER Email provider, console, smtp, resend, default is console
RESEND_API_KEY If email provider is resend, get your key from resend.com
SMTP_HOST If email provider is smtp
SMTP_PORT If email provider is smtp, defaults to 587
SMTP_USERNAME If email provider is smtp
SMTP_PASSWORD If email provider is smtp
SMTP_SECURE If email provider is smtp, true or 1, defaults to true
STANDALONE If you want standalone output, set this to 1, if you are using the provided Dockerfile then this is already taken care of, defaults to 0

About

A Next.js template that uses Hono as the API framework and Lucia for authentication.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published