This is a starter for those who want to integrate NextJS, Lucia, and Drizzle ORM for their projects. I have a blog post on this here. I'm also using NeonDB for my database.
There are more features to be added such as...
- shortening the session's lifetime
- adding toast notifications
- adding a logout button
You can progressively add new features (such as the ones above).
- download and run
npm i
- create
.env
file - add the
DATABASE_URL
value in your.env
file - run
npm run dev
- try creating new user
You can also run npx drizzle-kit studio
to check the data being stored in your db