platformplatform / PlatformPlatform

Alpha state. A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc.
https://platformplatform.github.io
MIT License
257 stars 26 forks source link

Refactor folder structure for improved organization and navigation #549

Closed tjementum closed 4 months ago

tjementum commented 4 months ago

Summary & Motivation

Ensure that the front-end filesystem is 1:1 aligned with paths in the WebApp.

Move files from (auth) back to the root. /register and /login were previously placed in an (auth) subfolder. In TanStack, subfolders named with parentheses are used to group things, but /register is not auth-related, making it hard to find things.

Inline components to their main file. For example, /(auth)/register/index.tsx referenced a component located in /shared/ui/auth/StartAccountRegistrationForm. This was hard to navigate, and the shared folder became very large. Now, only truly shared components are under /shared, and the /routes/register/* folder is self-contained.

Move index.tsx to an (index) subfolder and move all components there. This avoids having /index.tsx in the root and all the components in /-landingpage, reducing clutter.

Rename /shared/ui to /shared/components and move /shared/ui/layout to /shared/layouts. This makes the /shared folder much more navigable.

Move TopMenu, UserProfile, and Account modals from /admin/users/-components to /shared/components, and update /admin/users and /admin page to have "correct" breadcrumbs.

Rename /pages to /routes to follow the convention in TanStack. IMPORTANT: Change of /pages to /routes should also be changed for self-contained systems in downstream PlatformPlatform repositories.

The default base path for the Back Office self-contained system has been changed from shared/lib/router/router.tsx and index.tsx have been moved to /routes/back-office/index.tsx, so the filesystem reflects the routes. IMPORTANT: This change should also be done in self-contained systems in downstream repositories.

Checklist

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
10 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud