A simple full-stack chat messaging app built with Node.js, Express, MongoDB, and EJS — supporting full CRUD operations.
- View all chats
- Create a new chat message
- Edit an existing message
- Delete a message (with confirmation popup)
- Clean and minimal UI
| Layer | Technology |
|---|---|
| Backend | Node.js, Express.js |
| Database | MongoDB, Mongoose |
| Templating | EJS |
| Styling | CSS |
| Other | Method-Override |
mini-whatsapp/
│
├── models/
│ └── chat.js # Mongoose schema
│
├── views/
│ ├── home.ejs # Home page
│ ├── chat.ejs # All chats page
│ ├── new.ejs # Create new chat
│ └── edit.ejs # Edit chat message
│
├── public/
│ ├── style.css # Stylesheet
│ └── script.js # Delete confirmation popup
│
├── index.js # Main server file
├── init.js # Seed data file
└── package.json
1. Clone the repository
git clone https://github.com/your-username/mini-whatsapp.git
cd mini-whatsapp2. Install dependencies
npm install3. Make sure MongoDB is running
mongosh4. Seed the database (optional)
node init.js5. Start the server
node index.js6. Open in browser
http://localhost:8080
| Method | Route | Description |
|---|---|---|
| GET | / |
Home page |
| GET | /chats |
Get all chats |
| GET | /chats/new |
New chat form |
| POST | /chats |
Create new chat |
| GET | /chats/:id/edit |
Edit chat form |
| PATCH | /chats/:id |
Update a chat |
| DELETE | /chats/:id |
Delete a chat |
Make sure MongoDB is running locally on:
mongodb://127.0.0.1:27017/whatsapp
Made with ❤️ by Tharak
This project is open source and free to use.