Building the Backbone – API Endpoints with Node.js (Day -16)

 

Constructing the API Layer – Connecting Data to Frontend

After understanding the full system architecture yesterday, today I stepped into the actual development phase, starting with building the API endpoints using Node.js and Express-like vanilla setup (or lightweight custom structure).

These APIs will serve as the bridge between our backend logic (like Codeforces data fetching, syncing, filtering, etc.) and the React frontend that presents it all to the user.


API Endpoints Created:

Here’s a summary of the routes I implemented today:

Student Routes

MethodEndpointDescription
GET/getStudentsIdAndHandleReturns only students' IDs and Codeforces handles
PATCH/toggleReminder/:studentIdToggles reminder email status for a student
GET/submissions/:idFetches all Codeforces submissions for a student
GET/contestHistory/:idFetches Codeforces contest history for a student
GET/Returns a list of all students
POST/Adds a new student to the database
PUT/:idUpdates a student’s information
DELETE/:idDeletes a student from the database
GET/:idGets full detail of a specific student

 What I Learned:

  • How to structure RESTful APIs for a clean and scalable backend

  • Used Express.Router() logic for modular routing

  • Implemented query params, route params, and middleware structure

  • Prepared APIs in a way that the frontend can easily fetch and display insights (e.g., contest stats, submission history)


 Gracias:

I’m thankful for the clarity that planning APIs brings. It’s not just coding — it’s designing a bridge between user experience and data.
Feeling proud of how structured the backend is shaping up. Tomorrow, I’ll move toward connecting this backend to the frontend or mocking the frontend dashboard view with test data.

~ Sanya

Comments

Popular posts from this blog

Revising GitHub CLI commands (Day1)

JavaScript Deep Dive + React Review (Day-5)

Starting the GitHub User Search App (Day - 2)