Skip to content

About

Express and MongoDB backend practice project for courses, JWT authentication, and profiles. Course write authorization remains to be added.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Course Management API

A Node.js backend practice project for course records, user authentication, and profile management.

Stack: JavaScript · Express · MongoDB / Mongoose · JWT · bcryptjs
Status: Development project.

Features in the source

  • User registration and login.
  • JWT middleware for profile routes.
  • Course CRUD operations and paginated listing.
  • Request validation for course creation.
  • Health endpoint at /health.

Authentication boundary

The current course router does not apply authentication middleware: course creation, updates, and deletion are public alongside reads. Profile routes use authentication. Add authorization to course write operations before exposing this API as a shared service.

The repository is an API backend; it does not include a frontend.

Run locally

Use a current Node.js LTS release, npm, and a local MongoDB instance or MongoDB Atlas database.

git clone https://github.com/MONOCODE-V/course-management-api.git
cd course-management-api
npm install
cp .env.example .env

Set MONGODB_URI, a strong JWT_SECRET, and optionally PORT in .env.

npm run dev
# or
npm start

Default URL: http://localhost:3000.

Routes

Area Base path Current behavior
Authentication /api/auth Registration and login
Courses /api/courses Public reads and writes
Profile /api/profile JWT-protected profile management
Health /health Process health response

For example, request GET /api/courses?page=1&limit=10 to list courses. See the router files for the authoritative middleware and endpoint behavior.

Project map

API_DOCS.md and RAILWAY_DEPLOYMENT.md contain earlier reference material; check examples against the current routes.

Next engineering steps

  1. Protect course write endpoints and enforce roles.
  2. Add integration tests for authentication, validation, pagination, and authorization.
  3. Validate deployment and database readiness before publishing a live demo.

License

MIT.

About

Express and MongoDB backend practice project for courses, JWT authentication, and profiles. Course write authorization remains to be added.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages