Skip to content

This project is developed using Node.JS, TypeScript, MySQL, and Sequelize ORM for managing users, roles, and permissions. The project includes comprehensive user management with JWT authentication, role-based authorization, and a focus on test-driven development.

Notifications You must be signed in to change notification settings

Nelofarzabi/User_Management_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User Management System

This project is developed using Node.JS, TypeScript, MySQL, and Sequelize ORM for managing users, roles, and permissions. The project includes comprehensive user management with JWT authentication, role-based authorization, and a focus on test-driven development.

📗 Table of Contents

TDD

This project is developed using Test-Driven Development (TDD) principles, ensuring high-quality and maintainable code. Unit tests are written using Jest to cover key functionalities such as user management, authentication, and authorization.

Built With

  • Node.js - A JavaScript runtime built on Chrome's V8 JavaScript engine.
  • TypeScript - A strict syntactical superset of JavaScript that adds optional static typing.
  • MySQL - A relational database management system based on SQL.
  • Sequelize ORM - A promise-based Node.js ORM for MySQL.
  • JWT - JSON Web Tokens for secure user authentication and authorization.

Tech Stack

Server:

  • Node.js
  • Express.js

Database:

  • MySQL

Testing:

  • Jest
  • Supertest

Key Features

  • User Management: Create, update, delete, and retrieve users with role assignments.
  • Authentication & Authorization: Secure authentication with JWT and role-based authorization.
  • API Endpoints: RESTful API endpoints for user and role management.
  • Sequelize ORM: Efficient database management with Sequelize.
  • TypeScript: Strongly typed language features for better code quality.
  • TDD: Comprehensive unit tests for all key functionalities using Jest.

Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

Before you begin, ensure you have the following installed:

  • Git: Version control system.
  • Node.js: JavaScript runtime environment.
  • npm or yarn: Package managers.
  • MySQL: Relational database management system.
  • TypeScript: Static type-checking for JavaScript.

Setup

  1. Clone the repository:

    git clone https://github.com/Nelofarzabi/User_Management_System.git
  2. Navigate to the project directory:

    cd user-management-system
  3. Set up the environment variables: Create a .env file in the root directory and add your database configuration and JWT secret.

Install

Install the dependencies:

npm install or yarn install

Usage

To run the project, execute the following command:

npm start

This will start the server in development mode. Open your browser and go to http://localhost:3000/api/v1/.

Run tests

To run tests, execute the following command:

npm test

This will run all unit tests and display the results. You can also check for TypeScript errors by running:

npm run lint

Author

👤 Nelofar Zabi

🔭 Future Features

  • Advanced Authorization: Implement fine-grained permissions for different roles.
  • API Documentation: Add Swagger for API documentation.
  • Integration Tests: Add more comprehensive integration tests.

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Thanks to my mentor @Snaaimy for his valuable feedback and support throughout the development process.
  • A big thank you to the open-source community for the tools and resources that made this project possible.

📝 License

This project is MIT licensed.

(back to top)

About

This project is developed using Node.JS, TypeScript, MySQL, and Sequelize ORM for managing users, roles, and permissions. The project includes comprehensive user management with JWT authentication, role-based authorization, and a focus on test-driven development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published