Giter Site home page Giter Site logo

clean-architecture-react-boilerplate's Introduction

Clean Architecture React Boilerplate

DESCRIPTION

This repository is a real life example of Clean Architecture with use of React.js and Typescript

TODO DIAGRAM

Technologies used
  1. Typescript ( v3.9.3 )
  2. Inversify.js
  3. GraphQL
  4. React.js
Structure
  1. ui

     Contains definition of presentation layer like controller, express setup etc  
    
  2. domain

     Contains definition of use cases, DTO's, contracts for repositories
    
  3. data

     Contains definition of data sources
    
  4. ioc ( Dependency injection layer )

     Contains definition for Container and whole project dependencies
    
What is supported?

TODO

Reference

TODO

PREREQUISITIES

  • Yarn

SETUP

TODO

HOW TO RUN LOCALLY

  1. Follow SETUP section first and install PREREQUISITIES
  2. Yarn install - installing dependencies
  3. Yarn start - run app

TESTING

TODO

Mutational Testing

TODO

APPLIED CONCEPTS

There are some universal concepts in programming ( designed patterns ) which are common for general engineering but it's not always obvious how to use environment specific concepts. In this boilerplate I'm going to show how to handle that.

Request Object

Request object defines parameters / input to specific module input ( domain / infrastructure ), and holds required data which cannot be changed on the fly.

Mocking

TODO

Mapper

Simple concept where one module data structure is translated to another module

Data -> Domain Mapper

TODO

Domain -> UI Mapper

TODO

Seeds

Used for local development or testing - it's just data for specific use cases which can be also used for dev environment where QA's can test specific endpoints or screens. It's also useful as start data for local development especially when you are working as a full stack.

Tests parallelization

TODO

Mutational testing

TODO

Integration testing

TODO

STILL TODO

  • Provide infrastructure diagram
  • Provide example of marionette testing with use of react-testing-library ( alternative to enzyme )
  • Provide example of mutational testing with react
  • Provide example of BDD integration with cucumber use and Cypress
  • Provide few examples of UI testing
  • Provide examples how to group tests by tags in Cucumber
  • Introduce Kubernetes
  • Introduce docker
  • Introduce way of thinking understood as Data Space which will simplify data and content management across specific screen
  • Introduce and explain communication between screen with Data Space and nested widgets
  • Introduce more abstract way of dataStore integration ( OPTIONAL )
  • Add CHANGELOG v1 when boilerplate is finished
  • Provide example of handling errors ( api error, component error )
  • Apply animations
  • Extend mocking switch to live response editor request preview, delay etc
  • Extend routing examples to handle authenticated routes, role routes etc

KNOWN ISSUES

  • Recoil is in experimental state, so you may notice some console errors - Issue link

clean-architecture-react-boilerplate's People

Contributors

melzar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.