user-management-system

πŸš€ User Management System

A simple and secure User Management Web Application built using Node.js, Express, EJS, and MySQL. This project allows you to manage users with features like adding, updating, and deleting users with proper verification.

πŸ“Œ Features βž• Add new users ✏️ Rename (update username) with password verification ❌ Delete users using email & password verification πŸ“Š Home page showing total number of users πŸ“„ User list page with edit & delete options πŸ” Basic authentication for sensitive actions πŸ› οΈ Tech Stack

Backend: Node.js, Express.js Frontend: EJS (Embedded JavaScript Templates) Database: MySQL Other: Method-Override, UUID

πŸ“ Project Structure project/ β”‚ β”œβ”€β”€ views/ # EJS templates β”œβ”€β”€ public/ # Static files (CSS, JS) β”œβ”€β”€ routes/ # Route handlers β”œβ”€β”€ models/ # Database queries (if used) β”œβ”€β”€ app.js # Main server file └── package.json

Setup MySQL Database

Create a database and run:

CREATE TABLE user ( id VARCHAR(50) PRIMARY KEY, username VARCHAR(50) UNIQUE, email VARCHAR(50) UNIQUE NOT NULL, password VARCHAR(50) NOT NULL ); Start the server node app.js Open in browser http://localhost:8080 πŸ–₯️ Pages & Functionality 🏠 Home Page Displays total number of users β€œJoin” button to add a new user

πŸ“‹ User List Page Shows all users Two actions: ✏️ Edit Username ❌ Delete User ✏️ Rename User

Opens a form Takes: New Username Password If password is correct β†’ username is updated ❌ Delete User Opens a form Takes: Email Password

If credentials are correct β†’ user is deleted Redirects back to user list page

πŸ” Security Note Password verification is implemented before: Updating username Deleting user ⚠️ Currently passwords are stored in plain text (for learning purpose);

πŸ™Œ Author Nikhil Verma

site is live at https://nikhilverma56.github.io/user-management-system/