How uxname/litefront works
Main Components
• Frontend Core: Start with the entry point (src/main.tsx) and the index.html in the public directory.
• Pages and Routing: Highlight the pages located in src/pages (404, about, login, register, etc.) and show how routes are set up in src/routes (with lazy-loaded components).
• Shared Modules: Include shared components such as auth-store, counter, header, and layout-auth from the src/shared directory.
• Feature-Sliced Design Layers: Illustrate the separation suggested by the methodology, where features are contained in individual directories and shared logic/components are isolated.
• Configuration and Tooling: Note build configuration (vite.config.ts, tsconfig.json) and GraphQL type generation (codegen.yml).
• Localization and Assets: Indicate the public/locales directory for internationalization (i18next) and the public/media folder which contains media assets.
• Testing and Quality: Represent the tests directory (unit and e2e tests with Vitest and Playwright) along with quality tools (ESLint, Prettier, Stylelint, and Husky hooks).
Relationships and Data Flows
• Out how the entry point initializes the app and routes traffic to various pages.
• Communication between shared state components (like auth-store and counter) and other parts of the UI.
• Interaction between the localization resources in public/locales and the internationalization setup in src/app/i18next.ts.
• Deployment aspects (Dockerfile, docker-compose.yml, Caddyfile) which denote how the app is containerized and served in production.
Architectural Patterns and Design Principles
• Component-Based Architecture: Show individual UI components (found in src/pages/*/ui and src/shared/*/ui) as isolated blocks with dependencies flowing into a higher-level layout.
• Lazy Loading: Highlight the lazy-loaded routes in the routes directory (e.g., src/routes/*/index.lazy.tsx) to represent performance optimizations.
Relevant Technologies and Tools
• Vite: Point out that Vite is used for fast builds and hot module replacement.
• TypeScript: Mention the project’s strong type safety and coding practices.
• GraphQL: Illustrate GraphQL’s role in managing data fetching, with dependencies depicted between the src/graphql, src/generated, and the GraphQL server (implied by its use with LiteEnd).
• Docker & Caddy: Add external services used for production deployment.