Skip to content

Commit

Permalink
Merge pull request #291 from celo-org/cli-v2
Browse files Browse the repository at this point in the history
Composer CLI v2 created
  • Loading branch information
GigaHierz authored Jul 12, 2024
2 parents 8bd5c0e + 8c2bdad commit 3b4a1ec
Show file tree
Hide file tree
Showing 364 changed files with 16,486 additions and 35,913 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["oclif", "oclif-typescript", "prettier"]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ nb-configuration.xml
*.swp

PROPOSAL.md
package-lock.json
yarn.lock
15 changes: 15 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"require": [
"ts-node/register"
],
"watch-extensions": [
"ts"
],
"recursive": true,
"reporter": "spec",
"timeout": 60000,
"node-option": [
"loader=ts-node/esm",
"experimental-specifier-resolution=node"
]
}
120 changes: 84 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- TITLE -->
<p align="center">
<p align="center">
<img width="100px" src="https://github.com/celo-org/celo-composer/blob/main/images/readme/celo_isotype.svg" align="center" alt="Celo" />
<h2 align="center">Celo Composer</h2>
<p align="center">Build, deploy, and iterate quickly on decentralized applications using Celo.</p>
Expand Down Expand Up @@ -65,87 +65,135 @@ Celo Composer is built on Celo to make it simple to build dApps using a variety
- [Solidity](https://docs.soliditylang.org/en/v0.8.19/)
- [Next.js](https://nextjs.org/)
- [React.js](https://reactjs.org/)
- [Material UI](https://mui.com/)
- [React Native](https://reactnative.dev/)
- [Flutter](https://docs.flutter.dev/)
- [React-celo](https://github.com/celo-org/react-celo/)
- [Rainbowkit-celo](https://github.com/celo-org/rainbowkit-celo)
- [viem](https://viem.sh/)
- [Hardhat](https://hardhat.org/)

<p align="right">(<a href="#top">back to top</a>)</p>

<!-- GETTING STARTED -->

## Prerequisites

- Node
- Node (v20 or higher)
- Git (v2.38 or higher)

## How to use Celo Composer

The easiest way to start with Celo Composer is using `@celo/celo-composer`. This CLI tool lets you quickly start building dApps on Celo for multiple frameworks, including React (with either react-celo or rainbowkit-celo), React Native (w/o Expo), Flutter, and Angular. To get started, just run the following command, and follow the steps:

- Step 1

```bash
npx @celo/celo-composer@latest create
```

### Front-end framework
- Step 2: Provide the Project Name: You will be prompted to enter the name of your project.

```text
What is your project name:
```

- Step 3: Choose to Use Hardhat: You will be asked if you want to use Hardhat. Select Yes or No.

```text
Do you want to use Hardhat? (Y/n)
```

- Step 4: Choose to Use a Template: You will be asked if you want to use a template. Select `Yes` or `No`.

```text
Do you want to use a template?
```

- Step 5: Select a Template: If you chose to use a template, you will be prompted to select a template from the list provided.

```text
- Minipay
- Valora
- Social Connect
```

- Step 6: Provide the Project Owner's Name: You will be asked to enter the project owner's name.

![Celo Composer select framework](https://github.com/celo-org/celo-composer/blob/main/images/readme/cc_step_1.png?raw=true)
```text
Project Owner name:
```

- Step 7: Wait for Project Creation: The CLI will now create the project based on your inputs. This may take a few minutes.

### Web3 library (for react-app)
- Step 8: Follow the instructions to start the project. The same will be displayed on the console after the project is created.

![Celo Composer select framework](https://github.com/celo-org/celo-composer/blob/main/images/readme/cc_step_2.png?raw=true)
```text
🚀 Your starter project has been successfully created!
### Smart contract framework
Before you start the project, please follow these steps:
![Celo Composer tool selection](https://github.com/celo-org/celo-composer/blob/main/images/readme/cc_step_3.png?raw=true)
1. Rename the file:
packages/react-app/.env.template
to
packages/react-app/.env
### Subgraph
2. Open the newly renamed .env file and add all the required environment variables.
![Celo Composer subgraph support](https://github.com/celo-org/celo-composer/blob/main/images/readme/cc_step_4.png?raw=true)
Once you've done that, you're all set to start your project!
### Name your dApp
Run the following commands from the packages/react-app folder to start the project:
![Celo Composer dApp name](https://github.com/celo-org/celo-composer/blob/main/images/readme/cc_step_5.png?raw=true)
yarn install
yarn dev
**_🔥Voila, you have a dApp ready to go. Voila, you have a dApp ready to go. Start building your dApp on Celo._**
If you prefer npm, you can run:
npm install
npm run dev
Thank you for using Celo Composer! If you have any questions or need further assistance, please refer to the README or reach out to our team.
```

**_🔥Voila, you have a dApp ready to go. Start building your dApp on Celo._**

### Getting started

Once your custom dApp has been created, just install dependencies, either with `yarn` or `npm i`, and run the respective script from the `package.json` file.

## Supported Frameworks

### React
### React / Nextjs

- Support for Website and Progressive Web Application.
- Works with all major crypto wallets.

Check [package readme](https://github.com/celo-org/celo-composer/blob/main/packages/react-app/README.md) to learn more about.
Check [nextjs docs](https://nextjs.org/docs) to learn more about it.

### React Native
### Hardhat

- Out of the box config, just focus on buidl.
- Support for Android and IOS.
- Works with and without [Expo](https://expo.dev/).
- Working example app included.
- Robust framework for building and testing smart contracts.
- Compatible with various Ethereum development tools and plugins.

Check [package readme](https://github.com/celo-org/celo-composer/blob/main/packages/react-native-app/README.md) to learn more about.
Check [hardhat docs](https://hardhat.org/hardhat-runner/docs/getting-started) to learn more about it.

### Flutter
## Supported Templates

- One command to get started - Type `flutter run` to start development in your mobile phone.
- Works with all major mobile crypto wallets.
- Support for Android, IOS (Web, Windows, and Linux coming soon).
- Working example app included.
### Minipay

Check [package readme](https://github.com/celo-org/celo-composer/blob/main/packages/flutter-app/README.md) to learn more about.
- Pre-built template for creating a mini-payment application.
- Seamless integration with Celo blockchain for handling payments.

### Angular
Checkout [minipay docs](https://docs.celo.org/developer/build-on-minipay/overview) to learn more about it.

- Support for Website and Progressive Web Application.
- Works with all major crypto wallets.
### Valora

- Template designed for Valora wallet integration.
- Facilitates easy wallet connectivity and transaction management.

Checkout [valora docs](https://docs.valora.xyz/) to learn more about it.

### Social Connect

- Template for building applications with social connectivity features.
- Supports various social login methods and user interactions.

Check [package readme](https://github.com/celo-org/celo-composer/blob/main/packages/angular-app/README.md) to learn more about.
Checkout [social connect docs](https://github.com/celo-org/social-connect) to learn more about it.

<!-- USAGE EXAMPLES -->

Expand Down
Loading

0 comments on commit 3b4a1ec

Please sign in to comment.