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.
- TDD
- Built With
- Tech Stack
- Key Features
- Getting Started
- Authors
- 🔭 Future Features
- 🤝 Contributing
- Show your support
- Acknowledgments
- 📝 License
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.
- 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.
Server:
- Node.js
- Express.js
Database:
- MySQL
Testing:
- Jest
- Supertest
- 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.
To get a local copy up and running, follow these steps.
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.
-
Clone the repository:
git clone https://github.com/Nelofarzabi/User_Management_System.git
-
Navigate to the project directory:
cd user-management-system
-
Set up the environment variables: Create a
.env
file in the root directory and add your database configuration and JWT secret.
Install the dependencies:
npm install or yarn install
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/.
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
👤 Nelofar Zabi
- GitHub: @githubhandle
- Twitter: @twitterhandle
- LinkedIn: LinkedIn
- Advanced Authorization: Implement fine-grained permissions for different roles.
- API Documentation: Add Swagger for API documentation.
- Integration Tests: Add more comprehensive integration tests.
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- 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.
This project is MIT licensed.