Skip to content

coding-katas/firebase-nextjs-auth

Repository files navigation

Next.js Firebase Authentication Starter

A complete authentication starter template built with Next.js 15, Firebase Authentication, Firestore, and Shadcn UI - replacing the Better Auth + Postgres setup with Firebase on GCP.

Next.js Firebase TypeScript Tailwind CSS

✨ Features

  • 🔐 Firebase Authentication - Email/password and Google OAuth
  • 🔥 Firestore Database - Real-time NoSQL database for user data
  • 🎨 Shadcn UI - Beautiful, accessible component library
  • Next.js 15 - App Router, Server Components, TypeScript
  • 🎯 Protected Routes - Middleware-based route protection
  • 📱 Responsive Design - Mobile-first, beautiful UI
  • 🔒 Secure - Server-side authentication with Firebase Admin SDK
  • 🚀 Production Ready - Environment-based configuration

🚀 Quick Start

Prerequisites

  • Node.js 18+ and npm
  • A Google account for Firebase
  • Basic knowledge of React and Next.js

Installation

  1. Clone or download this repository
git clone <your-repo-url>
cd nextjs-hello-world
  1. Install dependencies
npm install
  1. Set up Firebase (See detailed guide below)

    npm run dev
    
  2. Open your browser: Navigate to http://localhost:3000 to see the "Hello World" message.

Project Structure

  • app/layout.tsx: Defines the layout component for the application.
  • app/page.tsx: Main page that displays "Hello World".
  • styles/globals.css: Contains global CSS styles.
  • package.json: Lists dependencies and scripts.
  • tsconfig.json: TypeScript configuration.
  • next.config.js: Next.js configuration settings.
  • next-env.d.ts: Type definitions for Next.js.
  • .eslintrc.json: ESLint configuration.
  • .gitignore: Specifies files to ignore by Git.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors