Skip to content

YousseifNady/node-express-crud-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express Users & Courses API

Introduction

This project is a RESTful API built with Express.js for managing users and courses. It demonstrates core backend development concepts including CRUD operations, routing, middleware usage, and database integration with MongoDB.

The project is designed as a learning backend system and follows clean and modular structure principles to keep the codebase maintainable and scalable.


Features

  • User management (Create, Read, Update, Delete)
  • Course management (CRUD operations)
  • MongoDB integration using Mongoose
  • Structured routing with Express Router
  • Input validation and error handling
  • RESTful API design
  • Modular project structure (controllers, routes, models)

Tech Stack

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose

Project Structure

controllers/   # Business logic
models/        # Database schemas
routes/        # API routes
config/         # Database connection
middlewares/   # Custom middleware

Getting Started

Clone the repository

git clone https://github.com/YousseifNady/express-users-courses-crud.git
cd express-users-courses-crud

Install dependencies

npm install

Run the server

npm run dev

Server will run on:

http://localhost:3000

API Endpoints

Users

  • GET /users
  • GET /users/:id
  • POST /users
  • PUT /users/:id
  • DELETE /users/:id

Courses

  • GET /courses
  • GET /courses/:id
  • POST /courses
  • PUT /courses/:id
  • DELETE /courses/:id

Notes

This project is intended for learning purposes and demonstrates basic backend architecture using Express.js and MongoDB.

Future improvements may include:

  • Authentication (JWT)
  • Role-based access control
  • Input validation library (Joi / Zod)
  • Pagination & filtering

About

RESTful CRUD API built with Express.js for managing users and courses, featuring clean routing, validation, and MongoDB integration.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Contributors