Skip to content

Commit 93578de

Browse files
committed
add global readme.md
1 parent 1fedd2c commit 93578de

11 files changed

+165
-140
lines changed

README.md

+102-74
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,12 @@
1919
-->
2020

2121

22-
TODO:
23-
- ADD SOLANA
24-
- STYLE COMPONENTS
25-
- RELEASE BETA 1
26-
- CONVERT TO TYPESCRIPT
27-
- ADD TYPESCRYPT SUPPORT
28-
- RELEASE BETA 2
29-
- ADD TAILWIND
30-
- RELEASE
3122

3223
[![Contributors][contributors-shield]][contributors-url]
3324
[![Forks][forks-shield]][forks-url]
3425
[![Stargazers][stars-shield]][stars-url]
3526
[![Issues][issues-shield]][issues-url]
3627
[![MIT License][license-shield]][license-url]
37-
[![LinkedIn][linkedin-shield]][linkedin-url]
3828

3929

4030

@@ -74,15 +64,20 @@ TODO:
7464
<a href="#getting-started">Getting Started</a>
7565
<ul>
7666
<li><a href="#prerequisites">Prerequisites</a></li>
77-
<li><a href="#installation">Installation</a></li>
67+
<li><a href="#quick-start">Quickstart</a></li>
7868
</ul>
7969
</li>
80-
<li><a href="#usage">Usage</a></li>
8170
<li><a href="#roadmap">Roadmap</a></li>
82-
<li><a href="#contributing">Contributing</a></li>
71+
<li>
72+
<a href="#getting-started">Open Source</a>
73+
<ul>
74+
<li><a href="#contributors">Contributors</a></li>
75+
<li><a href="#contributing">Contributing</a></li>
76+
</ul>
77+
</li>
78+
<li><a href="#complementary-docs">Complementary Docs</a></li>
8379
<li><a href="#license">License</a></li>
8480
<li><a href="#contributors">Contributors</a></li>
85-
<li><a href="#acknowledgments">Acknowledgments</a></li>
8681
</ol>
8782
</details>
8883

@@ -110,7 +105,7 @@ From the chain to use, through the wallet login system, to the React components
110105
This is an example of how you may give instructions on setting up your project locally.
111106
To get a local copy up and running follow these simple example steps.
112107

113-
### Prerequisites
108+
### **Prerequisites**
114109

115110
* NodeJS
116111

@@ -124,77 +119,84 @@ and
124119
```sh
125120
npm -v
126121
```
122+
<p align="right">(<a href="#top">back to top</a>)</p>
127123

124+
## **Quick Start**
128125

129-
### Installation
126+
1. Create a new account on Alchemy.com.
127+
2. Create a new Alchemy application.
130128

131-
1. In your terminal run
132-
* ```sh
129+
3. In your terminal run:
130+
```sh
133131
npx create-web3-dapp
134132
```
135133

136-
2. The first time you'll run this command, it will install the package.
134+
4. The first time you'll run this command, it will install the package.
137135

138-
3. Now the following command again:
139-
* ```sh
136+
5. Once installed, run the following command again - This will start the DApp creation flow.:
137+
```sh
140138
npx create-web3-dapp
141139
```
142-
This will start the DApp creation flow.
143140

144-
<p align="right">(<a href="#top">back to top</a>)</p>
141+
6. Select the dependencies and components you want to include in your web3 applicatio:
142+
![product-screenshot-2]
145143

144+
7. Navigate to the application folder
145+
```
146+
cd my-dapp
147+
```
148+
8. Run the application
149+
```sh
150+
npm run dev
151+
```
152+
9. Go to to <a href="localhost:3000">localhost:3000</a>:
153+
![product-screenshot]
146154

147-
## DApp Creation Flow
148-
Once started, the create-web3-dapp wizard will ask you a series of questions to understand what to and what to not include in your dapp boilerplates.
149-
150-
Here's a reference to the creation flow:
151-
152-
1. **Insert new dapp name** *(text)*
153-
2. **select dapp chain** *(options)*:
154-
1. The user can choose between the chains supported by Alchemy including Solana
155-
1. Because our support to Solana is currently limited, the Solana implementation has partial ROI against the EVM one.
156-
3. **select if we want to import the template files** *(true/false)*:
157-
1. The template files contain code showcasing the Alchemy SDK capabilities (NFT API, Transfer API) through a set of NextJs components visual components.
158-
2. If the user doesn’t install the template files, Alchemy will be only used to connect the wallet - the Alchemy SDK won’t be installed (to brainstorm)
159-
4. **Select if we want to import a Blockchain development environment like** *(options)*:
160-
1. Hardhat (partially supported) - EVM
161-
2. Foundry (not yet supported) - EVM
162-
3. Anchor (not yet supported) - Solana
163-
5. **Add Alchemy API Key:**
164-
1. The key will be used:
165-
1. In the front-end to connect:
166-
1. The wallet (Solana, EVM)
167-
2. In the Alchemy SDK if the user has installed the template files[4a](EVM)
168-
2. In the Blockchain development environment [5](Solana, EVM)
169-
6. **The builder will now proceed to create the project, performing the following actions:**
170-
1. download the files from the GitHub repositories:
171-
1.
172-
2. Install the dependencies (Alchemy SDK, Rainbow Kit, Hardhat, etc)
173-
3. Update the dependencies
174-
4. Run the application
175-
6. **The user will now be able to see the following landing page at http://localhost:3000:**
155+
10. Enjoy Web3.
176156

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

159+
179160
<!-- ROADMAP -->
180-
## Roadmap
161+
## **Roadmap**
162+
163+
- [ ] Style localhost landing page + components
164+
- [ ] Components selection workflow
165+
- [ ] Write tests
166+
- [ ] Implement support for new Blockchain development environments:
167+
- [ ] Foundry
168+
- [ ] Anchor
169+
- [ ] Add OpenZeppelin Support
170+
- [ ] Add collection floor price component
171+
- [ ] Templates selection workflow
172+
- [ ] Implement GitHub Actions build on push
173+
- [ ] Review contributions .md
174+
181175

182-
- [ ] Feature 1
183-
- [ ] Feature 2
184-
- [ ] Feature 3
185-
- [ ] Nested Feature
186176

187-
See the [open issues](https://github.com/github_username/repo_name/issues) for a full list of proposed features (and known issues).
177+
See the [open issues](https://github.com/eversmile12/create-web3-dapp/issues) for a full list of proposed features (and known issues).
178+
179+
<p align="right">(<a href="#top">back to top</a>)</p>
180+
181+
## Open Source
182+
</br>
183+
184+
### Contributors
185+
<ul>
186+
<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>
187+
<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>
188+
</ul>
188189

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

191192
<!-- CONTRIBUTING -->
192-
## Contributing
193+
### Contributing
193194

194195
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
195196

196197
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
197-
Don't forget to give the project a star! Thanks again!
198+
199+
**Don't forget to give the project a star! Thanks again!**
198200

199201
1. Fork the Project
200202
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
@@ -204,6 +206,43 @@ Don't forget to give the project a star! Thanks again!
204206

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

209+
## **Complementary Docs**
210+
211+
<ul>
212+
<li>
213+
<strong>Core:</strong>
214+
<ul>
215+
<li>NextJS - <a href="https://nextjs.org/">docs</a></li>
216+
</ul>
217+
</li>
218+
<li>
219+
<strong>Web3:</strong>
220+
<ul>
221+
<li href="https://docs.alchemy.com/reference/alchemy-sdk-quickstart">AlchemySDK - <a>docs</a></li>
222+
<li>EthersJS - <a href="https://docs.ethers.io/v5/">docs</a></li>
223+
<li>RainbowKit - <a href="https://www.rainbowkit.com/">docs</a></li>
224+
<li>PhantomWallet - <a href="https://docs.phantom.app/">docs</a></li>
225+
</ul>
226+
</li>
227+
<li>
228+
<strong>Blockchain Development Environments:</strong>
229+
<ul>
230+
<li>Hardhat - <a href="https://hardhat.org/">docs</a></li>
231+
<li>Foundry - <a href="https://book.getfoundry.sh/">docs</a></li>
232+
<li>Anchor - <a href=https://book.anchor-lang.com/">docs</a></li>
233+
</ul>
234+
</li>
235+
<li>
236+
<strong>CSS:</strong>
237+
<ul>
238+
<li>Tailwind - <a href="https://v2.tailwindcss.com/docs">docs</a></li>
239+
<li>ChakraUI - <a href="https://chakra-ui.com/getting-started">docs</a></li>
240+
</ul>
241+
</li>
242+
243+
</ul>
244+
245+
<p align="right">(<a href="#top">back to top</a>)</p>
207246

208247

209248
<!-- LICENSE -->
@@ -218,25 +257,13 @@ Distributed under the MIT License. See `LICENSE.txt` for more information.
218257
<!-- CONTACT -->
219258
## Contact
220259

221-
Your Name - [@twitter_handle](https://twitter.com/twitter_handle) - email@email_client.com
260+
Your Name - [@twitter_handle](https://twitter.com/vittostack) - vitto@alchemy.com
222261

223-
Project Link: [https://github.com/github_username/repo_name](https://github.com/github_username/repo_name)
262+
Project Link: [https://github.com/eversmile12/create-web3-dapp](https://github.com/eversmile12/create-web3-dapp)
224263

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

227266

228-
229-
<!-- ACKNOWLEDGMENTS -->
230-
## Acknowledgments
231-
232-
* []()
233-
* []()
234-
* []()
235-
236-
<p align="right">(<a href="#top">back to top</a>)</p>
237-
238-
239-
240267
<!-- MARKDOWN LINKS & IMAGES -->
241268
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
242269
[contributors-shield]: https://img.shields.io/github/contributors/eversmile12/create-web3-dapp.svg?style=for-the-badge
@@ -253,3 +280,4 @@ Project Link: [https://github.com/github_username/repo_name](https://github.com/
253280

254281

255282
[product-screenshot]: images/screenshot.png
283+
[product-screenshot-2]: images/screenshot_2.png
File renamed without changes.

helpers/utils/cleanUpFiles.ts

-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import fs from "fs";
32
import path from "path";
43

@@ -32,16 +31,13 @@ export const cleanUpFiles = () => {
3231
fs.rmSync(path.join(process.cwd(), "index.ts"), {
3332
force: true,
3433
});
35-
3634
fs.rmSync(path.join(process.cwd(), "interfaces"), {
3735
recursive: true,
3836
force: true,
3937
});
40-
4138
fs.rmSync(path.join(process.cwd(), "tsconfig.json"), {
4239
force: true,
4340
});
44-
4541
fs.rmSync(path.join(process.cwd(), "images"), {
4642
recursive: true,
4743
force: true,

helpers/utils/cloneRepo.ts

+10-11
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ import cliProgress from "cli-progress";
77
import { setUpHardhat } from "../backend_helpers/setupHardhat.js";
88
import { dappInfo } from "../../interfaces/dappInfo.js";
99

10-
export const cloneRepo = (
11-
projectPath : string,
12-
dappInfo : dappInfo
13-
) => {
10+
export const cloneRepo = (projectPath: string, dappInfo: dappInfo) => {
1411
try {
1512
process.chdir(projectPath);
1613
console.log(chalk.yellow("Downloading files..."));
@@ -28,16 +25,18 @@ export const cloneRepo = (
2825

2926
console.log(chalk.yellow("\nCopying project files..."));
3027

31-
32-
33-
3428
const template = path.join(
3529
process.cwd(),
3630
"templates",
37-
(dappInfo.chain == "ethereum" || dappInfo.chain == "polygon" || dappInfo.chain == "arbitrum"|| dappInfo.chain == "optimism") ? "ethereum" : "solana",
31+
dappInfo.chain == "ethereum" ||
32+
dappInfo.chain == "polygon" ||
33+
dappInfo.chain == "arbitrum" ||
34+
dappInfo.chain == "optimism"
35+
? "ethereum"
36+
: "solana",
3837
dappInfo.wantsTemplateFiles ? "tutorial" : "vanilla"
3938
);
40-
39+
4140
fse.copySync(template, process.cwd());
4241

4342
bar1.update(200);
@@ -49,9 +48,9 @@ export const cloneRepo = (
4948
console.log(chalk.yellow(`Copying ${dappInfo.backendProvider} files...`));
5049
switch (dappInfo.backendProvider) {
5150
case "hardhat":
52-
setUpHardhat(dappInfo)
51+
setUpHardhat(dappInfo);
5352
break;
54-
53+
5554
case "foundry":
5655
break;
5756
case "Anchor":

helpers/utils/createEnv.ts

+10-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@ import fs from "fs";
22
import { APIKeys } from "../../interfaces/dappInfo";
33
import path from "path";
44

5-
export const createEnv = (apiKeys: APIKeys, projectPath = "./", exposed = true) => {
6-
7-
console.log(apiKeys)
8-
5+
export const createEnv = (
6+
apiKeys: APIKeys,
7+
projectPath = "./",
8+
exposed = true
9+
) => {
910
if (Object.keys(apiKeys).length) {
1011
const writeStream = fs.createWriteStream(path.join(projectPath, ".env"));
1112
for (const [key, value] of Object.entries(apiKeys)) {
12-
writeStream.write(exposed ? `NEXT_PUBLIC_${key.toUpperCase()}= ${value}\n` : `${key.toUpperCase()}= ${value}\n`);
13+
writeStream.write(
14+
exposed
15+
? `NEXT_PUBLIC_${key.toUpperCase()}= ${value}\n`
16+
: `${key.toUpperCase()}= ${value}\n`
17+
);
1318
}
1419
writeStream.end();
1520
}

0 commit comments

Comments
 (0)