Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auth System

A scalable authentication system using Next.js, Nodejs, TypeScript, GraphQL, JWT, MongoDB, and Docker, complete with email verification, password reset, and CI/CD integration.

Open in Gitpod

example workflow License

Table of Contents

Features

  • User Registration: Register new users with email verification.
  • Login: Secure login process with JWT.
  • Forgot Password: Recover access to account if user they forget their password.
  • Email Verification: Verify user email addresses during registration to enhance security and prevent fake accounts.
  • Profile Management: Enable users to view and update their profile information.
  • Password Reset: Allow users to easily reset their passwords.
  • JWT Authentication: Use JSON Web Tokens for secure authentication, including support for access and refresh tokens.

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/UtkarshAhuja2003/auth.git
    cd auth
  2. Create environment files:

    cp client/.env.sample client/.env
    cp users/.env.sample users/.env
  3. Start the services using Docker Compose:

    docker-compose up --build -d

Usage

After starting, navigate to http://localhost/user/register to access the client. APIs are accessible at http://localhost/users for the users microservice.

For local development, refer to the individual READMEs in each service directory:

Each README provides step-by-step instructions for environment configuration, running the service locally, and troubleshooting common issues.

Project Structure

auth/
 ├── .github/workflows     # GitHub Actions CI/CD
 ├── client                # Next.js client with authentication flows
 ├── proxy                 # Nginx reverse proxy configurations
 ├── users                 # Backend microservice for user management
 ├── docker-compose.yml
 ├── gitpod.yml
 ├── LICENSE
 └── README.md

Tech Stack

  • Frontend: Next.js, TypeScript, TailwindCSS
  • Backend: Node.js, GraphQL, JWT, MongoDB
  • Infrastructure: Docker, Docker Compose, Nginx
  • CI/CD: GitHub Actions

Key Dependencies

  • next, react
  • express, graphql, @apollo/server, jsonwebtoken
  • mongoose, bcrypt, nodemailer

Screenshots

image

image image image

Demo

Watch the demo

Contributing

  1. Fork the repository
  2. Create your branch:
    git checkout -b feature/YourFeature
  3. Commit your changes:
    git commit -m 'Add YourFeature'
  4. Push to the branch:
    git push origin feature/YourFeature
  5. Open a pull request

License

This project is licensed under the MIT License.

About

Authentication system using Next.js, Nodejs, TypeScript and GraphQL

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages