Skip to content

Starter tutorial on where we build an NFT Mint and Market place using the fundamental libraries and architecture patterns found in ReactKit

License

Notifications You must be signed in to change notification settings

staratlasjim/reactkit-starter-tutorial

Repository files navigation

React Kit Starter project

Based on Buildspace's Solana NFT CandyMachine mint tutorial, but using ReactKit's concepts of Dependency Injection, Inversion of Control, Observables and MVVM.

Those concepts are primarily used to implement SOLID Design Principals

  • Single Responsibility Principle
  • Open/Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion

Goal:

  • To help developers grasp the concepts used in Portal and Engine Room faster.
  • Help see the why of using these principals
  • Portal uses these principals in most of the app, but it isn't fully converted, there is a lot of left over code that doesn't fully utilze this style.

##Dependency Injection

  • Uses Tsyringe a Depedency Injection/IoC library developed by Microsoft, not the homemade one I developed for Portal
  • Video 1: Overview of Unit Testing the UI and mocking the on-chain calls
  • Video 2: Overview of Unit Testing the UI and mocking the wallet adaptors
  • Video 3: Overview of TSyringe and DI containers in general

MVVM

MVVM is really trying to enforce Single Responsibility and Substitution Principles. Basically, the goal is to have our Core Business Logic is modeled in the Model Layer; so items like NFTs, Faction Fleets, Mining stations, Crafting Recipes, etc, etc, all have their primary code represented in Model objects. Then our View (UI) layer works with ViewModels to get the specific data and implement the screen specific logic. This ensures that each layer has a single responsibility:

Responsibilities:

  • UI: Style and Layout only
  • ModelView: UI logic related to business logic lives here; validation, conversion, and other such UI logic goes here.
  • Model: The core business objects that define our Domain (NFTs, FactionFleets, etc, etc)

Videos:

  • Video 1: Overview of WalletConnectView, WalletViewModel and WalletModel

Tutorial Todo:

  • more MVVM
  • Add Stiches (https://stitches.dev/)
  • Add Mobx-react-lite
  • Add Jest
  • Add Solana WalletConnectView Adaptors

About

Starter tutorial on where we build an NFT Mint and Market place using the fundamental libraries and architecture patterns found in ReactKit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published