Skip to content

Commit 97ac964

Browse files
committed
feat: updated original readme file
1 parent 017b7e8 commit 97ac964

File tree

1 file changed

+174
-67
lines changed

1 file changed

+174
-67
lines changed

README.md

Lines changed: 174 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,219 @@
1-
# Create T3 App With Sign-In With Ethereum
1+
## Developer DAO Academy
22

3-
An implementation of [T3 Stack](https://create.t3.gg/) with [Sign-In With Ethereum](https://login.xyz).
3+
`Developer DAO Academy` is an open-source education platform created by the
4+
Developer DAO Foundation.
45

5-
!["T3-Stack-SIWE"](/README/t3-siwe-screenshot.png)
6+
Live site is at <https://academy.developerdao.com>.
67

7-
## Tutorials
8+
Find us on Twitter at <https://twitter.com/devdao_academy>.
89

9-
📘 Full walkthrough article on how to [Combine Sign-In With Ethereum With Create-T3-App](https://codingwithmanny.medium.com/combine-sign-in-with-ethereum-with-create-t3-app-8f54604caeeb).
10+
![Academy Homepage Screenshot](./public/landing-page-screenshot.png)
1011

11-
<a href="https://codingwithmanny.medium.com/combine-sign-in-with-ethereum-with-create-t3-app-8f54604caeeb">![Combine Sign-In With Ethereum With Create-T3-App](README/t3-siwe-medium.jpg)</a>
12+
## What license applies to this site's content and code?
1213

13-
---
14+
- All Developer DAO Academy website content © 2022 by Developer DAO Foundation
15+
licensed under
16+
[Attribution-NonCommercial 4.0 International](http://creativecommons.org/licenses/by-nc/4.0/).
17+
- Developer DAO Academy website code © 2022 by Developer DAO Foundation licensed
18+
under [MIT](./LICENSE).
1419

15-
## Requirement
20+
## How do I get started?
1621

17-
- NVM or Node `v18.15.0`
22+
Please read our [CONTRIBUTING Guide](CONTRIBUTING.md) to get started. We ask
23+
that you are a member of Developer DAO to contribute, since our project uses
24+
various Developer DAO planning and communication tools, such as Discord.
1825

19-
---
26+
## How to contribute code
2027

21-
28+
If you're new to the project, see below for setup instructions.
2229

23-
With the latest version of `[email protected]` it drops the headers which doesn't allow the nonce to be read from the csrf cookie.
30+
### Considerations as you write code
2431

25-
The solution to this can be found in this branch:
32+
As you're working on code, some things to think about:
2633

27-
[fix/next-auth-4.21.1](https://github.com/codingwithmanny/t3-app-siwe/tree/fix/next-auth-4.21.1)
34+
- PRs should be as small as possible so they are easy to review
35+
- There are strategies you can use to keep PRs small, even if your feature is
36+
big.
37+
[How to Split Pull Requests – Good Practices, Methods and Git Strategies](https://www.thedroidsonroids.com/blog/splitting-pull-request)
2838

29-
---
39+
### What should I do before submitting the PR?
3040

31-
## Getting Started
41+
- Run `yarn confirm` which will make sure your files are consistently formatted,
42+
lint the code base looking for problems and then actually building the site
43+
locally to ensure no build problems
44+
- If you see warnings or errors please fix.
45+
- Also, this step runs Prettier so some files may have changed and need to be
46+
checked in.
3247

33-
Follow all these steps to get up and running locally.
48+
Now you're ready to submit your PR.
3449

35-
### Dependencies
50+
Assume no one knows what your PR is about. So helpful to:
3651

37-
```bash
38-
# FROM: ./
52+
- writing a description in the PR to explain what you're fixing/adding and how
53+
to test.
54+
- if your work is based on a GitHub issue, add that in the description, though
55+
make sure you use the exact words of "Closes #123" since this will
56+
automatically close the issue when the PR is merged. Using "this refers to
57+
#123" won't do that.
58+
- send a signal that your PR is ready for review, such as asking someone to
59+
review your PR
3960

40-
pnpm install; # npm install;
41-
```
61+
### How do I review a PR?
4262

43-
### Environment Variable File
63+
It's also important that people review PRs -- a great learning experience and
64+
important for an open-source project.
4465

45-
```bash
46-
# FROM: ./
66+
Some helpful things when reviewing PRs:
4767

48-
cp .env.example .env;
49-
```
68+
- **ALWAYS** download and run the code you're reviewing. Never eyeball it in the
69+
PR and approve it.
70+
- when you review a PR, please add yourself as a reviewer in GitHub so we know
71+
someone is reviewing
72+
- go through the formal GitHub review process of starting a review and then
73+
finishing with "approved" or "needs changes"
5074

51-
**File:** `.env`
75+
### Who should merge the PR?
5276

53-
```toml
54-
# When adding additional environment variables, the schema in "/src/env.mjs"
55-
# should be updated accordingly.
77+
Once a PR is reviewed, the author of the PR should merge, and the author should
78+
run through the live site and make sure the code is performing as expected.
5679

57-
# Prisma
58-
# https://www.prisma.io/docs/reference/database-reference/connection-urls#env
59-
DATABASE_URL="file:./db.sqlite"
80+
## Project Setup
6081

61-
# Next Auth
62-
# You can generate a new secret on the command line with:
63-
# openssl rand -base64 32
64-
# https://next-auth.js.org/configuration/options#secret
65-
NEXTAUTH_SECRET="A-REALLY-LONG-SECRET-PASSWORD-32"
66-
NEXTAUTH_URL="http://localhost:3000"
82+
**Prerequisites:**
6783

68-
# Next Auth Discord Provider
69-
DISCORD_CLIENT_ID=""
70-
DISCORD_CLIENT_SECRET=""
71-
```
84+
node --version 16.x
7285

73-
### Database Migration
86+
Refer to the `node` and `npm` installation with `nvm` guide in Lesson 2. A link
87+
to the guide can be found
88+
[here](https://www.notion.so/How-to-install-node-js-and-npm-67b2ab1f76f148f49f547b9156aeaf28):
7489

75-
```bash
76-
# FROM: ./
90+
**Fork this repo, clone forked repo locally and `cd` into the repo:**
7791

78-
npx prisma migrate dev;
79-
```
92+
git clone https://github.com/[YOUR GITHUB HANDLE HERE]/academy.git
93+
cd academy/
8094

81-
### Local Development
95+
**Installation and run:**
8296

83-
```bash
84-
# FROM: ./
97+
yarn install
98+
yarn dev
8599

86-
pnpm dev; # npm run dev;
100+
This will create a local instance of the app running and can be viewed at
101+
`http://localhost:3000` in your browser.
87102

88-
# Expected Output:
89-
# > [email protected] dev /Users/username/path/to/t3-app-siwe
90-
# > next dev
103+
Also it's handy to install the Prettier plugin for your browser. You can then
104+
use it to automatically format files. It helps keep the code base tidy, for
105+
Typescript, MDX and Markdown files.
91106

92-
# ready - started server on 0.0.0.0:3000, url: http://localhost:3000
93-
```
107+
**VSCode Remote Containers (alternative setup)**
108+
109+
If you use VSCode for development, we already have the configuration files for
110+
you to use
111+
[Remote Containers](https://code.visualstudio.com/docs/remote/containers) (make
112+
sure that you check the link to install the requirements to use it) to easily
113+
create an isolated development environment for your fork. After installing the
114+
minimum requirements, you can start using it following this
115+
[quickstart](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-a-git-repository-or-github-pr-in-an-isolated-container-volume).
116+
117+
**For Windows Users**
118+
119+
You may run into setup problems if using Windows Powershell. We suggest you use
120+
WSL.
121+
122+
## Grabbing latest version of the code
123+
124+
**Since this is a work in progress, your local version of the app can be updated
125+
with the following commands:**
126+
127+
Stop the locally running app with:
128+
129+
Ctrl + C
130+
131+
Use `git pull` for the most up-to-date version:
132+
133+
git pull
134+
135+
Reinstall with `yarn`:
136+
137+
yarn install
94138

95-
### Database Client (Prisma Studio)
139+
Run the updated app:
140+
141+
yarn dev
142+
143+
## Learn More
144+
145+
To learn more about Next.js, take a look at the following resources:
146+
147+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
148+
features and API.
149+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
150+
151+
You can check out
152+
[the Next.js GitHub repository](https://github.com/vercel/next.js/) - your
153+
feedback and contributions are welcome!
154+
155+
## Storybook
156+
157+
This project uses [Storybook](https://storybook.js.org/). Storybook allows us to
158+
develop components in isolation from our app.
159+
160+
Stories are loaded from `*.stories.(mdx|js|jsx|ts|tsx)` files in any directory.
161+
162+
To use Storybook, run the `storybook` script:
96163

97164
```bash
98-
# FROM: ./
165+
yarn storybook
166+
```
99167

100-
npx prisma studio;
168+
To learn more about how to write Storybook stories, check out the official
169+
[Intro to Storybook](https://storybook.js.org/tutorials/intro-to-storybook/)
170+
tutorial.
101171

102-
# Expected Output:
103-
# Environment variables loaded from .env
104-
# Prisma schema loaded from prisma/schema.prisma
105-
# Prisma Studio is up on http://localhost:5555
172+
## Deploy on Vercel
173+
174+
The easiest way to deploy your Next.js app is to use the
175+
[Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme)
176+
from the creators of Next.js.
177+
178+
Check out our
179+
[Next.js deployment documentation](https://nextjs.org/docs/deployment) for more
180+
details.
181+
182+
## How do I add/edit contributors for a lesson?
183+
184+
First make sure you add your information to `./data/contributors.ts`. Minimally
185+
you need a unique handle (a single lowercase name such as `brianfive`) which
186+
will be used to look up your information.
187+
188+
Then add a component in your `.mdx` file at the bottom like this, using various
189+
handles defined above.
190+
191+
You can add a contributor as an author, reviewer of contributor. Author(s) wrote
192+
the content, Reviewer(s) edited the content, and Contributor(s) later made
193+
updates or fixed issues.
194+
195+
```jsx
196+
import { ContributorFooter } from "../../../components/mdx/ContributorFooter";
106197
```
107198

108-
---
199+
```jsx
200+
<ContributorFooter
201+
authors={["brianfive"]}
202+
reviewers={["piablo", "georgemac510"]}
203+
contributors={[]}
204+
/>
205+
```
109206

110-
built by [@codingwithmanny](https://twitter.com/codingwithmanny)
207+
## How do I add a specific forum link in a lesson's header?
111208

209+
Make sure the `<LessonHeader />` component has the `discussionUrl` attribute
210+
like this:
211+
212+
```jsx
213+
<LessonHeader
214+
title="Lesson 4: Testing your TierNFT"
215+
discussionUrl="https://developerdao.peeranha.io/discussions/1372/testing-solidity-contracts"
216+
/>
217+
```
112218

219+
Without `discussionUrl` the link will default to the home page of Peeranha.

0 commit comments

Comments
 (0)