A simple web-based Customer Management System that allows you to manage customer data with basic CRUD operations.
- View all customers
- Add new customer
- Update customer information
- Delete customer
- Search customer by ID
- Backend: Node.js with Express.js
- Database: MySQL
- Frontend: HTML, Bootstrap 5, Vanilla JavaScript
Customer-Management-ExpressJS-Backend/– Node.js Express backendCustomer-Management-Native-Frontend/– HTML + Bootstrap + JS frontend
- Node.js (v14 or higher)
- npm or yarn
- MySQL
- Web browser
-
Clone the repository:
git clone https://github.com/Nugi29/test-express-simple-customer-management-sys.git
-
Database Setup:
- Create a MySQL database named
customer_manage - Update database credentials in
Customer-Management-ExpressJS-Backend/db.jsif needed
-- Run these commands in your MySQL client CREATE DATABASE IF NOT EXISTS customer_manage; USE customer_manage; CREATE TABLE customer ( id INT AUTO_INCREMENT PRIMARY KEY, salary DECIMAL(10, 2) NOT NULL, address VARCHAR(255) NOT NULL, name VARCHAR(100) NOT NULL ); -- Insert sample data (based on your existing data) INSERT INTO customer (salary, address, name) VALUES (30000, 'Gampaha', 'Kamal'), (73000, '34/2, Main Street, Galle', 'Sunil Fernando'), (105000, '88, Temple Road, Jaffna', 'Ravi Kanth'), (65000.25, '21, Hospital Road, Matara', 'Chathurika Silva'), (99000, '56, Negombo Road, Wattala', 'Tharidu Jayasuriya'), (87000.6, '5, Stanley Thilakarathne Mawatha, Nugegoda', 'Lakshmi Wijesinghe'), (78000, '14, Sea Street, Negombo', 'Ruwan De Silva'), (96000.85, '98, Malwatta Road, Kandy', 'Isuru Madushanka'), (69000, '3, Dharmapala Mawatha, Anuradhapura', 'Dilani Herath'), (85000, 'No. 45, Galle Road, Colombo 03', 'Kamal Perera'), (92000.5, '12/1, Kandy Road, Kurunegala', 'Nimali Rajapaksha')
- Create a MySQL database named
-
Backend Setup:
- Navigate to the backend directory:
cd Customer-Management-ExpressJS-Backend - Install dependencies:
npm install
- Start the server:
node server.js
- The backend will be running on
http://localhost:3000
- Navigate to the backend directory:
-
Frontend Setup:
- Open
Customer-Management-Native-Frontend/index.htmlin your web browser - Or serve it using a local server for better development experience
- Open
GET /customer/get-all- Retrieve all customersPOST /customer/add- Add a new customerPUT /customer/update-customer- Update customer informationDELETE /customer/delete/{id}- Delete a customerGET /customer/search-by-id/{id}- Search for a customer by ID
View all customers in a responsive Bootstrap table.
Simple form to add new customer with validation.
Search functionality to find customers by ID.
Edit existing customer information.
This project is open source, educational purpose you can get and edit anything.
⭐️ From Nugi29