Skip to content

A simple authentication system built with the MERN stack. Created as a hands-on project to learn and apply authentication principles in a full-stack application.

License

Notifications You must be signed in to change notification settings

Sh1v4nk/Simple-Authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Authentication

code style: prettier MIT License

A secure authentication system with React frontend and Express.js backend, featuring JWT tokens, email verification, and password reset.

Features

  • 🔐 Secure Authentication - JWT tokens with HTTP-only cookies
  • 📧 Email Verification - Account activation via email
  • 🔑 Password Reset - Secure password recovery
  • 🚪 Multi-device Logout - Sign out from all devices
  • 🐳 Docker Support - Complete containerized development
  • Modern Stack - React, TypeScript, Express.js, MongoDB

Tech Stack

Backend: Express.js, TypeScript, MongoDB, JWT, bcrypt, Nodemailer
Frontend: React, TypeScript, Tailwind CSS, Zustand, Vite
Tools: Docker, Bun, Zod validation

Prerequisites

  • Node.js or Bun
  • Docker

Quick Start

  1. Clone the repository & navigate to the project directory
  git clone https://github.com/Sh1v4nk/Simple-Authentication.git
  cd Simple-Authentication
  1. Start the application:

Docker (Recommended)

docker compose up

Access the app at http://localhost:5173

Manual Setup

# Backend
cd backend && bun install && bun run dev

# Frontend (new terminal)
cd frontend && bun install && bun run dev

Project Structure

Simple-Authentication/
├── backend/
├── frontend/
└── docker-compose.yml

Environment Variables

Create .env files in both backend/ and frontend/ directories. See .env.example files for required variables.

Environment Variables for Docker

The docker-compose.yml includes default environment variables for development.


Sign Up Page

Sign Up Page

Sign In Page

Sign In Page

Forgot Password Page

Forgot Password Page


Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add 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.


Thank you for visiting my Simple-Authentication repository. If you have any suggestions or feedback, feel free to reach out to me.

Connect with me:

About

A simple authentication system built with the MERN stack. Created as a hands-on project to learn and apply authentication principles in a full-stack application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages