Dans le dossier /src :
api ===> we use codegen (automatic API call functions generation)
features
\
|- login
\
|- api
\
|- __mocks__
|- login.ts ===> caller, adapter
|- login.test.ts
|- otherCall.ts
|- otherCall.test.ts
|- index.ts => optional, exports methods explicitly
|- components ==> feature-specific UI components
\
|- Component1.tsx
|- Component1.test.tsx
|- Component1.stories.tsx
|- ...
|- pages ==> feature-specific pages
\
|- Page1.tsx
|- Page1.test.tsx
|- ...
|- helpers ==> utils or data transform functions
\
|- helper1.tsx
|- helper1.test.tsx
|- helper2.tsx
|- helper2.test.tsx
|- index.ts => optional, exports methods explicitly
|- fixtures
\
|- fixture1.ts ==> data for testing (for example API call responses mocks)
|- ...
|- context ==> feature context related files (provider, reducer, etc)
|- enums.ts
|- types.ts
|- register
|- homepage
|- search
libs ===> external modules implementations
\
|- analytics
|- pushNotification
|- errorReporting
|- geolocation
|- ...
shared ==> reusable helpers, often crossed-features
theme ==> theme object used in styled-components
ui
\
|- animations ==> lottie animations
|- components ===> independent and stateless components (reusables)
\
|- Component1.tsx
|- Component1.test.tsx
|- Component1.stories.tsx
|- ...
|- hooks
|- svg ==> logos and icons
|- styleGuide ==> theme constants and typography components