refactor(arch): migrate to feature-driven modular architecture and comprehensive documentation - #212
Merged
Merged
Conversation
…umentation - Reorganized codebase under `src/` following a Feature-Driven Scalable Next.js Architecture: - `src/features/` (domain modules: comparison, developer, leaderboard, scoring with colocated components, services, tests, types, and barrel exports) - `src/lib/` (infrastructure adapters: cache, db, geo, github, i18n, logger, seo) - `src/components/` (shared domain-agnostic UI: ui, layout, providers, seo) - `src/app/` (thin routing controllers, layouts, and API routes) - `src/locales/`, `src/data/`, `src/types/`, `src/utils/` - Updated path aliases in `tsconfig.json`, `tailwind.config.ts`, and `vitest.config.ts` (`@/features/*`, `@/lib/*`, `@/components/*`, etc.). - Updated script paths in `scripts/calculate-next-country.ts`, `scripts/init-db.ts`, and `scripts/validate-locales.js`. - Created comprehensive `ARCHITECTURE.md` documentation detailing system design, sequence flows, encapsulation rules, and step-by-step contributor cookbooks. - Updated `README.md`, `CONTRIBUTING.md`, and `algorithm.md` to align with the new architecture. - Replaced hardcoded machine/absolute paths in markdown files with relative paths.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
✨ Thank you, @O2sa! Another great contribution merged! 🚀 You've been a fantastic contributor! We truly appreciate your continued support. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📋 Summary of Changes
This PR refactors the DevImpact codebase into a Feature-Driven Scalable Next.js Architecture (
src/) to improve modularity, isolation, developer velocity, and maintainability as the project grows.🏗️ Architectural Changes:
Feature Domain Modules (
src/features/):comparison/: Side-by-side developer comparison components, service orchestration, tests, and types.developer/: Single developer profile components, PR metrics, repository cards, tests, and types.leaderboard/: Country ranking table, country discovery grid, caching queries, and types.scoring/: Core scoring engine (Repo, PR, Contribution, Language scores, logarithmic formulas), unit tests, and methodology visualizer.components/,services/,tests/,types.ts, and public API barrel export (index.ts).Shared Infrastructure (
src/lib/):cache/,db/,geo/,github/,i18n/,logger/, andseo/.Domain-Agnostic UI & Layout (
src/components/):ui/primitives,layout/chrome (Navbar, Footer, MobileNav),providers/(Theme, Locale), andseo/.Thin App Router (
src/app/):Path Aliases & Tooling:
@/features/*,@/lib/*,@/components/*,@/types/*,@/data/*,@/utils/*, and@/locales/*acrosstsconfig.json,tailwind.config.ts, andvitest.config.ts.scripts/calculate-next-country.ts,scripts/init-db.ts,scripts/validate-locales.js).Documentation Overhaul:
ARCHITECTURE.md: Created a comprehensive guide with architectural philosophy, sequence diagrams, directory maps, import rules, and step-by-step contributor cookbooks.CONTRIBUTING.md&README.md: Aligned project trees, tech stack references, and testing instructions.ops/README.md&algorithm.md: Cleaned up path references and linked to production implementations.🧪 Quality Assurance & Validation
pnpm test).npx tsc --noEmit).pnpm validate-locales).pnpm build).Additionally, at the time of submission of this PR: