eduweb icon indicating copy to clipboard operation
eduweb copied to clipboard

Hardcoded Content and Lack of Component Scalability

Open codeCraft-Ritik opened this issue 8 months ago • 0 comments

Summary:

The "Courses" and "Categories" sections are currently hardcoded in HTML, making the project difficult to maintain or scale as a real-world educational platform.

Detailed Description :

The Problem: Every time a new course is added, the developer must manually copy-paste large blocks of HTML. This is prone to errors (like broken tags) and makes it impossible to connect this frontend to a real database or API in the future.

Proposed Solution :

  • Refactor the course/category data into a JSON object or a JavaScript array.
  • Use a simple JavaScript forEach loop to dynamically render the cards into the DOM.
  • Create a single "Card Template" that can be reused across the site.

Impact : This transforms the project from a "static landing page" into a dynamic frontend architecture. It makes the code much cleaner (DRY - Don't Repeat Yourself) and prepares the project for integration with a backend (Node.js/Firebase).

codeCraft-Ritik avatar Mar 18 '26 04:03 codeCraft-Ritik