A modern Next.js application with Auth0 authentication integration and a comprehensive UI component library.
- 🔐 Auth0 Authentication
- ⚡ Next.js 15 with React 19
- 🎨 Beautifully designed UI components with Radix UI
- 🌙 Dark mode support with next-themes
- 📱 Fully responsive design
- 🧩 Type-safe with TypeScript
- 📋 Form validation with React Hook Form
- 🔄 Data visualization with Recharts
- 🎭 Animation with tailwindcss-animate
- Framework: Next.js 15
- Authentication: Auth0
- UI Components: Radix UI
- Styling: Tailwind CSS
- Form Management: React Hook Form
- Icons: Lucide React
- Notifications: Sonner
- Node.js (latest LTS version recommended)
- npm or Yarn
- Clone the repository:
git clone https://github.com/mahezsh/auth0-starter.git
cd auth0-starter
- Install dependencies:
npm install
# or
yarn
- Create a
.env
file in the root directory with your Auth0 credentials:
NEXT_PUBLIC_AUTH0_DOMAIN=your-auth0-domain
NEXT_PUBLIC_AUTH0_CLIENT_ID=your-client-id
NEXT_PUBLIC_AUTH0_CALLBACK_URL=http://localhost:3000/api/auth/callback
NEXT_PUBLIC_AUTH0_LOGOUT_URL=http://localhost:3000
- Run the development server:
npm run dev
# or
yarn dev
- Open http://localhost:3000 in your browser.
- Create an Auth0 account if you don't have one at auth0.com
- Create a new application in the Auth0 dashboard
- Set the following URLs in your Auth0 application settings:
- Allowed Callback URLs:
http://localhost:3000/api/auth/callback
- Allowed Logout URLs:
http://localhost:3000
- Allowed Web Origins:
http://localhost:3000
- Allowed Callback URLs:
- Copy your Auth0 domain and client ID to your
.env
file
auth0-starter/
├── components/ # UI components
├── hooks/ # Custom hooks
├── lib/ # Utility functions and shared logic
├── public/ # Static assets
├── styles/ # Global styles
└── types/ # TypeScript type definitions
npm run dev
- Starts the development servernpm run build
- Builds the app for productionnpm start
- Runs the built app in production modenpm run lint
- Lints the codebase
This project can be deployed on Vercel with minimal configuration:
npm i -g vercel
vercel
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ using Next.js and Auth0