Skip to content

About

A professional full-stack CRUD application built with Node.js, Express, MongoDB, and EJS. Features a modern animated UI, real-time dashboard with statistics, smart suggestions engine, and complete RESTful API. Perfect for learning full-stack development!

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Node.js CRUD API with Modern UI

Node.js Express.js MongoDB Bootstrap JavaScript

GitHub stars GitHub forks GitHub issues GitHub license

A Professional Full-Stack CRUD Application with Modern UI/UX

Live Demo: https://smart-crud-dashboard.onrender.com

πŸ“Œ Table of Contents

✨ Features

Backend Features

  • βœ… Complete CRUD Operations (Create, Read, Update, Delete)
  • βœ… RESTful API Architecture
  • βœ… MongoDB Database Integration
  • βœ… Error Handling & Validation
  • βœ… CORS Enabled
  • βœ… Environment Ready

Frontend Features

  • 🎨 Modern Animated UI
  • πŸ“± Fully Responsive Design
  • πŸ“Š Real-time Dashboard with Statistics
  • πŸ’‘ Smart Suggestions Based on Data
  • 🎭 Smooth Animations & Transitions
  • 🌈 Gradient Color Schemes
  • πŸ“ˆ User Analytics Dashboard

UI Components

  • ✨ Hero Section with Animated Welcome Message
  • πŸ“Š Statistics Cards with Counters
  • πŸ‘₯ User Management Table
  • 🎯 Smart Suggestions Engine
  • πŸ”„ Real-time Data Updates
  • 🎨 Bootstrap 5 Components

πŸ› οΈ Tech Stack

Backend

  • Node.js - JavaScript Runtime
  • Express.js - Web Framework
  • MongoDB - NoSQL Database
  • Mongoose - ODM Library
  • CORS - Cross-Origin Resource Sharing

Frontend

  • EJS - Template Engine
  • Bootstrap 5 - CSS Framework
  • CSS3 - Custom Animations
  • JavaScript (ES6+) - Client-side Logic
  • Font Awesome - Icons

πŸ“¦ Installation

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB (local or cloud)
  • npm or yarn package manager

Step-by-Step Setup

  1. Clone the repository
git clone https://github.com/Nadeer-Ansari/Nodejs-CRUD-API.git
cd Nodejs-CRUD-API
  1. Install dependencies
npm install
  1. Setup MongoDB
  • Local MongoDB: Make sure MongoDB is running on mongodb://127.0.0.1:27017

  • OR use MongoDB Atlas (cloud)

  • Update the connection string in database/db.js

  1. Run the application
# Development mode with auto-reload
npm run dev

# Production mode
npm start
  1. Access the application

πŸš€ API Endpoints

Method Endpoint Description Status
GET /api/users Get all users βœ…
GET /api/users/:id Get single user βœ…
POST /api/users Create new user βœ…
PUT /api/users/:id Update user βœ…
DELETE /api/users/:id Delete user βœ…

Sample API Request/Response

POST /api/users

{
  "name": "John Doe",
  "age": 25,
  "place": "New York"
}

Response

{
  "message": "User Created Successfully!",
  "user": {
    "_id": "607f1f2b9f1b2c3d4e5f6a7b",
    "name": "John Doe",
    "age": 25,
    "place": "New York",
    "__v": 0
  }
}

🎯 Project Structure

Nodejs-CRUD-API/
β”‚
β”œβ”€β”€ πŸ“ public/
β”‚   β”œβ”€β”€ πŸ“ css/
β”‚   β”‚   └── style.css          # Custom styles & animations
β”‚   └── πŸ“ js/
β”‚       └── script.js          # Frontend logic & dashboard
β”‚
β”œβ”€β”€ πŸ“ views/
β”‚   β”œβ”€β”€ header.ejs             # Navigation & head section
β”‚   β”œβ”€β”€ footer.ejs             # Scripts & closing tags
β”‚   β”œβ”€β”€ home.ejs               # Dashboard homepage
β”‚   β”œβ”€β”€ adduser.ejs            # Add user form
β”‚   β”œβ”€β”€ showuser.ejs           # User listing table
β”‚   └── updateuser.ejs         # Edit user form
β”‚
β”œβ”€β”€ πŸ“ models/
β”‚   └── usermodel.js           # Mongoose schema
β”‚
β”œβ”€β”€ πŸ“ database/
β”‚   └── db.js                  # MongoDB connection
β”‚
β”œβ”€β”€ index.js                   # Main application file
β”œβ”€β”€ package.json               # Dependencies
└── README.md                  # Documentation

🎨 UI Features

Dashboard Statistics

  • Total Users Count - Real-time user statistics
  • Average Age - Demographic analysis
  • Unique Locations - Geographic distribution
  • Recent Users - Latest 5 members

Smart Suggestions Engine

The application intelligently analyzes your data and provides:

  • πŸ“ˆ Growth suggestions based on user count
  • πŸ‘₯ Age demographic insights
  • 🌍 Geographic diversity recommendations
  • πŸ’‘ Quick tips for better management

Animations & Effects

  • 🎭 Fade-in animations on page load
  • πŸ”„ Hover effects on cards and buttons
  • πŸ“Š Smooth counter animations
  • πŸ’« Loading spinners and transitions
  • 🎨 Gradient backgrounds and shadows

πŸ§ͺ Testing

Using Postman

  • Import the API endpoints

Test CRUD operations:

  • POST /api/users - Create user

  • GET /api/users - Get all users

  • PUT /api/users/:id - Update user

  • DELETE /api/users/:id - Delete user

  • Check response status codes (200, 201, 400, 404)

Browser Testing

  • Dashboard statistics update automatically
  • Forms validate input data
  • Delete confirmation dialogs
  • Real-time table updates
  • Responsive design on different screen sizes

πŸ“± Responsive Design

Device Breakpoint Features
Mobile < 768px Stacked layout, smaller buttons, hamburger menu
Tablet 768px - 1024px Adjusted spacing, 2-column layout
Desktop > 1024px Full dashboard view, 3-4 column layout

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)
  • Opera (latest)

πŸ”§ Environment Variables

Create a .env file in the root directory:

PORT=9000
MONGODB_URI=mongodb://127.0.0.1:27017/cdac
NODE_ENV=development

πŸš€ Deployment

Deploy on Render (Recommended for Node.js)

  • Sign up at render.com
  • Click "New +" β†’ "Web Service"
  • Connect your GitHub repository

Configure:

  • Name: nodejs-crud-api
  • Environment: Node
  • Build Command: npm install
  • Start Command: node index.js
  • Add environment variables
  • Click "Create Web Service"

Deploy on Vercel

npm i -g vercel
vercel --prod

Deploy on Netlify

npm i -g netlify-cli
netlify deploy --prod

Deploy on Render

https://smart-crud-dashboard.onrender.com


🀝 Contributing

Contributions are what make the open-source community amazing! Any contributions you make are greatly appreciated.

  • Fork the Project

  • Create your Feature Branch

git checkout -b feature/AmazingFeature
  • Commit your Changes
git commit -m 'Add some AmazingFeature'
  • Push to the Branch
git push origin feature/AmazingFeature
  • Open a Pull Request

Contribution Guidelines

  • Update the README.md with details of changes
  • Add comments to your code
  • Follow the existing code style
  • Test your changes thoroughly

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2024 Nadeer Ansari

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions...

πŸ‘¨β€πŸ’» Author

Nadeer Ansari


πŸ™ Acknowledgments

  • Node.js - JavaScript Runtime
  • Express.js - Web Framework
  • MongoDB - Database
  • Bootstrap - UI Framework
  • Font Awesome - Icons
  • All contributors and users

πŸ“Š Project Status

Feature Status
Backend API βœ… Complete
Frontend UI βœ… Complete
Dashboard Analytics βœ… Complete
Smart Suggestions βœ… Complete
Responsive Design βœ… Complete
Documentation βœ… Complete
Deployment πŸš€ Ready

🎯 Future Enhancements

  • User Authentication & Authorization
  • Search and Filter functionality
  • Pagination for large datasets
  • Export data to CSV/PDF
  • User profile pictures upload
  • Email notifications
  • Advanced analytics charts
  • Dark mode toggle
  • Multi-language support
  • Real-time WebSocket updates

πŸ› Known Issues

None currently. Report issues here


πŸ“ž Support

For support, email anadeer13@gmail.com or open an issue on GitHub.


⭐ Show your support

Give a ⭐️ if this project helped you!

About

A professional full-stack CRUD application built with Node.js, Express, MongoDB, and EJS. Features a modern animated UI, real-time dashboard with statistics, smart suggestions engine, and complete RESTful API. Perfect for learning full-stack development!

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages