Skip to content

cto-ai/web-app-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web App Generator 🚀

This Op will scaffold code for some of the most popular Web Application Frameworks.

Requirements

To run this or any other Op, install the Ops Platform.

Find information about how to run and build Ops via the Ops Platform Documentation

This Op requires an access token for GitHub interactions. To create a GitHub access token:

  1. Create an access token with the repo and admin scopes following the instructions here.
  2. Copy the access token and provide it when prompted running the Op for the first time.

Note: Your remote origin must be set to a valid GitHub repo.

Usage

To run this Op in the CLI:

  ops run @cto.ai/generate

To run this Op in Slack:

  /ops run @cto.ai/generate

You will be guided through selecting what framework of Web Application you want to create.

After all the prompts have been completed, the Op will build and push a new application to your Github account.

Frameworks

Currently, the web generator Op supports the following frameworks:

  • React.js
  • Gatsby
  • Next.js
  • Express.js

We are working on adding support for Vue,js and Angular. If you want to a see a new framework on the list, please let us know.

Workflows

This Op can be chained with other Ops to create a reusable and composable workflow.

This Op uses the sdk.setState() functionality to persist data and allow the next Op in workflow sequence to access persisted data. This state data is only available during the duration of the workflow and is destroyed with the workflow is complete.

The following keys are saved in state:

  • "WebGen_userFullName"
  • "WebGen_userEmail"
  • "WebGen_githubToken"
  • "WebGen_githubUserName"
  • "WebGen_repoFullName"
  • "WebGen_repoHtmlUrl"
  • "WebGen_repoGitUrl"
  • "WebGen_repoSshUrl"
  • "WebGen_repoCloneUrl"

To access these keys/values (next Op in workflow) you must use sdk.getState()

Local Development / Running from Source

1. Clone the repo:

git clone <git url>

2. Navigate into the directory and install dependencies:

cd web_generator

3. Run the Op from your current working directory with:

ops run . --build

Contributing

See the Contributing Docs for more information.

Contributors


Mario Mejia


Calvin Holloway

LICENSE

MIT

About

📦An opinionated approach for generating a web application using The Ops Platform 🚀

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published