Skip to content

Commit

Permalink
Merge pull request #123 from henkaku-center/chore/update-readme
Browse files Browse the repository at this point in the history
Updated README.md with info about environment variables and more
  • Loading branch information
yu23ki14 authored Mar 14, 2023
2 parents 794cf9b + 05de3aa commit 5d82f5a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NEXT_PUBLIC_IPFS_API_KEY=""
NEXT_PUBLIC_IPFS_API_SECRET=""
NEXT_PUBLIC_IPFS_API_ENDPOINT="https://api.pinata.cloud"
IPFS_API_KEY=""
IPFS_API_SECRET=""
IPFS_API_ENDPOINT="https://api.pinata.cloud"
NEXT_PUBLIC_IPFS_GATEWAY_BASEURL"https://gateway.pinata.cloud"
NEXT_PUBLIC_CHAIN_ID=""
NEXT_PUBLIC_CONTRACT_HENKAKUV2_ADDRESS=""
Expand Down
37 changes: 24 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# henkaku-nengajo-frontend

## Getting Started
This is the frontend for [HENKAKU Nengajo](https://nengajo.henkaku.org/). It is a [Next.js](https://nextjs.org/) project.

First,install dependencies
## How to run the project locally

First, install the dependencies:

```bash
yarn install
yarn
```

Second, run the development server:
Expand All @@ -14,15 +16,11 @@ Second, run the development server:
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
Open [http://localhost:3000](http://localhost:3000) with your browser to see the site.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
For some features, you will need to provide environment variables to Next. Please see below.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Learn More
### Next.js resources

To learn more about Next.js, take a look at the following resources:

Expand All @@ -31,8 +29,21 @@ To learn more about Next.js, take a look at the following resources:

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel
## Environment variables

Create a copy of `.env.sample`, name it `.env.local`, and replace the information as needed. Note that not all variables need to be populated.

- `NEXT_PUBLIC_CHAIN_ID`: use 137 for MATIC (Polygon), 80001 for the Mumbai testnet, or 1337 if you are testing locally with Hardhat
- `NEXT_PUBLIC_CONTRACT_HENKAKUV2_ADDRESS` and `NEXT_PUBLIC_CONTRACT_NENGAJO_ADDRESS`: these are only used when the chain is set to Hardhat (deploy)
- `NEXT_PUBLIC_IPFS_API_KEY` and `NEXT_PUBLIC_IPFS_API_SECRET`: get your own keys at [Pinata](https://app.pinata.cloud/) to be able to create Nengajos from a locally served frontend
- `NEXT_PUBLIC_IPFS_API_ENDPOINT`: please use "https://api.pinata.cloud"
- `NEXT_PUBLIC_IPFS_GATEWAY_BASEURL`: feel free to use a custom one if you have one
- `NEXT_PUBLIC_JSONRPC_HTTP` and `NEXT_PUBLIC_JSONRPC_WS`: get your own at [alchemy](https://www.alchemy.com/)

## On collaborating

Henkaku is not a completely open community and, while this is an open source project, many communications about the project as well as the tokens to operate it are only shared among community members.

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
This site is hosted on [Vercel](https://vercel.com/), and preview sites are automatically created for each new pull request. However, if the PR comes from a forked repo, the preview deployment will need to be approved by a maintainer. Please wait for us to notice the PR or talk to us over Discord.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

1 comment on commit 5d82f5a

@vercel
Copy link

@vercel vercel bot commented on 5d82f5a Mar 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.