Skip to content

Commit 173efeb

Browse files
committed
add contributing.md and lint code
1 parent 96bad66 commit 173efeb

16 files changed

+618
-548
lines changed

.eslintrc

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{
2-
"root": true,
3-
"parser": "@typescript-eslint/parser",
4-
"plugins": [
5-
"@typescript-eslint"
6-
],
7-
"extends": [
8-
"eslint:recommended",
9-
"plugin:@typescript-eslint/eslint-recommended",
10-
"plugin:@typescript-eslint/recommended"
11-
]
12-
}
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint"],
5+
"extends": [
6+
"eslint:recommended",
7+
"plugin:@typescript-eslint/eslint-recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
]
10+
}

.vscode/settings.json

-2
This file was deleted.

README.md

+28-19
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@
5858
</details>
5959

6060
<!-- ABOUT THE PROJECT -->
61+
6162
## About The Project
6263

63-
**ATTENTION**: This project is under beta and not ready for production - using it in product is highly discouraged without prior thorough review.
64+
**ATTENTION**: This project is under beta and not ready for production - using it in product is highly discouraged without prior thorough review.
6465

6566
![product-screenshot]
6667

@@ -72,27 +73,31 @@ From the chain to use, through the wallet login system, to the React components
7273

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

75-
7676
<!-- GETTING STARTED -->
77+
7778
## Getting Started
7879

7980
This is an example of how you may give instructions on setting up your project locally.
8081
To get a local copy up and running follow these simple example steps.
8182

8283
### **Prerequisites**
8384

84-
* NodeJS
85+
- NodeJS
8586

8687
To install node go on the [official Node website](https://nodejs.org/en/download/), and download the LTS package for your Operating System.
8788

8889
To verify if NodeJS has been correctly installed on your system, open your terminal and run:
90+
8991
```sh
9092
node -v
9193
```
94+
9295
and
96+
9397
```sh
9498
npm -v
9599
```
100+
96101
<p align="right">(<a href="#top">back to top</a>)</p>
97102

98103
## **Quick Start**
@@ -101,61 +106,67 @@ npm -v
101106
2. Create a new Alchemy application.
102107

103108
3. In your terminal run:
109+
104110
```sh
105111
npx create-web3-dapp
106-
```
112+
```
107113

108114
4. The first time you'll run this command, it will install the package.
109115

110116
5. Once installed, run the following command again - This will start the DApp creation flow.:
117+
111118
```sh
112119
npx create-web3-dapp
113-
```
120+
```
114121

115122
6. Select the dependencies and components you want to include in your web3 application:
116-
![product-screenshot-2]
123+
![product-screenshot-2]
117124

118125
7. Navigate to the application folder
126+
119127
```
120128
cd my-dapp
121129
```
130+
122131
8. Run the application
132+
123133
```sh
124134
npm run dev
125135
```
136+
126137
9. Go to to <a href="localhost:3000">localhost:3000</a>:
127-
![product-screenshot]
138+
![product-screenshot]
128139

129140
10. Enjoy Web3.
130141

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

133-
134144
<!-- ROADMAP -->
145+
135146
## **Roadmap**
136147

137148
- [ ] Style localhost landing page + components
138149
- [ ] Components selection workflow
139150
- [ ] Write tests
140151
- [ ] Implement support for new Blockchain development environments:
141-
- [ ] Foundry
142-
- [ ] Anchor
152+
- [ ] Foundry
153+
- [ ] Anchor
143154
- [ ] Add OpenZeppelin Support
144155
- [ ] Add collection floor price component
145156
- [ ] Templates selection workflow
146-
- [ ] Implement GitHub Actions build on push
157+
- [ ] Implement GitHub Actions build on push
147158
- [ ] Review contributions .md
148159

149-
150-
151160
See the [open issues](https://github.com/eversmile12/create-web3-dapp/issues) for a full list of proposed features (and known issues).
152161

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

155164
## Open Source
165+
156166
</br>
157167

158168
### Contributors
169+
159170
<ul>
160171
<li>Vitto Rivabella - <a href="https://www.linkedin.com/in/vittorio-rivabella/">Linkedin</a> - <a href="https://twitter.com/VittoStack">Twitter</a> - <a href="https://github.com/eversmile12">GitHub</a></li>
161172
<li>Albert Hu - <a href="https://www.linkedin.com/in/albhu/">Linkedin</a> - <a href="https://twitter.com/thatguyintech">Twitter</a> - <a href="https://github.com/thatguyintech">GitHub</a></li>
@@ -164,6 +175,7 @@ See the [open issues](https://github.com/eversmile12/create-web3-dapp/issues) fo
164175
<p align="right">(<a href="#top">back to top</a>)</p>
165176

166177
<!-- CONTRIBUTING -->
178+
167179
### Contributing
168180

169181
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
@@ -218,17 +230,16 @@ If you have a suggestion that would make this better, please fork the repo and c
218230

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

221-
222233
<!-- LICENSE -->
234+
223235
## License
224236

225237
Distributed under the MIT License. See `LICENSE.txt` for more information.
226238

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

229-
230-
231241
<!-- CONTACT -->
242+
232243
## Contact
233244

234245
Your Name - [@twitter_handle](https://twitter.com/vittostack) - [email protected]
@@ -237,8 +248,8 @@ Project Link: [https://github.com/eversmile12/create-web3-dapp](https://github.c
237248

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

240-
241251
<!-- MARKDOWN LINKS & IMAGES -->
252+
242253
[contributors-shield]: https://img.shields.io/github/contributors/eversmile12/create-web3-dapp.svg?style=for-the-badge
243254
[contributors-url]: https://github.com/eversmile12/create-web3-dapp/graphs/contributors
244255
[forks-shield]: https://img.shields.io/github/forks/eversmile12/create-web3-dapp.svg?style=for-the-badge
@@ -250,7 +261,5 @@ Project Link: [https://github.com/eversmile12/create-web3-dapp](https://github.c
250261
[license-shield]: https://img.shields.io/github/license/eversmile12/create-web3-dapp.svg?style=for-the-badge
251262
[license-url]: https://github.com/eversmile12/create-web3-dapp/blob/master/LICENSE.txt
252263
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
253-
254-
255264
[product-screenshot]: images/screenshot.png
256265
[product-screenshot-2]: images/screenshot_2.png

contributing.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Contributing
2+
3+
Contributions are welcome!
4+
5+
1. Check the [ISSUES](https://github.com/Eversmile12/create-web3-dapp/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc). Read every issue to understand what's needed and whether it's something you can help with.
6+
7+
2. Ask other contributors to see if no one has taken the issue yet. If you're interested in tackling such a feature and it's still available, we will assign you to the task.
8+
9+
3. Clone the repo and create your own branch using `git checkout -b your_branch_name`. Remember to use a branch name that describes WHAT you're doing/fixing.
10+
11+
4. Setup your local development environment. Instructions
12+
13+
5. Once your work is done with the local copy of the repo, don't hesitate to open a pull request. We'll gladly revise and push as deemed fit.
14+
15+
6. Feel free to add new issues as you read the code and find inconsistencies and/or possible features that may add up to the website. Follow the labeling standards to make it easier to understand what you're proposing.
16+
17+
7. Document changes and/or issues clearly. Make it easy for everyone involved to understand your ideas/changes.
18+
19+
## Local development
20+
21+
To setup your local dev environment:
22+
23+
```sh
24+
# Clone the repo
25+
git clone https://github.com/Eversmile12/create-web3-dapp.git
26+
27+
cd create-web3-dapp
28+
29+
# Install dependencies
30+
yarn
31+
32+
```
33+
34+
## Creating a pull request
35+
36+
In order to create a pull request for create-web3-dapp, follow the GitHub instructions for [Creating a pull request from a fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork). Please link your pull request to an existing issue.

helpers/backend_helpers/setupHardhat.ts

+58-49
Original file line numberDiff line numberDiff line change
@@ -8,53 +8,62 @@ import { createWriteStream } from "fs";
88
import { generateAlchemyURL } from "../utils/generateAlchemyUrl.js";
99

1010
export const setUpHardhat = (dappInfo: dappInfo) => {
11-
const bar2 = new cliProgress.SingleBar(
12-
{},
13-
cliProgress.Presets.shades_classic
14-
);
15-
bar2.start(100, 0);
16-
bar2.update(50);
17-
18-
const hardhatTemplate = path.join(process.cwd(), "templates", "hardhat");
19-
fse.mkdirSync(path.join(process.cwd(), "backend"));
20-
fse.copySync(hardhatTemplate, path.join(process.cwd(), "backend"));
21-
22-
if (dappInfo.apiKeys) {
23-
createEnv(dappInfo.apiKeys, path.join(process.cwd(), "backend"), false);
24-
}
25-
26-
const writeStream = createWriteStream(path.join(process.cwd(), "backend", "hardhat.config.js"))
27-
28-
writeStream.write("require('@nomicfoundation/hardhat-toolbox');\n");
29-
writeStream.write("require('dotenv').config()\n");
30-
31-
writeStream.write("// Remove the quotes to get started \n");
32-
const modules = {
33-
solidity: "0.8.9",
34-
networks: {
35-
hardhat: {},
36-
[dappInfo.chain]: {
37-
accounts: "[`0x${process.env.PRIVATE_KEY}`]",
38-
url: generateAlchemyURL(dappInfo.chain, dappInfo.apiKeys.alchemy_api_key)
39-
}
40-
},
41-
42-
}
43-
44-
if (dappInfo.isTestnet) {
45-
modules.networks[dappInfo.testnet!] = {
46-
accounts: "[`0x${process.env.PRIVATE_KEY}`]",
47-
url: generateAlchemyURL(dappInfo.testnet, dappInfo.apiKeys.alchemy_api_key)
48-
}
49-
}
50-
51-
52-
53-
writeStream.write(`module.exports = ${JSON.stringify(modules, null, "\t").replace(/"([^"]+)":/g, '$1:')}`)
54-
writeStream.close()
55-
56-
57-
bar2.update(100);
58-
bar2.stop();
59-
console.log(chalk.green("Smart Contract Development Environment copied ✅"));
11+
const bar2 = new cliProgress.SingleBar(
12+
{},
13+
cliProgress.Presets.shades_classic
14+
);
15+
bar2.start(100, 0);
16+
bar2.update(50);
17+
18+
const hardhatTemplate = path.join(process.cwd(), "templates", "hardhat");
19+
fse.mkdirSync(path.join(process.cwd(), "backend"));
20+
fse.copySync(hardhatTemplate, path.join(process.cwd(), "backend"));
21+
22+
if (dappInfo.apiKeys) {
23+
createEnv(dappInfo.apiKeys, path.join(process.cwd(), "backend"), false);
24+
}
25+
26+
const writeStream = createWriteStream(
27+
path.join(process.cwd(), "backend", "hardhat.config.js")
28+
);
29+
30+
writeStream.write("require('@nomicfoundation/hardhat-toolbox');\n");
31+
writeStream.write("require('dotenv').config()\n");
32+
33+
writeStream.write("// Remove the quotes to get started \n");
34+
const modules = {
35+
solidity: "0.8.9",
36+
networks: {
37+
hardhat: {},
38+
[dappInfo.chain]: {
39+
accounts: "[`0x${process.env.PRIVATE_KEY}`]",
40+
url: generateAlchemyURL(
41+
dappInfo.chain,
42+
dappInfo.apiKeys.alchemy_api_key
43+
),
44+
},
45+
},
46+
};
47+
48+
if (dappInfo.isTestnet) {
49+
modules.networks[dappInfo.testnet!] = {
50+
accounts: "[`0x${process.env.PRIVATE_KEY}`]",
51+
url: generateAlchemyURL(
52+
dappInfo.testnet,
53+
dappInfo.apiKeys.alchemy_api_key
54+
),
55+
};
56+
}
57+
58+
writeStream.write(
59+
`module.exports = ${JSON.stringify(modules, null, "\t").replace(
60+
/"([^"]+)":/g,
61+
"$1:"
62+
)}`
63+
);
64+
writeStream.close();
65+
66+
bar2.update(100);
67+
bar2.stop();
68+
console.log(chalk.green("Smart Contract Development Environment copied ✅"));
6069
};

0 commit comments

Comments
 (0)