Skip to content

Commit e336607

Browse files
committed
Initial setup
0 parents  commit e336607

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1641
-0
lines changed

.env.example

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
NEXT_PUBLIC_ETHEREUM_PROVIDER=
2+
NEXT_PUBLIC_BLOCKCHAIN_EXPLORER_URL=
3+
NEXT_PUBLIC_BLOCKCHAIN_EXPLORER_NAME=
4+
NEXT_PUBLIC_MAGIC_API_KEY=
5+
NEXT_PUBLIC_FEATURED_TOKEN=
6+
NEXT_PUBLIC_PINATA_API_KEY=
7+
NEXT_PUBLIC_PINATA_SECRET_KEY=
8+
NEXT_PUBLIC_GRAPHQL_URL=http://localhost:4000/graphql
9+
NEXT_PUBLIC_UPLOAD_URL=http://localhost:4000/uploadToIPFS
10+
NEXT_PUBLIC_CHAIN_ID="3"
11+
NEXT_PUBLIC_NETWORK_NAME="Ropsten"
12+
NEXT_PUBLIC_REPORT_EMAIL="[email protected]"
13+
NEXT_PUBLIC_HOME_TOKENS=
14+
NEXT_PUBLIC_BUGSNAG_API_KEY=
15+
PINATA_GATEWAY="liteflow.mypinata.cloud"
16+
NEXT_PUBLIC_OFFER_VALIDITY_IN_SECONDS="2419200"
17+
NEXT_PUBLIC_AUCTION_VALIDITY_IN_SECONDS="604800"
18+
NEXT_PUBLIC_BASE_URL=https://nft.liteflow.com
19+
# PROD ONLY
20+
NEXT_PUBLIC_GA_MEASUREMENT_ID=

.eslintignore

Whitespace-only changes.

.eslintrc.js

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
sourceType: 'module',
5+
project: 'tsconfig.json',
6+
tsconfigRootDir: __dirname,
7+
},
8+
plugins: [
9+
'@typescript-eslint/eslint-plugin',
10+
'unused-imports',
11+
'deprecation',
12+
],
13+
extends: [
14+
'plugin:@typescript-eslint/eslint-recommended',
15+
'plugin:@typescript-eslint/recommended',
16+
'prettier',
17+
'next',
18+
'plugin:react-hooks/recommended'
19+
],
20+
root: true,
21+
env: {
22+
node: true,
23+
jest: true,
24+
},
25+
rules: {
26+
'@typescript-eslint/interface-name-prefix': 'off',
27+
'@typescript-eslint/explicit-function-return-type': 'off',
28+
'@typescript-eslint/no-explicit-any': 'off',
29+
'@typescript-eslint/no-floating-promises': 'error',
30+
'@typescript-eslint/await-thenable': 'error',
31+
'deprecation/deprecation': 'error',
32+
'@typescript-eslint/no-unused-vars': 'off',
33+
'@typescript-eslint/no-unused-vars-experimental': 'error',
34+
'@typescript-eslint/no-var-requires': 'off',
35+
'@typescript-eslint/ban-types': 'off',
36+
'@next/next/no-html-link-for-pages': ['error', `${__dirname}/pages`],
37+
'react-hooks/exhaustive-deps': 'error',
38+
},
39+
}

.github/workflows/ci.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
on: [push]
3+
jobs:
4+
lint:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout repo
8+
uses: actions/checkout@v2
9+
10+
- name: Install Node
11+
uses: actions/setup-node@v2
12+
with:
13+
node-version: 16
14+
cache: 'npm'
15+
registry-url: 'https://registry.npmjs.org'
16+
17+
- name: Node version
18+
run: node -v
19+
20+
- name: Npm version
21+
run: npm -v
22+
23+
- name: Set version in env
24+
run: |
25+
echo "node-version=$(node -v)" >> $GITHUB_ENV
26+
echo "npm-version=$(npm -v)" >> $GITHUB_ENV
27+
28+
- name: Cache node modules
29+
uses: actions/cache@v2
30+
env:
31+
cache-name: cache-node-modules
32+
with:
33+
path: '**/node_modules'
34+
key: ${{ runner.os }}-${{ env.cache-name }}-node${{ env.node-version }}-npm${{ env.npm-version }}-${{ hashFiles('**/package-lock.json') }}
35+
restore-keys: |
36+
${{ runner.os }}-${{ env.cache-name }}-node${{ env.node-version }}-npm${{ env.npm-version }}-
37+
38+
- name: Install dependencies
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
run: npm install
42+
43+
- name: Lint
44+
run: npm run lint

.gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
.idea
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env.local
30+
.env.*.local
31+
32+
# vercel
33+
.vercel

.npmrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
engine-strict=true
2+
@fortawesome:registry=https://npm.fontawesome.com/
3+
//npm.fontawesome.com/:_authToken=973A3794-8531-4E3B-B041-5C0BD7D82D9D

.prettierignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
**/node_modules
2+
3+
packages/api/src/graphql.ts
4+
5+
packages/hooks/graphql.ts
6+
7+
packages/components/graphql.ts
8+
9+
packages/templates/graphql.ts
10+
packages/templates/**/*.mock.json
11+
12+
apps/admin/.next
13+
apps/admin/graphql.ts
14+
15+
apps/demo/.next
16+
17+
apps/o-mee/.next
18+
19+
apps/demo/.next
20+
21+
apps/gig/.next
22+
23+
packages/indexer/src/contracts
24+
packages/worker/src/contracts
25+
26+
scripts/src/contracts

.prettierrc.js

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const tailwind = require('prettier-plugin-tailwindcss')
2+
const organizeImports = require('prettier-plugin-organize-imports')
3+
4+
// https://github.com/tailwindlabs/prettier-plugin-tailwindcss/issues/31
5+
const combinedFormatter = {
6+
...tailwind,
7+
parsers: {
8+
...tailwind.parsers,
9+
...Object.keys(organizeImports.parsers).reduce((acc, key) => {
10+
acc[key] = {
11+
...tailwind.parsers[key],
12+
preprocess(code, options) {
13+
return organizeImports.parsers[key].preprocess(code, options)
14+
},
15+
}
16+
return acc
17+
}, {}),
18+
},
19+
}
20+
21+
module.exports = {
22+
singleQuote: true,
23+
trailingComma: 'all',
24+
semi: false,
25+
printWidth: 80,
26+
plugins: [combinedFormatter],
27+
overrides: [
28+
{
29+
files: '**/*.sol',
30+
options: {
31+
singleQuote: false,
32+
},
33+
},
34+
],
35+
}

README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
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).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
```
12+
13+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14+
15+
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
16+
17+
[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.js`.
18+
19+
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.
20+
21+
## Learn More
22+
23+
To learn more about Next.js, take a look at the following resources:
24+
25+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
26+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27+
28+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
29+
30+
## Deploy on Vercel
31+
32+
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.
33+
34+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

apollo.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
client: {
3+
service: {
4+
name: 'NFT',
5+
url: 'http://localhost:4000/graphql',
6+
},
7+
},
8+
}

components/Banner/Banner.tsx

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import Link from 'next/link'
2+
import { FC } from 'react'
3+
4+
const Banner: FC = () => {
5+
return (
6+
<div className="fixed top-0 z-50 flex h-12 w-full translate-y-0 transform items-center bg-gray-700">
7+
<Link href="/">
8+
<a className="bg-brand-500 flex h-full w-12 items-center justify-center">
9+
<svg
10+
width="16"
11+
height="24"
12+
viewBox="0 0 16 24"
13+
fill="none"
14+
xmlns="http://www.w3.org/2000/svg"
15+
className="h-6"
16+
>
17+
<path
18+
d="M0.204254 24V0H4.59574V20.3915H15.7957V24H0.204254Z"
19+
fill="white"
20+
/>
21+
</svg>
22+
</a>
23+
</Link>
24+
<span className="ml-4 hidden text-sm font-semibold leading-5 text-white md:flex">
25+
NFT Marketplace as a Service
26+
</span>
27+
<div className="bg-brand-100 mx-3 hidden items-center rounded-full md:flex">
28+
<span className="text-brand-500 py-1 px-3 text-xs font-medium leading-4">
29+
Developer Preview
30+
</span>
31+
</div>
32+
<a
33+
href="https://calendly.com/anthony-estebe/liteflow-nft-marketplace"
34+
target="_blank"
35+
rel="noreferrer"
36+
className="mr-5 ml-auto flex items-center rounded bg-[#6CB310] py-1 px-3 shadow-sm hover:bg-[#55990B] lg:mr-8"
37+
>
38+
<span className="text-xs font-semibold leading-4 text-white">
39+
Schedule a Demo
40+
</span>
41+
</a>
42+
</div>
43+
)
44+
}
45+
46+
export default Banner

components/Head.tsx

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import NextHead from 'next/head'
2+
import { FC, PropsWithChildren } from 'react'
3+
import environment from '../environment'
4+
5+
type Props = {
6+
title: string
7+
description?: string
8+
image?: string
9+
}
10+
11+
const Head: FC<PropsWithChildren<Props>> = ({
12+
title,
13+
description,
14+
image,
15+
children,
16+
}) => {
17+
return (
18+
<NextHead>
19+
<title>{title} - Liteflow NFT Marketplace</title>
20+
<meta property="og:title" content={title} />
21+
<meta name="twitter:title" content={title} />
22+
{description && (
23+
<>
24+
<meta name="description" content={description} />
25+
<meta property="og:description" content={description} />
26+
<meta name="twitter:description" content={description} />
27+
</>
28+
)}
29+
<meta
30+
property="og:image"
31+
content={image || `${environment.BASE_URL}/og-image.jpg`}
32+
/>
33+
<meta
34+
name="twitter:image"
35+
content={image || `${environment.BASE_URL}/twitter-card.jpg`}
36+
/>
37+
{children}
38+
</NextHead>
39+
)
40+
}
41+
42+
export default Head

0 commit comments

Comments
 (0)