Learn how files are organized in the project.
This is how things should be organized from a conceptual level:
- Start by page (
src/page/whatever) which correlates to a good name indicating what the page is (eg:report,account,workspace,) ideally and if the route is not a short form one (eg:/r/,/a/), it should also match the route- Pieces of the page should be put into sub-folders of the page
- Anything that is built ONLY for this page should go in the page directory (hooks and components included)
- Any component that is general enough to be reused elsewhere should go in
src/components - If multiple files are needed for a component, put them in their own folder (eg.
src/components/button)- Any hook that is general enough to be reused elsewhere should go in
src/hooks
- Any hook that is general enough to be reused elsewhere should go in
- All non-UI files should go in
src/libs- All action files should go in
src/libs/actions
- All action files should go in
All of the source code for the app is here.
React components that are re-used in several places across the application are stored here.
Non-React components that contain the business logic of the app.
React components that are organized by the hierarchy of the app. A "page" is the top-most UI controller for a given URL.
All the styles used in the application are here.
GitHub-specific configurations, workflows, and actions for CI/CD and repository automation.
Contains all GitHub Actions workflow definitions that automate our CI/CD processes, including builds, tests, deployments, and various checks. See the workflows README for detailed documentation.
Custom GitHub Actions that provide reusable functionality for our workflows. These are organized into:
composite/- Composite actions that combine multiple workflow stepsjavascript/- JavaScript actions for more complex logic
Shell scripts and utilities used by workflows and actions for various automation tasks.
Shared TypeScript/JavaScript libraries and utilities used by our custom GitHub Actions.
Guides and insights to aid developers in learning how to contribute to this repo
This houses the Expensify Help site. It's a static site that's built with Jekyll and hosted on GitHub Pages.
This houses a secondary and experimental help site. It's primarily used for the right-hand-pane help articles. It's a static site that's built with Jekyll and hosted on GitHub Pages.
- Files MUST be named after the component/function/constants they export, respecting the casing used for it. ie:
- An exported constant named
CONSTis in a file namedCONST. - A component named
Textis in a file namedText. - An exported function named
guidis in a file namedguid. - For files that are utilities that export several functions/classes use the UpperCamelCase version ie:
DateUtils. - Higher-Order Components (HOCs) and hooks should be named in camelCase, like
withPolicyanduseOnyx.