This template integrates Next.js with Firebase Authentication, providing a robust foundation for web applications requiring secure user authentication.
- Next.js 13: Utilizes the latest features of Next.js for optimal performance.
- Firebase Authentication: Implements secure user authentication using Firebase.
- TypeScript: Ensures type safety and improved developer experience.
- Tailwind CSS: Provides utility-first CSS for rapid UI development.
- ESLint & Prettier: Maintains code quality and consistency.
- Node.js (v18 or higher)
- Firebase Project
-
Clone the repository:
git clone https://github.com/Kc1t/next-firebase-auth-template.git cd next-firebase-auth-template
-
Install dependencies:
npm install # or yarn install
-
Configure environment variables:
Create a
.env.local
file in the root directory and add your Firebase configuration:NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_auth_domain NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_storage_bucket NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
-
Run the development server:
npm run dev # or yarn dev
Open http://localhost:3000 to view the application.
├── pages/ # Next.js pages
│ └── api/ # API routes
│ └── auth/ # Authentication endpoints
├── public/ # Public assets
├── src/
│ └── app/ # Application components and logic
├── .env.local # Environment variables
├── next.config.mjs # Next.js configuration
├── tailwind.config.ts # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
This project is licensed under the MIT License.