π 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/