Skip to content

Template for NextJs application with OAuth & postgres with basic app layout :)

Notifications You must be signed in to change notification settings

yesabhishek/nextjs-auth-template

Repository files navigation

Next.js Authentication Template

A modern, production-ready template for building full-stack applications with Next.js, featuring built-in authentication, database integration, and a clean, minimal UI.

Features

  • 🔒 Authentication ready with NextAuth.js
  • 📦 Database integration with Prisma and PostgreSQL
  • 🎨 Clean and minimal UI with Tailwind CSS
  • 🚀 Built with Next.js 14 App Router
  • 🔑 OAuth support for Google and GitHub
  • 🎯 TypeScript for type safety
  • 🎨 Shadcn UI components
  • 📱 Fully responsive design

Quick Start

  1. Clone the repository
git clone https://github.com/yesabhishek/nextjs-auth-template.git
cd nextjs-auth-template
  1. Set up environment variables
# Copy the example env file
cp .env.example .env

# Add your environment variables to .env
DATABASE_URL="postgresql://..."
GITHUB_ID="your-github-id"
GITHUB_SECRET="your-github-secret"
GOOGLE_ID="your-google-id"
GOOGLE_SECRET="your-google-secret"
  1. Install dependencies
npm install
  1. Set up the database
# Run database migrations
npx prisma migrate dev
  1. Start the development server
npm run dev

Visit http://localhost:3000 to see your application running.

Integrations

This template comes with several key integrations to help you build faster:

  • PostgreSQL: Production-ready database setup
  • Prisma: Modern database ORM for TypeScript
  • Google OAuth: Sign in with Google accounts
  • GitHub OAuth: Sign in with GitHub accounts
  • Auth.js: Flexible authentication for Next.js

Project Structure

├── app/                    # Next.js App Router pages
├── components/            # Reusable UI components
├── lib/                   # Utility functions and configurations
├── prisma/               # Database schema and migrations
├── public/               # Static assets
└── styles/               # Global styles and Tailwind config

Roadmap

Current development status and upcoming features:

✅ Authentication Module ✅ Database Integration ✅ Responsive Layouts 🚧 Email Integration 🚧 Docker Support 🚧 Notification System

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you find this template helpful, consider:

  • Giving it a ⭐ on GitHub
  • Sharing it with others
  • Contributing to its improvement

Acknowledgments


Made with ❤️ by Abhishek

About

Template for NextJs application with OAuth & postgres with basic app layout :)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published