https://github.com/m-tijani/auth_package
A starter project for next js with authentication Next.js + Tailwind + Typescript + Prisma + NextAuth + Google_Auth + Mongodb starter template.
https://github.com/m-tijani/auth_package
authentication authorization mongodb nextauth nextauth-google nextjs prisma shadcn-ui zod
Last synced: 9 months ago
JSON representation
A starter project for next js with authentication Next.js + Tailwind + Typescript + Prisma + NextAuth + Google_Auth + Mongodb starter template.
- Host: GitHub
- URL: https://github.com/m-tijani/auth_package
- Owner: M-Tijani
- Created: 2024-11-02T22:51:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-12T21:14:07.000Z (about 1 year ago)
- Last Synced: 2025-04-08T07:17:40.045Z (10 months ago)
- Topics: authentication, authorization, mongodb, nextauth, nextauth-google, nextjs, prisma, shadcn-ui, zod
- Language: TypeScript
- Homepage: https://auth-package.vercel.app
- Size: 266 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Authentication Starter Kit
A complete starter kit for implementing robust user authentication in Next.js projects, including Google OAuth and form validation. This kit simplifies the integration of a modern authentication stack with best practices.

## Features
- **Google OAuth Integration**: Out-of-the-box support for authenticating users via Google.
- **Form Validation**: Robust client-side and server-side form validation using Zod.
- **Reusable UI Components**: Pre-built and styled components from ShadCN for faster development.
- **Data Management**: Integration with Prisma and MongoDB for handling user data.
- **Type Safety**: Full TypeScript support for safer and more reliable code.
- **Responsive Design**: UI components are mobile-friendly and accessible.
## Installation
1. Clone the repository:
```bash
git clone https://github.com/M-Tijani/Auth_Package
cd Auth_Package
```
2. Install the packeges:
```bash
npm install or npm i
or
pnpm install or npm i
```
3. Set up your environment variables.:
```bash
DATABASE_URL="mongodb+srv://name:password@mongodb.net"/databaseName?retryWrites=true&w=majority
GOOGLE_CLIENT_ID=From_Google_Console
GOOGLE_CLIENT_SECRET=From_Google_Console
JWT_SECRET=Make_A_Unique_String
NEXTAUTH_SECRET=Make_A_Unique_String
MAILER_SEND_API_KEY=From_Mailjet
GMAIL_APP_PASSWORD=Create_Your_App_Password
GMAIL_USER=Your_Gmail_Account
BRAND_NAME=Your_Brand_Name // "You can remove it if you want"
PRODUCTION=https://your_domain.com
LOCAL=http://localhost:3000
ENVIRONMENT=LOCAL
```
4. Prisma Schema:
```bash
npx prisma generate
```
5. Install the packeges:
```bash
npm run dev
or
pnpm run dev
```
6.Open http://localhost:3000 to see your application in action.