Loading repository data…
Loading repository data…
Abhrankan-Chakrabarti / repository
Welcome to my repository of solved lessons from the Winternship 2025 Case Studies.
Welcome to my repository of solved lessons from the Winternship 2025 Case Studies.
This repo showcases my progress in mastering modern web development concepts through practical, hands-on challenges across TypeScript, React (Vite), MongoDB, and now Express.
The Winternship 2025 program provides structured case studies across:
Each case study bridges theory and practice with real-world coding exercises.
CaseStudy1 (TypeScript)
react/
Vite-based React app (my-react-app)
Vite-based React app (my-task-app)
mongodb/
Case Study 1: MovieFlix Analytics (solution.js)
$match, $group, $project, $sort, $limitmongosh or Node.js driverCase Study 2: FastBite CRUD Challenge (menu-crud.js)
insertOne, find, updateOne, deleteOneupsert and $addToSet for repeatable runsmongosh or Node.js driverCase Study 3: FinTrust Transactions & Refunds (refund-transaction.js, seed-refund.js)
express/
app.js)
npm init and npm install express/ (homepage), /events (list of activities), /contact (JSON with email + phone)res.send() vs res.json() responsesnode app.jsapp.js, routes/)
routes/events.js, routes/classes.js, routes/contact.jsapp.js with app.use('/path', router)node app.jsapp.js, routes/products.js)
PATCH /products/:id/inStock to update only the inStock field400 Bad Request if inStock is missing or not a boolean404 Not Found if product ID does not existnode app.jsapp.js, routes/transfer.js)
POST /transfer to move points between accounts404 Not Found if sender/receiver not found, 400 Bad Request if invalid UUIDs or insufficient points200 OK and updated balances on successnode app.jsapp.js, routes/baking.js)
POST /baking/start to begin baking an orderClone the repository and run any case study as described below.
Most lessons can be run directly by compiling the TypeScript file and executing the generated JavaScript:
cd Internship_caseStudies/CaseStudy1
tsc lesson-name.ts
node lesson-name.js
Lesson 19 is a standalone TypeScript project and uses external dependencies.
cd Internship_caseStudies/CaseStudy1/nineteen
npm install
tsc
node dist/index.js
This will install required dependencies (typedi, reflect-metadata), compile the project using the local tsconfig.json, and run the output from the dist directory.
cd Internship_caseStudies/react/my-react-app
npm install
npm run dev
This will start the Vite dev server and open the app in your browser.
cd Internship_caseStudies/react/my-task-app
npm install
npm run dev
This will start the Vite dev server and open the app in your browser.
You can then interact with the Task Manager mini-app: add tasks, toggle completion, and delete tasks.
cd Internship_caseStudies/mongodb
npm install
node solution.js
cd Internship_caseStudies/mongodb
npm install
node menu-crud.js
cd Internship_caseStudies/mongodb
npm install
node seed-refund.js # seed sample users + transaction
node refund-transaction.js # run refund workflow
cd Internship_caseStudies/express/lesson1
npm install
node app.js
Then visit:
cd Internship_caseStudies/express/lesson2
npm install
node app.js
Then visit:
cd Internship_caseStudies/express/lesson3
npm install
node app.js
Then test:
# Valid update
curl -X PATCH http://localhost:3000/products/1/inStock \
-H "Content-Type: application/json" \
-d '{"inStock": false}'
# Invalid update (missing or wrong type)
curl -X PATCH http://localhost:3000/products/1/inStock \
-H "Content-Type: application/json" \
-d '{}'
curl -X PATCH http://localhost:3000/products/1/inStock \
-H "Content-Type: application/json" \
-d '{"inStock": "yes"}'
cd Internship_caseStudies/express/lesson4
npm install
node app.js
Then test:
# Valid transfer
curl -X POST http://localhost:3000/transfer \
-H "Content-Type: application/json" \
-d '{"fromCustomerId":"11111111-1111-4111-8111-111111111111","toCustomerId":"22222222-2222-4222-8222-222222222222","points":100}'
# Invalid UUIDs
curl -X POST http://localhost:3000/transfer \
-H "Content-Type: application/json" \
-d '{"fromCustomerId":"123","toCustomerId":"456","points":50}'
# Insufficient points
curl -X POST http://localhost:3000/transfer \
-H "Content-Type: application/json" \
-d '{"fromCustomerId":"22222222-2222-4222-8222-222222222222","toCustomerId":"11111111-1111-4111-8111-111111111111","points":9999}'
cd Internship_caseStudies/express/lesson5
npm install
node app.js
Then test:
# Start baking an order
curl -X POST http://local
GET /baking/status/:id to check baking status by order ID400 Bad Request if orderId or flavor missing, 404 Not Found if order not found201 Created on start and 200 OK on status retrievalnode app.jsapp.js, routes/discharge.js)
insuranceApprovalCheck middleware to enforce req.body.insuranceApproved403 Forbidden when insurance approval is missingnode app.jsapp.js, routes/applications.js)
POST /applications endpoint to submit applicationsapplicantType is "art", portfolioLink must be a valid URL400 Bad Request with message "A valid portfolio link is required for art applicants." if missing or invalid201 Created and application payload on successnode app.jsapp.js, models/Book.js, repositories/, services/BookService.js, controllers/BookController.js)
POST /books/:id/borrow → borrow a bookPOST /books/:id/return → return a bookisBorrowed flag) when returnednode app.jsapp.js, models/Course.js, repositories/, services/CourseService.js, controllers/CourseController.js)
delete(courseId) method in repository to remove courses from storagedeleteCourse method to enforce rules (course must exist before deletion)DELETE /courses/:id endpoint for admins200 OK with success message or 404 Not Found if course does not existnode app.jsapp.js, services/, controllers/AppointmentController.js, tests/AppointmentService.test.js)
BillingService interface and StripeBillingService implementationbookAppointment charges patient and sends notification when bookingPOST /appointments/book endpointnode app.js