All Projects โ†’ feature-sliced โ†’ documentation

feature-sliced / documentation

Licence: MIT License
๐Ÿฐ Architectural design methodology for Frontend projects

Programming Languages

javascript
184084 projects - #8 most used programming language
SCSS
7915 projects

Projects that are alternatives of or similar to documentation

Design Patterns For Humans
An ultra-simplified explanation to design patterns
Stars: โœญ 32,376 (+8918.38%)
Mutual labels:  architecture, principles
Tensorflow In Depth
ใ€Šๆทฑๅ…ฅ็†่งฃTensorFlowใ€‹้กน็›ฎไปฃ็ ไธŽๆ ท็ซ 
Stars: โœญ 281 (-21.73%)
Mutual labels:  architecture, principles
Easymvp
A full-featured framework that allows building android applications following the principles of Clean Architecture.
Stars: โœญ 1,312 (+265.46%)
Mutual labels:  architecture, principles
Designpatternslibrary
A comprehensive design patterns library implemented in C#, which covers various design patterns from the most commonly used ones to the lesser-known ones. Get familiar with and learn design patterns through moderately realistic examples.
Stars: โœญ 485 (+35.1%)
Mutual labels:  architecture, principles
featureslices.dev
Documentation about feature-slices (v1, old)
Stars: โœญ 18 (-94.99%)
Mutual labels:  feature-slices, feature-sliced
bash-glob
Bash-powered globbing for node.js. Alternative to node-glob. Does not work on Windows 9 and lower.
Stars: โœญ 13 (-96.38%)
Mutual labels:  pattern
fc4-framework
A Docs as Code tool that helps software creators and documentarians author software architecture diagrams using the C4 model for visualising software architecture.
Stars: โœญ 121 (-66.3%)
Mutual labels:  architecture
arch-pattern-modularization
๐ŸŒตImplementation of Modularization on Architecture Pattern
Stars: โœญ 27 (-92.48%)
Mutual labels:  architecture
iOS-Clean-Architecture-Example
An iOS app designed using clean architecture and MVVM.
Stars: โœญ 50 (-86.07%)
Mutual labels:  architecture
developer-guidebook
An attempt to crystalize and disseminate useful wisdom about software development and life.
Stars: โœญ 17 (-95.26%)
Mutual labels:  principles
must-read
Lists of must-read papers (mainly security papers)
Stars: โœญ 13 (-96.38%)
Mutual labels:  isolation
ECS-Networking-Haxe
Entity Component System architecture with networking support, component state synchronization + RPC
Stars: โœญ 16 (-95.54%)
Mutual labels:  architecture
repolib-android
RepoLib Rx - Android
Stars: โœญ 13 (-96.38%)
Mutual labels:  architecture
data-product-batch
Template to deploy a Data Product for Batch data processing into a Data Landing Zone of the Data Management & Analytics Scenario (former Enterprise-Scale Analytics). The Data Product template can be used by cross-functional teams to ingest, provide and create new data assets within the platform.
Stars: โœญ 27 (-92.48%)
Mutual labels:  architecture
Movies-PagingLibrary-Arch-Components
Sample to practice PagingLibrary & RX
Stars: โœญ 92 (-74.37%)
Mutual labels:  architecture
openverse-api
The Openverse API allows programmatic access to search for CC-licensed and public domain digital media.
Stars: โœญ 41 (-88.58%)
Mutual labels:  architecture
documentation
This repository contains Enablement Documentation (STIX Shifter), Workgroup documents and materials (Endpoint), Working documents and output from the "Architecture Working Group", Architecture workgroup meeting minutes and recordings
Stars: โœญ 20 (-94.43%)
Mutual labels:  architecture
archunit-junit5-kotlin
Generic Architecture Tests written in Kotlin using ArchUnit and Junit5
Stars: โœญ 22 (-93.87%)
Mutual labels:  architecture
solor-doc
Documentation for Solor Knowledge Architecture and Knowledge Management Environment
Stars: โœญ 13 (-96.38%)
Mutual labels:  architecture
stable-systems-checklist
An opinionated list of attributes and policies that need to be met in order to establish a stable software system.
Stars: โœญ 43 (-88.02%)
Mutual labels:  architecture

Feature-Sliced Design

All Contributors

WIP: The current version of the methodology is under development and some details can be changed

feature-sliced-banner

Feature-Sliced Design (FSD) is an architectural design methodology for frontend applications. It aims to divide an application according to business logic and scopes of responsibility

Note: The methodology is not tied to a specific tech stack and is applicable to any frontend projects in general.

But the current version is based on and provides examples for JavaScript + React stack.

Motivation

Usually, approaches to building the frontend architecture from project to project are re-invented from scratch, thereby adding "project knowledge"

Despite the fact that the specifics of frontend projects do not differ so much

At the same time, incorrectly made decisions often lead to problems of scalability of the project and the team.

And therefore, instead of inventing and documenting it every time, it is better to summarize the experience and form a working, battle-tested and documented methodology for designing the frontend architecture.

Yes, there are many practices and patterns (SOLID, GRASP, DDD, ...)

But for the frontend it is highly difficult to find well-established and specific approaches

Overview

The methodology is designed to simplify and standardize the decomposition of logic for large and long-lived projects.

To do this, it introduces a number of concepts and abstractions, on which the architecture can be based from project to project - from here we get a number of advantages

Note: Module - the structural unit of the project (file / directory)

Explicit business logic

Modules are distributed according to scope of influence, business responsibility and technical purpose

Thanks to this, the architecture is standardized and becomes easier to read

Adaptation to new conditions

Each component of the architecture has its own purpose and does not affect the others

Thanks to this it is possible to independently modify the functionality of the application to meet new requirements without unforeseen consequences

Technical debt and refactoring

Each module is independent and self-sufficient

Thanks to this you can rewrite it from scratch without unexpected side effects

Scaling the project and the team

The increase in functionality leads to significantly less complexity of the project, since all the logic is distributed deterministically and in isolation

Thanks to this it is easy to add and onboard new people to the team, as well as expand the functionality of the project

Controlled reuse of logic

Each module has its own limitations and recommendations for reuse according to its layer

Thanks to this, a balance is maintained between compliance with the DRY principle and the ability to customize the module logic without overhead overrides

Concepts

Public API

Each module must have a declaration of its public API at the top level

  • To connect to other modules, without the need to refer to the internal structure of this module
  • To isolate the implementation details from the consumer modules
  • Also, the Public API should protect the module interface after refactoring - in order to avoid unforeseen consequences

Isolation

The module should not depend directly on other modules of the same layer or overlying layers

  • The concept is also known as Low Coupling & High Cohesion - to prevent implicit connections / side effects during development and refactoring

Needs driven

Orientation to the needs of the business and the user

  • Also includes splitting the structure by business domains (so-called "slices")

Abstractions

For architecture design the methodology suggests operating with familiar abstractions, but in a more consistent and consistent order.

Visual diagram

WIP: The scheme-represents only an approximate division of the project into modules and will be determined definitively closer to the release

visual_schema

Layers

The first level of abstraction is according to the scope of influence

  • app - application initialization (init, styles, providers, ...)
  • processes - application business processes that manage pages (payment, auth, ...)
  • pages - application pages (user-page, ...)
  • features - parts of the application functionality (auth-by-oauth, ...)
  • entities - business entities (viewer, order, ...)
  • shared - reused infrastructure code (UIKit, libs, API, ...)

Slices

The second level of abstraction is according to the business domain

The rules by which the code is divided into slices depend on the specific project and its business rules and are not determined by the methodology

Segments

The third level of abstraction is according to the purpose in the implementation

  • ui - UI-representation of the module (components, widgets, canvas, ...)
  • model - business logic of the module (store, effects/actions, hooks/contracts, ...)
  • lib - auxiliary libraries
  • api - the logic of interaction with the API
  • config - the configuration module of the application and its environment

Note: In most cases, it is recommended to place api and config only in the shared layer

Structure

โ””โ”€โ”€ src/
    โ”œโ”€โ”€ app/                    # Layer: Application
    |                           #
    โ”œโ”€โ”€ processes/              # Layer: Processes (optional)
    |   โ”œโ”€โ”€ {some-process}/     #     Slice: (e.g. CartPayment process)
    |   |   โ”œโ”€โ”€ lib/            #         Segment: Infrastructure-logic (helpers/utils)
    |   |   โ””โ”€โ”€ model/          #         Segment: Business Logic
    |   ...                     #
    |                           #
    โ”œโ”€โ”€ pages/                  # Layer: Pages
    |   โ”œโ”€โ”€ {some-page}/        #     Slice: (e.g. ProfilePage page)
    |   |   โ”œโ”€โ”€ lib/            #         Segment: Infrastructure-logic (helpers/utils)
    |   |   โ”œโ”€โ”€ model/          #         Segment: Business Logic
    |   |   โ””โ”€โ”€ ui/             #         Segment: UI logic
    |   ...                     #
    |                           #
    โ”œโ”€โ”€ widgets/                # Layer: Widgets
    |   โ”œโ”€โ”€ {some-widget}/      #     Slice: (e.g. Header widget)
    |   |   โ”œโ”€โ”€ lib/            #         Segment: Infrastructure-logic (helpers/utils)
    |   |   โ”œโ”€โ”€ model/          #         Segment: Business Logic
    |   |   โ””โ”€โ”€ ui/             #         Segment: UI logic
    โ”œโ”€โ”€ features/               # Layer: Features
    |   โ”œโ”€โ”€ {some-feature}/     #     Slice: (e.g. AuthByPhone feature)
    |   |   โ”œโ”€โ”€ lib/            #         Segment: Infrastructure-logic (helpers/utils)
    |   |   โ”œโ”€โ”€ model/          #         Segment: Business Logic
    |   |   โ””โ”€โ”€ ui/             #         Segment: UI logic
    |   ...                     #
    |                           #
    โ”œโ”€โ”€ entities/               # Layer: Business entities
    |   โ”œโ”€โ”€ {some-entity}/      #     Slice: (e.g. entity User)
    |   |   โ”œโ”€โ”€ lib/            #         Segment: Infrastructure-logic (helpers/utils)
    |   |   โ”œโ”€โ”€ model/          #         Segment: Business Logic
    |   |   โ””โ”€โ”€ ui/             #         Segment: UI logic
    |   ...                     #
    |                           #
    โ”œโ”€โ”€ shared/                 # Layer: Reused resources
    |   โ”œโ”€โ”€ api/                #         Segment: Logic of API requests
    |   โ”œโ”€โ”€ config/             #         Segment: Application configuration
    |   โ”œโ”€โ”€ lib/                #         Segment: Infrastructure-application logic
    |   โ””โ”€โ”€ ui/                 #         Segment: UIKit of the application
    |   ...                     #
    |                           #
    โ””โ”€โ”€ index.tsx/              #

Further reading

  • Discussions on the methodology
    • Real application examples, questions, problems, ideas of the methodology are discussed and analyzed here
    • All this together affects the specification, the toolkit and, in general, the further vision and development of the methodology
    • That is, everything that is not yet in the specification/toolkit is somehow discussed in github-discussions
  • How can I help?
    • โญ Rate us on GitHub
    • ๐Ÿ’ซ Any assistance is important - from feedback to participation in the development of the methodology!

tg          twitter          open-collective          youtube

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Sergey Sova

๐Ÿ“ ๐Ÿ“– ๐Ÿ’ก ๐Ÿค” ๐Ÿ“† ๐Ÿ’ฌ ๐Ÿš‡ ๐Ÿ”ฌ ๐Ÿ“‹ โœ… ๐Ÿ“ข ๐Ÿšง

Ilya Azin

๐Ÿ“– ๐Ÿ’ก ๐Ÿค” ๐Ÿ“† ๐Ÿ’ฌ ๐Ÿ‘€ ๐Ÿš‡ ๐Ÿ““ ๐ŸŽจ โœ… ๐Ÿ“ข ๐Ÿšง

Rin ็‹ Akaia

๐Ÿ“– ๐Ÿ–‹ ๐Ÿค” ๐Ÿ’ฌ ๐ŸŒ ๐Ÿ“ข ๐Ÿšง

Alexander Khoroshikh

๐Ÿ“– ๐Ÿค” ๐Ÿ’ฌ ๐Ÿ‘€ ๐Ÿ”ง ๐Ÿ›ก๏ธ ๐Ÿ“ข โœ… ๐Ÿšง

Bear Raytracer

๐Ÿ“– ๐Ÿ’ก ๐Ÿค” ๐Ÿ’ฌ ๐Ÿ‘€ ๐ŸŒ ๐ŸŽจ ๐Ÿš‡ ๐Ÿšง

spotsccc

๐Ÿ“– ๐Ÿ’ก ๐Ÿค” ๐Ÿ’ฌ ๐Ÿ‘€ ๐Ÿšง

Ilya

๐Ÿ“– ๐Ÿค” ๐Ÿ“ข ๐Ÿšง

Viktor Pasynok

๐Ÿ“– ๐Ÿค” ๐Ÿ“† ๐Ÿ“ข

Oleh

๐Ÿ“– ๐Ÿค” โœ…

Niyaz

๐Ÿ’ก ๐Ÿ““

Evgeniy Podgaetskiy

๐Ÿค”

Viacheslav Zinovev

๐ŸŽจ ๐Ÿ““ ๐Ÿ‘€

Alexandr

๐Ÿค” ๐Ÿ““ ๐Ÿ‘€

Oleg Isonen

๐Ÿค” ๐Ÿ”ฌ ๐Ÿ““

Evgeniy

๐Ÿ’ป ๐Ÿ”Œ ๐Ÿ”ง

Lev Chelyadinov

๐Ÿ“– ๐Ÿ–‹ ๐Ÿค” ๐ŸŽจ

And

๐Ÿš‡ ๐Ÿ“– ๐Ÿ’ป

sarmong

๐Ÿ“– ๐ŸŒ

Julie Obolenskaya

๐ŸŒ

Roman Tikhiy

๐Ÿ““ ๐Ÿ“–

Igor Kamyshev

๐Ÿ› ๐Ÿ“–

Roman

๐Ÿ““ ๐Ÿ“–

Sergey Vakhramov

๐ŸŽจ

Mark Omarov

๐Ÿ“–

ะ”ะผะธั‚ั€ะธะน

๐Ÿ’ผ ๐Ÿ““

Mihir Shah

๐ŸŽจ

Gleb

๐Ÿ“–

Roma Karvacky

๐Ÿ’ก

Aleksandr Osipov

๐Ÿ““

Maxim

๐Ÿ““

Anton Kosykh

๐Ÿ““

Vladislav Samatov

๐Ÿ““

Oleg Kusov

๐Ÿ“ ๐Ÿ““

Andrey Savelev

๐Ÿ““

Nickolay Ilchenko

๐Ÿ““ ๐Ÿ“‹

Eugene Ledenev

๐Ÿ”ฃ

Vladislav Romanov

๐Ÿ”ฃ

Ainur

๐Ÿ“–

Elisey Martynov

๐Ÿ’ก

Olga Pasynok

๐Ÿ“‹

Max Kokosha

๐Ÿ’ก

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].