forked from passportxyz/passport
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(app): add nextjs starter and rename old app
- Loading branch information
1 parent
4f0d577
commit f571490
Showing
68 changed files
with
513 additions
and
5,049 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 |
---|---|---|
@@ -1,25 +1,37 @@ | ||
# Logs | ||
logs | ||
*.log | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
/dist | ||
/coverage | ||
dist-ssr | ||
*.local | ||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo |
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,23 @@ | ||
# Next.js + Tailwind CSS Example | ||
|
||
This example shows how to use [Tailwind CSS](https://tailwindcss.com/) [(v3.0)](https://tailwindcss.com/blog/tailwindcss-v3) with Next.js. It follows the steps outlined in the official [Tailwind docs](https://tailwindcss.com/docs/guides/nextjs). | ||
|
||
## Deploy your own | ||
|
||
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-tailwindcss) | ||
|
||
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-tailwindcss&project-name=with-tailwindcss&repository-name=with-tailwindcss) | ||
|
||
## How to use | ||
|
||
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: | ||
|
||
```bash | ||
npx create-next-app --example with-tailwindcss with-tailwindcss-app | ||
# or | ||
yarn create next-app --example with-tailwindcss with-tailwindcss-app | ||
# or | ||
pnpm create next-app -- --example with-tailwindcss with-tailwindcss-app | ||
``` | ||
|
||
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). |
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,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
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,4 @@ | ||
/** @type {import('next').NextConfig} */ | ||
module.exports = { | ||
reactStrictMode: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,23 @@ | ||
{ | ||
"name": "@dpopp/app", | ||
"private": true, | ||
"version": "0.0.0", | ||
"scripts": { | ||
"clean": "rimraf node_modules", | ||
"start": "vite", | ||
"build": "tsc && vite build", | ||
"preview": "vite preview", | ||
"lint": "tsc --noEmit && eslint --ext .ts,.js,.tsx .", | ||
"test": "jest", | ||
"prettier": "prettier --write ." | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start" | ||
}, | ||
"setupFiles": [ | ||
{ | ||
"jest": { | ||
"resetMocks": false, | ||
"setupFiles": [ | ||
"jest-localstorage-mock" | ||
] | ||
} | ||
} | ||
], | ||
"dependencies": { | ||
"@chakra-ui/react": "^1.8.8", | ||
"@dpopp/identity": "^0.0.1", | ||
"@dpopp/types": "^0.0.1", | ||
"@emotion/react": "^11", | ||
"@emotion/styled": "^11", | ||
"@ethersproject/providers": "^5.6.2", | ||
"@walletconnect/web3-provider": "^1.7.7", | ||
"@web3-onboard/core": "^2.1.0", | ||
"@web3-onboard/injected-wallets": "^2.0.2", | ||
"@web3-onboard/ledger": "^2.0.1", | ||
"@web3-onboard/react": "^2.0.6", | ||
"@web3-onboard/walletconnect": "^2.0.1", | ||
"@web3-onboard/walletlink": "^2.0.0", | ||
"buffer": "^6.0.3", | ||
"eip-712": "^0.4.3", | ||
"framer-motion": "^6", | ||
"lodash": "^4.17.21", | ||
"mock-local-storage": "^1.1.21", | ||
"next": "latest", | ||
"react": "^17.0.2", | ||
"react-dom": "17.0.2", | ||
"react-google-login": "^5.2.2", | ||
"react-router-dom": "^6.3.0", | ||
"vite-plugin-environment": "^1.1.1" | ||
"react-dom": "^17.0.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@testing-library/jest-dom": "5.14.1", | ||
"@testing-library/react": "12.0.0", | ||
"@testing-library/user-event": "13.2.1", | ||
"@types/jest": "^27.4.1", | ||
"@types/node": "^17.0.23", | ||
"@types/react": "^17.0.33", | ||
"@types/react-dom": "^17.0.10", | ||
"@typescript-eslint/eslint-plugin": "^5.17.0", | ||
"@typescript-eslint/parser": "^5.17.0", | ||
"@vitejs/plugin-react": "^1.0.7", | ||
"autoprefixer": "^10.4.4", | ||
"crypto-browserify": "^3.12.0", | ||
"eslint": "^8.12.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-jest": "^26.1.3", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-react": "^7.29.4", | ||
"identity-obj-proxy": "^3.0.0", | ||
"jest": "^27.5.1", | ||
"jest-localstorage-mock": "^2.4.21", | ||
"jest-mock-extended": "^2.0.5", | ||
"postcss": "^8.4.12", | ||
"prettier": "^2.6.1", | ||
"stream-browserify": "^3.0.0", | ||
"tailwindcss": "^3.0.23", | ||
"ts-jest": "^27.1.4", | ||
"ts-node": "^10.7.0", | ||
"typescript": "~4.6.3", | ||
"vite": "^2.9.0", | ||
"vite-plugin-babel-macros": "^1.0.6", | ||
"vite-plugin-externals": "^0.4.0", | ||
"vite-plugin-top-level-await": "^0.0.4", | ||
"vite-plugin-wasm": "^0.0.2", | ||
"vite-tsconfig-paths": "^3.4.1" | ||
}, | ||
"resolutions": { | ||
"csstype": "3.0.10" | ||
"@types/node": "17.0.4", | ||
"@types/react": "17.0.38", | ||
"autoprefixer": "^10.4.0", | ||
"postcss": "^8.4.5", | ||
"prettier": "^2.5.1", | ||
"prettier-plugin-tailwindcss": "^0.1.1", | ||
"tailwindcss": "^3.0.7", | ||
"typescript": "4.5.4" | ||
} | ||
} |
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,8 @@ | ||
import '../styles/globals.css' | ||
import type { AppProps } from 'next/app' | ||
|
||
function MyApp({ Component, pageProps }: AppProps) { | ||
return <Component {...pageProps} /> | ||
} | ||
|
||
export default MyApp |
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,13 @@ | ||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction | ||
import type { NextApiRequest, NextApiResponse } from 'next' | ||
|
||
type Data = { | ||
name: string | ||
} | ||
|
||
export default function handler( | ||
req: NextApiRequest, | ||
res: NextApiResponse<Data> | ||
) { | ||
res.status(200).json({ name: 'John Doe' }) | ||
} |
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,86 @@ | ||
import type { NextPage } from 'next' | ||
import Head from 'next/head' | ||
import Image from 'next/image' | ||
|
||
const Home: NextPage = () => { | ||
return ( | ||
<div className="flex min-h-screen flex-col items-center justify-center py-2"> | ||
<Head> | ||
<title>Create Next App</title> | ||
<link rel="icon" href="/favicon.ico" /> | ||
</Head> | ||
|
||
<main className="flex w-full flex-1 flex-col items-center justify-center px-20 text-center"> | ||
<h1 className="text-6xl font-bold"> | ||
Welcome to{' '} | ||
<a className="text-blue-600" href="https://nextjs.org"> | ||
Next.js! | ||
</a> | ||
</h1> | ||
|
||
<p className="mt-3 text-2xl"> | ||
Get started by editing{' '} | ||
<code className="rounded-md bg-gray-100 p-3 font-mono text-lg"> | ||
pages/index.tsx | ||
</code> | ||
</p> | ||
|
||
<div className="mt-6 flex max-w-4xl flex-wrap items-center justify-around sm:w-full"> | ||
<a | ||
href="https://nextjs.org/docs" | ||
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600" | ||
> | ||
<h3 className="text-2xl font-bold">Documentation →</h3> | ||
<p className="mt-4 text-xl"> | ||
Find in-depth information about Next.js features and API. | ||
</p> | ||
</a> | ||
|
||
<a | ||
href="https://nextjs.org/learn" | ||
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600" | ||
> | ||
<h3 className="text-2xl font-bold">Learn →</h3> | ||
<p className="mt-4 text-xl"> | ||
Learn about Next.js in an interactive course with quizzes! | ||
</p> | ||
</a> | ||
|
||
<a | ||
href="https://github.com/vercel/next.js/tree/canary/examples" | ||
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600" | ||
> | ||
<h3 className="text-2xl font-bold">Examples →</h3> | ||
<p className="mt-4 text-xl"> | ||
Discover and deploy boilerplate example Next.js projects. | ||
</p> | ||
</a> | ||
|
||
<a | ||
href="https://vercel.com/import?filter=next.js&utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app" | ||
className="mt-6 w-96 rounded-xl border p-6 text-left hover:text-blue-600 focus:text-blue-600" | ||
> | ||
<h3 className="text-2xl font-bold">Deploy →</h3> | ||
<p className="mt-4 text-xl"> | ||
Instantly deploy your Next.js site to a public URL with Vercel. | ||
</p> | ||
</a> | ||
</div> | ||
</main> | ||
|
||
<footer className="flex h-24 w-full items-center justify-center border-t"> | ||
<a | ||
className="flex items-center justify-center gap-2" | ||
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Powered by{' '} | ||
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} /> | ||
</a> | ||
</footer> | ||
</div> | ||
) | ||
} | ||
|
||
export default Home |
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 @@ module.exports = { | |
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; | ||
} |
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,4 @@ | ||
module.exports = { | ||
singleQuote: true, | ||
semi: false, | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
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,23 +1,10 @@ | ||
const colors = require("tailwindcss/colors"); | ||
|
||
module.exports = { | ||
content: ["./src/**/*.{ts,tsx}"], | ||
content: [ | ||
'./pages/**/*.{js,ts,jsx,tsx}', | ||
'./components/**/*.{js,ts,jsx,tsx}', | ||
], | ||
theme: { | ||
extend: { | ||
colors: { | ||
purple: { | ||
darkpurple: "#0B0228", | ||
}, | ||
}, | ||
}, | ||
fontFamily: { | ||
miriamlibre: ["miriam libre"], | ||
librefranklin: ["Libre Franklin"], | ||
body: ['"Libre Franklin"'], | ||
}, | ||
minHeight: { | ||
default: "100vh", | ||
}, | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
}; | ||
} |
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,22 +1,20 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"useDefineForClassFields": true, | ||
"lib": ["DOM", "DOM.Iterable", "ESNext"], | ||
"allowJs": false, | ||
"skipLibCheck": false, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"module": "ESNext", | ||
"moduleResolution": "Node", | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "react-jsx" | ||
"jsx": "preserve", | ||
"incremental": true | ||
}, | ||
"include": ["src", "__test-fixtures__", "__tests__"], | ||
"references": [{ "path": "./tsconfig.node.json" }] | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], | ||
"exclude": ["node_modules"] | ||
} |
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.