Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 2.17 KB

02-application-structure.md

File metadata and controls

29 lines (25 loc) · 2.17 KB

Application structure

Root directory structure

├──.changeset — data about changesets
├──.github — GitHub configuration including CI/CD workflows
├──.husky — Husky scripts for git hooks
├──docker — Docker related files
├──docs — Application documentation files
├──e2e — Cypress E2E tests project
├──e2e-playwright — Playwright E2E tests project
├──plop-templates — Templates for plop commands
├──public — React application public files
├──scripts — Custom scripts (ex. fetching translations)
├──src — React application source code

Source code structure

├──api — Configuration of API client and collection of API actions (queries and mutations) definition.
├──routes — React application Routing and features (view components/modules)
├──assets - React application public assets (images, icons, custom fonts etc.)
├──context - Global contexts using across React application. Each context has its context and controller files
├──hooks - Global hooks used across the application. The best approach is to keep flat structure of hooks in this directory
├──i18n - Configuration of internationalization module in SPA application. It also contains JSON files with application translations managed with Babelsheet tool
├──providers - Configuration of providers tree in React application
├──tests - Configuration of React application unit tests
├──types - Global types used across the application
├──ui - Base UI components used across the application. The best approach is to keep flat structure of UI components in this directory
├──utils - Base utility functions used across the application.