Installation

How to install and initialize Authverse in your project.

Authverse makes it simple to generate a complete, production-ready authentication system for your project with a single command.

This guide covers quick install, optional UI screens, environment variables, and common post-install steps so you can get up and running fast.


Prerequisites

  • Node.js 16+ (LTS recommended)
  • npm or yarn available in your terminal

Quick install

Run the following in your project root:

npx authverse@latest init

The init command scaffolds configuration, models, routes, UI components (optional), and recommended environment variables.

Optional: Auth UI Screens (ShadCN)

Authverse can optionally scaffold ShadCN-based auth screens:

  • Login
  • Signup
  • Modern, responsive layout using ShadCN components

Choose the UI option during init or run a later generator provided in the project.


After setup

Once Authverse is installed and files are generated, complete the following:

1. Update DATABASE_URL

Open your .env file and set your database connection string, for example:

DATABASE_URL=""

2. If using Prisma

Run the following to generate the Prisma client and apply migrations:

npx prisma generate
npx prisma db push

3. If using Drizzle ORM

Run the following to generate Drizzle SQL migrations:

npx drizzle-kit generate

Troubleshooting

  • "Missing env" — confirm .env contains required keys.
  • "DB connection failed" — verify DATABASE_URL and ensure your database is running.
  • If issues persist, consult the generated README or open an issue in the Authverse repository.

You're ready — Authverse has scaffolded:

  • Config & environment templates
  • Database models & migrations
  • Routes & handlers
  • Optional Auth UI components
  • Recommended folder structure

Happy building!