This is a simple full-stack user management system built using Node.js, Express, MySQL, and EJS. It demonstrates the implementation of basic CRUD operations with user-friendly UI templates and password-protected edits/deletes.
- 🔢 Dashboard with User Count
- 🧾 View All Users (Sorted by Recent)
- ➕ Add New User (with Faker UUID)
- ✏️ Edit Username (with Password Verification)
- ❌ Delete User (with Password Verification)
- 🎨 EJS Templating for Views
- 🛡️ Method Override for PATCH & DELETE
Technology | Usage |
---|---|
Node.js | JavaScript runtime |
Express.js | Web framework for Node.js |
MySQL | Relational database |
mysql2 | MySQL client for Node.js |
EJS | Templating engine |
Faker.js | Generate random user data |
Method-Override | Override POST to use PATCH/DELETE |
Bootstrap | For UI styling (optional) |
Create a database named user_db
Run this SQL to create the users table: CREATE TABLE users ( userid VARCHAR(255) PRIMARY KEY, username VARCHAR(255), email VARCHAR(255), password VARCHAR(255), created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );