Session Plan
Module 1: Introduction to NodeJS & REST APIs
Practical (6 hours):
- Install NodeJS, npm, and set up a basic project environment (2 hours).
- Write a simple NodeJS HTTP server using the http module (2 hours).
- Install and configure Postman; test basic GET/POST requests (2 hours).
Project:
- Discuss project ideas (Student Attendance API, Blog Platform Backend, etc.).
- Form groups and finalize project topics.
Materials:
Outcomes Covered: CO1 (Introduction to NodeJS and REST concepts)
Module 1: Introduction to NodeJS & REST APIs (continued)
Practical (6 hours):
- Explore npm packages and project structure (2 hours).
- Create a basic REST API with NodeJS (GET/POST endpoints) (2 hours).
- Test APIs with Postman, focusing on JSON payloads and status codes (2 hours).
Project:
- Define project requirements and create a basic project repository.
Outcomes Covered: CO1, CO2 (Basic REST API development)
Module 2: ExpressJS – Building REST APIs
Practical (6 hours):
- Set up an ExpressJS application with basic routing (2 hours).
- Implement GET and POST routes for a sample resource (e.g., users) (2 hours).
- Add middleware for logging and JSON parsing (2 hours).
Project:
- Design initial API endpoints for the chosen project.
Outcomes Covered: CO2 (ExpressJS routing and middleware)
Module 2: ExpressJS – Building REST APIs (continued)
Practical (6 hours):
- Implement PUT and DELETE routes for the sample resource (2 hours).
- Handle query parameters and route parameters (2 hours).
- Test all routes with Postman, ensuring proper responses (2 hours).
Project:
- Implement basic GET/POST routes for the project.
Outcomes Covered: CO2 (Complete RESTful routes)
Module 3: MongoDB Integration
Practical (6 hours):
- Set up MongoDB locally or on MongoDB Atlas (2 hours).
- Connect NodeJS to MongoDB using Mongoose (2 hours).
- Create a basic Mongoose schema for a resource (e.g., students) (2 hours).
Project:
- Define MongoDB schemas for the project’s resources.
Outcomes Covered: CO3 (MongoDB and Mongoose setup)
Module 3: MongoDB Integration (continued)
Practical (6 hours):
- Perform basic CRUD operations using Mongoose (2 hours).
- Test MongoDB CRUD operations via Express routes (2 hours).
- Handle MongoDB connection errors and async/await (2 hours).
Project:
- Integrate MongoDB with project routes for basic CRUD.
Outcomes Covered: CO3 (MongoDB CRUD operations)
Module 4: RESTful CRUD with Mongoose
Practical (6 hours):
- Develop a full CRUD API for a resource (e.g., products) (3 hours).
- Implement input validation using Mongoose schemas (2 hours).
- Add proper status codes and error responses (1 hour).
Project:
- Implement CRUD endpoints for one project resource.
Outcomes Covered: CO2, CO3 (Full CRUD API)
Module 4: RESTful CRUD with Mongoose (continued)
Practical (6 hours):
- Enhance CRUD API with query-based filtering (2 hours).
- Implement error handling middleware for consistent responses (2 hours).
- Test API robustness with edge cases in Postman (2 hours).
Project:
- Add error handling and validation to project CRUD endpoints.
Outcomes Covered: CO2, CO3 (Advanced CRUD and error handling)
Midterm Preparation and Review
Practical (6 hours):
- Review NodeJS, ExpressJS, and MongoDB concepts (2 hours).
- Practice building a small REST API from scratch (3 hours).
- Q&A and troubleshooting session for practical issues (1 hour).
Project:
- Midterm project progress review and feedback.
Outcomes Covered: CO1, CO2, CO3
Note: Midterm examinations start on August 25, 2025.
Module 5: Authentication and Authorization
Practical (6 hours):
- Implement user registration and login with bcrypt (2 hours).
- Generate and verify JWT for authentication (2 hours).
- Protect routes using JWT middleware (2 hours).
Project:
- Add user authentication to the project.
Outcomes Covered: CO4 (JWT-based authentication)
Module 5: Authentication and Authorization (continued)
Practical (6 hours):
- Implement role-based authorization (e.g., admin vs. user) (2 hours).
- Secure sensitive routes with middleware (2 hours).
- Use environment variables for sensitive data (2 hours).
Project:
- Add role-based access control to project routes.
Outcomes Covered: CO4 (Authorization and security)
Module 6: Advanced REST API Features
Practical (6 hours):
- Implement pagination for resource endpoints (2 hours).
- Add filtering and sorting capabilities (2 hours).
- Test advanced features with Postman (2 hours).
Project:
- Integrate pagination and filtering into project APIs.
Outcomes Covered: CO5 (Pagination and filtering)
Module 6: Advanced REST API Features (continued)
Practical (6 hours):
- Implement file uploads using Multer (2 hours).
- Add rate-limiting middleware for API security (2 hours).
- Test file upload and rate-limiting functionality (2 hours).
Project:
- Add file upload or rate-limiting to the project as needed.
Outcomes Covered: CO5 (File uploads and rate-limiting)
Module 7: Mini Project + Deployment
Practical (6 hours):
- Set up Swagger for API documentation (2 hours).
- Prepare project for deployment (e.g., environment setup) (2 hours).
- Deploy API to Render, Heroku, or Vercel (2 hours).
Project:
- Finalize project API endpoints and documentation.
Outcomes Covered: CO6, CO7 (API documentation and deployment)
Module 7: Mini Project + Deployment (continued)
Practical (6 hours):
- Test deployed API for functionality and performance (2 hours).
- Optimize project structure and code quality (2 hours).
- Finalize Swagger documentation and error handling (2 hours).
Project:
- Complete project implementation and prepare for evaluation.
Outcomes Covered: CO6, CO7 (Project completion and optimization)
Project Evaluation and Wrap-Up
Practical (6 hours):
- Conduct project presentations and API demos (3 hours).
- Evaluate code quality, deployment, and documentation (2 hours).
- Course review and feedback session (1 hour).
Project:
Outcomes Covered: CO7 (Project evaluation)