Feat/429 441 refactor architecture frontend #487
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR: Refactor Frontend Into New Module Structure & Simplify Header Navigation
Summary
This PR refactors the entire frontend into a clean module-based architecture and simplifies the Header navigation by removing clutter and relocating sub-features into their respective module pages.
The goal is to improve maintainability, reduce cognitive load, enable per-module dynamic routing, and prepare the codebase for upcoming feature flows such as the redesigned mentorship experience and workplace/job UI updates.
This is an architectural PR with no functional feature changes but many structural improvements.
Key Changes
1. Introduced New Module-Oriented Folder Structure
Reorganized
src/into a clear domain-driven layout:2. Updated Routing Into Per-Module Dynamic Routes
Each module now owns its route tree:
modules/jobs/routes.tsxmodules/mentorship/routes.tsxmodules/workplaces/routes.tsxmodules/forum/routes.tsxImported and composed in
app/router.tsx.This reduces bundle size and improves clarity.
3. Header Navigation Simplified
The Header was cluttered with many unrelated navigation points.
Now:
Mentorship contains:
Jobs contains:
Workplaces contains:
The top navigation now shows only top-level modules:
All secondary flows live inside their respective module pages.
4. All Imports Updated to Module Paths
Refactored all local imports:
../../components/...→@/modules/...modules/shared/.5. Removed Legacy Duplicated Components
Deprecated folders removed:
src/pages/*src/components/*(moved into modules/shared or module-specific)How to Test
/jobs/:id/workplaces/:id/mentorship/chat/:threadIdRelated Issues
Checklist
Notes
This PR introduces BREAKING changes to file paths and imports.
Other feature branches should rebase on top of this refactor.
Right now, submodules are implemented as tabs, which is not providing the best UI, it will be reworked and then added in a follow up issue with better UI.