/Task-Fragmentation

🌙 TheMoonDevs Assignment Project 🚀

Primary LanguageTypeScript

🚀 TheMoonDevs Startup Assignment

Welcome to TheMoonDevs startup assignment! 🚀 This project aims to enhance readability and maintainability by refactoring a medium-sized page with overloaded UI and functionality.

Assignment Choices

I chose the second assignment option: Fragment the UI into selective components. This decision aimed to improve maintainability and readability.

⚙️ My Reasons for Fragmentating it Like That

  • 🔍 Improved Readability: Breaking down the UI into components makes it easier to comprehend and manage.

  • 🧩 Modular Code: Each component now serves a specific purpose, leading to a more modular and organized codebase.

  • 🌐 Scalability: The fragmented structure allows for easy scalability, making it simpler to add or modify features.

  • 💡 Maintenance: Future maintenance becomes more straightforward, as each component handles a specific aspect of the application.

  • 👁️ Clear Separation of Concerns: Components are responsible for discrete functionality, promoting a clear separation of concerns.

Before & After

Check out the before folder for the original code snippet and the after folder for the improved, fragmented version.

Project Structure

📦 TheMoonDevs-Startup-Assignment
 ┣ 📂 before
 ┃ ┗ 📜 Page.tsx
 ┣ 📂 after
 ┃ ┗ 📜 Page.tsx
 ┃ ┣ 📂 components
 ┃ ┃ ┣ 📜 Button.tsx
 ┃ ┃ ┣ 📜 BurnStatsContainer.tsx
 ┃ ┃ ┣ 📜 ChairSelectorModal.tsx
 ┃ ┃ ┣ 📜 TransactionTable.js
 ┃ ┃ ┗ 📜 AppToast.tsx
 ┃ ┃ ┗ 📜 Header.tsx

Description

This project tackles the challenge of refactoring a cluttered UI and consolidating functionality into manageable components. The result is a sleek, modularized codebase that's easier to read and maintain.

Getting Started

  1. Clone the repository.
  2. Explore the before and after folders to witness the transformation.
  3. Dive into the code to see how components were selectively crafted for better readability.

"The only way to do great work is to love what you do." - Steve Jobs 🌟