👨💻Frontend
The Basics
Architecture's types
Classic architecture
Example of folder structure:
pages
api
helpers
store
hooks
assets
Use when:
Small team
One time project
Simple project
Module simple architecture
Pages
Modules:
ArticleComments - consist of api, components, helpers, store
RegistrationForm - consist of api, components, helpers, store
etc.
Components:
UserCard
ProductItem
Comment
etc.
UI:
Button
Input
Select
etc.
Atomic design
The overlying layers strictly use the underlying ones!!!
pages
templates
organisms
molecules
atoms
Feature Sliced Design
The overlying layers strictly use the underlying ones!!!
app - Initializing application logic.
pages - Application Pages.
processes - (Optional) Application processes running on pages.
widgets - Independent and full-fledged blocks for pages:
SideBar
Header
Footer
PostCard
features - (Optional) Custom scripts to process:
AuthByPhone
ArticleFeedback
ChangePhoneForm
entites - (Optional) Business entities operated by the subject area:
User - consist of api, components, helpers, store
Article - consist of api, components, helpers, store
Product - consist of api, components, helpers, store
Order - consist of api, components, helpers, store
shared - Reusable modules without reference to business logic
Example:
features/widgets - ProductComment
entites - ProductList + ProductForm
shared - Input + Button
Digging Deeper
Last updated