-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from Gateway-DAO/testnet
Release - January 10th
- Loading branch information
Showing
880 changed files
with
51,606 additions
and
7,429 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
SECURE_API_KEY= | ||
NEXT_PUBLIC_API_ENDPOINT= | ||
NEXTAUTH_SECRET= | ||
NEXT_PUBLIC_API_ENV= | ||
NEXT_PUBLIC_API_KEY= | ||
NEXT_PUBLIC_PLAYGROUND_API_KEY= | ||
|
||
# Irys | ||
IRYS_NODE=https://devnet.irys.xyz | ||
IRYS_CURRENCY= | ||
IRYS_PROVIDER= | ||
IRYS_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Next.js: debug server-side", | ||
"type": "node-terminal", | ||
"request": "launch", | ||
"command": "npm run dev" | ||
}, | ||
{ | ||
"name": "Next.js: debug client-side", | ||
"type": "chrome", | ||
"request": "launch", | ||
"userDataDir": true, | ||
"url": "http://localhost:4200" | ||
}, | ||
{ | ||
"name": "Next.js: debug full stack", | ||
"type": "node-terminal", | ||
"request": "launch", | ||
"command": "npm run dev", | ||
"serverReadyAction": { | ||
"pattern": "started server on .+, url: (https?://.+)", | ||
"uriFormat": "%s", | ||
"action": "debugWithChrome", | ||
} | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Next.js: debug server-side", | ||
"type": "node-terminal", | ||
"request": "launch", | ||
"command": "npm run dev" | ||
}, | ||
{ | ||
"name": "Next.js: debug client-side", | ||
"type": "chrome", | ||
"request": "launch", | ||
"userDataDir": true, | ||
"url": "http://localhost:4200" | ||
}, | ||
{ | ||
"name": "Next.js: debug full stack", | ||
"type": "node-terminal", | ||
"request": "launch", | ||
"command": "npm run dev", | ||
"serverReadyAction": { | ||
"pattern": "started server on .+, url: (https?://.+)", | ||
"uriFormat": "%s", | ||
"action": "debugWithChrome" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,49 @@ | ||
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). | ||
![Gateway Network - Web3 Private Data Protocol](/public/social.png) | ||
|
||
## Getting Started | ||
<a href="https://github.com/Gateway-DAO/network/stargazers"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/Gateway-DAO/network?style=flat-square"></a> | ||
<a href="https://discord.gg/tgt3KjcHGs"><img alt="Discord" src="https://img.shields.io/discord/898513755456036925?style=flat-square&label=discord"></a> | ||
|
||
First, run the development server: | ||
# 🚪 Gateway Network - Source code | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
This repo contains the code for [Gateway dApp](https://gateway.network) website. Powered by [Next.js](https://nextjs.org). | ||
|
||
# 🔧 Installation | ||
|
||
Make sure you have [Git](https://git-scm.com/), [Node.js 16 LTS](https://nodejs.org/) and [pnpm](https://pnpm.io/) installed | ||
|
||
1. Clone this repo | ||
|
||
```sh | ||
git clone https://github.com/Gateway-DAO/network-ui | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
2. Install dependencies using pnpm | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
```sh | ||
pnpm i | ||
``` | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
3. Create the env file. Ask about it to your manager | ||
|
||
## Learn More | ||
4. Generate the typings | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
```sh | ||
pnpm generate | ||
``` | ||
|
||
5. Start the development server | ||
|
||
```sh | ||
pnpm dev | ||
``` | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
# 👍 Contribute | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
If you want to say thank you and/or support the active development of the `dApp`: | ||
|
||
## Deploy on Vercel | ||
1. Add a [GitHub Star](https://github.com/Gateway-DAO/network-ui/stargazers) to the project. | ||
2. Talk to us on our [Discord](https://discord.gg/tgt3KjcHGs) | ||
|
||
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. | ||
# E2E | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. | ||
Copy your `next-auth.session-token` and set the value in your dotenv file (`TEST_NEXT_AUTH_TOKEN`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import nextJest from 'next/jest.js'; | ||
|
||
const createJestConfig = nextJest({ | ||
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment | ||
dir: './', | ||
}); | ||
|
||
// Add any custom config to be passed to Jest | ||
/** @type {import('jest').Config} */ | ||
const config = { | ||
// Add more setup options before each test is run | ||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], | ||
testPathIgnorePatterns: ['<rootDir>/e2e/'], | ||
testEnvironment: 'jest-environment-jsdom', | ||
// preset: 'ts-jest', | ||
moduleNameMapper: { | ||
'^@/(.*)$': '<rootDir>/src/$1', | ||
}, | ||
}; | ||
|
||
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async | ||
export default createJestConfig(config); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Development | ||
|
||
## Remove lines on PRODUCTION | ||
|
||
If you want to remove a number line on production, you can add a comment `#REMOVELINE {number}` to remove a specific number of lines | ||
|
||
```ts | ||
// #REMOVELINE | ||
const test = ''; | ||
``` | ||
|
||
```gql | ||
#REMOVELINE 3 | ||
query { | ||
test | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Testing | ||
|
||
## E2E Testing (Playwright) | ||
|
||
According to [Next.js' Testing Documentation](https://nextjs.org/docs/pages/building-your-application/optimizing/testing#running-your-playwright-tests), you should have a running server before running your tests. | ||
|
||
It can be either running a dev server (`pnpm dev`) or a built local server (`pnpm build && pnpm start`), pointing to `PORT` env (defaults to `4400`). | ||
|
||
### Running tests | ||
|
||
```bash | ||
pnpm test:e2e | ||
``` | ||
|
||
### Writing tests | ||
|
||
E2E tests are located in `/e2e` folder. | ||
|
||
## Unit Testing (Jest + React Testing Library) | ||
|
||
### Running tests | ||
|
||
```bash | ||
pnpm test | ||
``` | ||
|
||
### Writing tests | ||
|
||
Unit tests are located in `**/__tests__` folder. Since we're using Next 13, we can put tests in the same folder as the pages and component, [because folders starting with underscore (`_`) are ignored by Next.js App Router](https://nextjs.org/docs/app/building-your-application/routing/colocation#private-folders). |
Oops, something went wrong.