Skip to content

A starter project for next js with authentication Next.js + Tailwind + Typescript + Prisma + NextAuth + Google_Auth + Mongodb starter template.

Notifications You must be signed in to change notification settings

M-Tijani/Auth_Package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1146991 · Nov 12, 2024

History

16 Commits
Nov 2, 2024
Nov 4, 2024
Nov 4, 2024
Nov 3, 2024
Nov 2, 2024
Nov 12, 2024
Nov 3, 2024
Nov 2, 2024
Nov 3, 2024
Nov 3, 2024
Nov 2, 2024
Nov 2, 2024
Nov 2, 2024

Repository files navigation

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.

App Screenshot

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:

    git clone https://github.com/M-Tijani/Auth_Package
    cd Auth_Package
  2. Install the packeges:

    npm install or npm i
    or
    pnpm install or npm i
  3. Set up your environment variables.:

    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:

    npx prisma generate
  5. Install the packeges:

    npm run dev
    or
    pnpm run dev

6.Open http://localhost:3000 to see your application in action.

About

A starter project for next js with authentication Next.js + Tailwind + Typescript + Prisma + NextAuth + Google_Auth + Mongodb starter template.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published