Skip to content

Instantly share code, notes, and snippets.

@john-osullivan
Last active November 7, 2019 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save john-osullivan/900fee26c9957a329242778c8ec4f537 to your computer and use it in GitHub Desktop.
Save john-osullivan/900fee26c9957a329242778c8ec4f537 to your computer and use it in GitHub Desktop.
Dev Diaries #3 - Project Structure

/src
└── cli.tsx: Calls "yargs.commandDir('./rootCmds')" to configure top-level command
└── /rootCmds: 
|   └── api.tsx: This cmd calls `yargs.commandDir()` on each of the dirs below
|   └── /authCmds
|   |   └── beginPassReset.tsx: "dappbot api auth/beginPassReset" will send a password reset request
|   |   └── ...
|   └── /privateCmds
|   |   └── createDapp.tsx: "dappbot api private/createDapp <...args>" will create a Dapp
|   |   └── ...
|   └── /publicCmds
|   |   └── viewDapp.tsx: "dappbot api public/viewDapp " will show a Dapp's public record
|   └── login.tsx
|   └── signup.tsx: "dappbot signup" begins interactive SignupFlow
|   └── truffle.tsx: "dappbot truffle" begins interactive TruffleFlow
|   └── ...
└── /ui
    └── /helpers: Set of reusable components which all others draw on
    └── /TruffleFlow: Series of components which render UI required for "dappbot truffle"
    └── App.tsx: Top-level React component which prepares the API and accepts a render prop
    └── ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment