A modern authentication system built with Next.js, featuring secure user management, session handling, and email verification capabilities.
- 🔐 Secure authentication with session management
- 👤 User profile management
- 📱 Responsive design
- 🚀 Built with Next.js 15 and Turbopack
- 🎨 Modern UI with Tailwind CSS and Radix UI components
- Framework: Next.js 15.3.1
- Language: TypeScript
- Database: PostgreSQL with Drizzle ORM
- Styling: Tailwind CSS 4.1.3
- UI Components: Shadcn (Radix UI)
- Authentication: Better Auth
- Package Manager: pnpm
- Node.js (LTS version)
- pnpm 10.6.5 or later
- PostgreSQL database
-
Clone the repository:
git clone [repository-url] cd meeting-baas-auth -
Install dependencies:
pnpm install
-
Set up environment variables:
cp .env.example .env
Fill in the required environment variables in
.env. Details about the expected values for each key is documented in .env.example -
Run database migrations:
npx drizzle-kit generate npx drizzle-kit migrate
This repo extends the existing accounts table but doesn't create it initially.
When forking:
- Create an accounts table with the schema defined in
database/accounts-schema.ts - Run migrations to add related authentication tables
- Create an accounts table with the schema defined in
Start the development server:
pnpm devThe application will be available at http://localhost:3000
pnpm dev: Start development server with Turbopackpnpm build: Build the application for productionpnpm start: Start the production serverpnpm lint: Run Biome linterpnpm check-types: Check TypeScript types
├── app/ # Next.js app directory
├── components/ # Reusable UI components
├── database/ # Database configuration and migrations
├── lib/ # Utility functions and shared logic
├── migrations/ # Database migration files
├── public/ # Static assets
└── styles/ # Global styles
The application uses a secure authentication system with the following features:
- Session-based authentication
- OAuth authentication
- Secure cookie handling
- CORS protection for API routes
The application uses the following main tables:
accounts: User profiles and company informationsessions: Active user sessionsprovider_accounts: Authentication provider accountsverifications: Email verification tokens
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
