Skip to content

Production-ready React + Vite starter for email/password authentication using Firebase Auth and Tailwind CSS - includes sign up, email verification, login, password reset, profile update, TypeScript types, and clean routing.

License

Notifications You must be signed in to change notification settings

md-abu-kayser/react-firebase-auth-starter

Repository files navigation

React + Firebase Authentication Starter (Email/Password)

A minimal, production-ready starter for email/password authentication using React, Vite, Firebase Auth, and Tailwind CSS. This repo demonstrates clean routing, form validation, and email verification flows - ideal for showcasing authentication work to clients or hiring managers.

Highlights

  • Email/password sign up with validation, display name update, and verification email (see Resister).
  • Login with validation and password reset (see Login).
  • Central layout and routing using React Router (see Main and src/main.tsx).
  • TypeScript typings for core shapes (see User, AuthState, FormData).
  • Tailwind CSS + optional Bootstrap utilities for fast UI.
  • ESLint configured for React | TypeScript | React Refresh.

Quick demo

Tech stack

Project Structure

Full File Listing:

Installation

  1. Clone the repo and install dependencies:
git clone https://github.com/md-abu-kayser/react-firebase-auth-starter.git
npm install
  1. Run dev server:
   npm run dev

Available Scripts

  • npm run dev - start dev server
  • npm run build - production build
  • npm run preview - preview build
  • npm run lint - run ESLint
  • npm run type-check - TypeScript type-check only

Firebase Configuration

The Firebase app is created in src/firebase/firebase.config.ts. Replace the config object with your own Firebase project values to avoid exposing credentials in public projects.

Primary exported API used in the app:

default export app from src/firebase/firebase.config.ts

Project Register - Sign In

  • create user: createUserWithEmailAndPassword used in Resister
  • sign in: signInWithEmailAndPassword used in Login
  • send verification: sendEmailVerification
  • reset password: sendPasswordResetEmail
  • update profile: updateProfile

Forms and validation

  1. Validation logic is embedded in the components:
  • SignUp validation: Resister
  • Login validation: Login "These are intentionally simple and client-side only. For production, pair them with backend checks and stronger password policies."
  1. Styling
  • Tailwind entry: src/index.css
  • Tailwind config: tailwind.config.js
  • Bootstrap included from CDN via package: see import in src/main.tsx
  1. Notes and Best Practices
  • Do not commit real Firebase credentials in public repos. Use environment variables or a server-side proxy for production.
  • Expand auth flows to use secure token handling and server-side rules for sensitive operations.
  • Add unit and integration tests for auth flows and components.

License

  • This project is licensed under the terms of the MIT License.
  • You may replace or update the license as needed for client or proprietary projects.

Contact and Maintainer

If you’d like this README tailored for a specific purpose - such as hiring managers, open-source contributors, or client deliverables - feel free to request a custom tone or format.


Thank you for reviewing this project!


About

Production-ready React + Vite starter for email/password authentication using Firebase Auth and Tailwind CSS - includes sign up, email verification, login, password reset, profile update, TypeScript types, and clean routing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published