Skip to content

Commit

Permalink
shortcuts and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Apr 6, 2024
1 parent be20b03 commit 3997ba8
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 113 deletions.
72 changes: 52 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,46 @@

Set up a modern Cosmos app by running one command ⚛️

## Demo

https://user-images.githubusercontent.com/545047/192061992-f0e1106d-f4b2-4879-ab0a-896f22ee4f49.mp4

- [Overview](#overview)
- [Education & Resources](#education--resources)
- [Creating an App](#creating-an-app)
- [Options](#options)
- [Examples](#examples)
- [Development](#development)


## Overview

```
# install
First, install `create-cosmos-app` globally using npm:

```sh
npm install -g create-cosmos-app
```

# run one command
Then, create your new Cosmos app by running the following command:

```sh
# you can also use `cca` instead of `create-cosmos-app` for shortcut ;)
create-cosmos-app
```

During the setup process, you'll be prompted to enter the name of your app. For example:

```plaintext
> name: my-app
```

Once the app is created, move into the app directory and start the development server:

```sh
cd my-app
yarn && yarn dev
# now your app is running on localhost:3000!
```

Now your app should be running on `http://localhost:3000`!

### Get Started Immediately

You don’t need to install or configure cosmjs, keplr, nextjs, webpack or Babel.
Expand Down Expand Up @@ -90,6 +110,17 @@ npm init cosmos-app
yarn create cosmos-app
```

## Options

| Argument | Description | Default |
|------------------|-------------------------------------------------|------------|
| `--repo` | Set custom repository for cca templates | None |
| `--install` | Automatically install dependencies | `true` |
| `--printCmd` | Print the command to run after setup | `true` |
| `-e`, `--example` | Provide an example value | None |
| `-t`, `--template` | Define the template to use | None |
| `-b`, `--fromBranch` | Specify the branch to use for cloning | None |

## Examples

Explore examples!
Expand All @@ -104,6 +135,9 @@ cca --example
<img height="48" src="https://user-images.githubusercontent.com/545047/186589196-e75c9540-86a7-4a71-8096-207be9a4216f.svg" />
</p>

Initiate and manage staking operations directly within your application, allowing users to stake tokens securely and efficiently.


```
cca --name stake-example --example stake-tokens
```
Expand All @@ -114,18 +148,10 @@ cca --name stake-example --example stake-tokens
<img height="48" src="https://user-images.githubusercontent.com/545047/186589196-e75c9540-86a7-4a71-8096-207be9a4216f.svg" />
</p>

```
cca --name vote-example --example vote-proposal
```

### IBC Transfer

<p align="center" width="100%">
<img height="48" src="https://user-images.githubusercontent.com/545047/186589196-e75c9540-86a7-4a71-8096-207be9a4216f.svg" />
</p>
Facilitate on-chain governance by enabling users to vote on proposals, enhancing community engagement and decision-making.

```
cca --name ibc-example --example ibc-transfer
cca --name vote-example --example vote-proposal
```

### Authz
Expand All @@ -134,6 +160,8 @@ cca --name ibc-example --example ibc-transfer
<img height="48" src="https://user-images.githubusercontent.com/545047/186589196-e75c9540-86a7-4a71-8096-207be9a4216f.svg" />
</p>

Leverage the Authz module to grant and manage authorizations, allowing users to perform actions on behalf of others.

```
cca --name authz-example --example authz
```
Expand All @@ -144,6 +172,8 @@ cca --name authz-example --example authz
<img height="48" src="https://user-images.githubusercontent.com/545047/186589196-e75c9540-86a7-4a71-8096-207be9a4216f.svg" />
</p>

Integrate gRPC-web and gRPC-gateway in your app for robust and efficient communication between your Cosmos SDK blockchain and web clients.

```
cca --name grpc-example --example grpc-web-grpc-gateway
```
Expand All @@ -154,7 +184,7 @@ cca --name grpc-example --example grpc-web-grpc-gateway
<img height="48" src="https://user-images.githubusercontent.com/545047/184519024-2d34bf20-2440-4837-943f-4915a46409f5.svg" />
</p>

uses [osmojs](https://github.com/osmosis-labs/osmojs) to swap tokens
Utilize [osmojs](https://github.com/osmosis-labs/osmojs) for streamlined token swapping capabilities within your Osmosis app.

```
cca --name swap-example --example swap-tokens
Expand All @@ -166,7 +196,7 @@ cca --name swap-example --example swap-tokens
<img height="48" src="https://user-images.githubusercontent.com/545047/184519024-2d34bf20-2440-4837-943f-4915a46409f5.svg" />
</p>

uses [osmojs](https://github.com/osmosis-labs/osmojs) to provide liquidity
Use [osmojs](https://github.com/osmosis-labs/osmojs) to enable liquidity provision features, enhancing the DeFi experience in your app.

```
cca --name liquidity-example --example provide-liquidity
Expand All @@ -178,6 +208,8 @@ cca --name liquidity-example --example provide-liquidity
<img height="48" src="https://user-images.githubusercontent.com/545047/184519024-2d34bf20-2440-4837-943f-4915a46409f5.svg" />
</p>

Create and manage an asset list, offering comprehensive insights into the available assets, and empower your application with Inter-Blockchain Communication (IBC) capabilities for transferring tokens across different chains.

```
cca --name asset-list-example --example asset-list
```
Expand All @@ -188,7 +220,7 @@ cca --name asset-list-example --example asset-list
<img height="48" src="https://user-images.githubusercontent.com/545047/184694732-f4a3d397-14fb-415a-9562-a532f510f812.png" />
</p>

uses [stargazejs](https://github.com/cosmology-tech/stargazejs)
Incorporate NFT functionalities into your Stargaze app using [stargazejs](https://github.com/cosmology-tech/stargazejs), enabling seamless NFT minting, transfer, and management.

```
cca --name nft-example --example nft
Expand Down
Loading

0 comments on commit 3997ba8

Please sign in to comment.