Skip to content

Commit

Permalink
did explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
gaowhen committed Jun 28, 2024
1 parent de86758 commit 11570af
Show file tree
Hide file tree
Showing 30 changed files with 3,372 additions and 2,292 deletions.
46 changes: 17 additions & 29 deletions explorer-ui/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
# Create T3 App

This is a [T3 Stack](https://create.t3.gg/) project bootstrapped with `create-t3-app`.

## What's next? How do I make an app with this?

We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary.

If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our [Discord](https://t3.gg/discord) and ask for help.

- [Next.js](https://nextjs.org)
- [NextAuth.js](https://next-auth.js.org)
- [Prisma](https://prisma.io)
- [Drizzle](https://orm.drizzle.team)
- [Tailwind CSS](https://tailwindcss.com)
- [tRPC](https://trpc.io)

## Learn More

To learn more about the [T3 Stack](https://create.t3.gg/), take a look at the following resources:

- [Documentation](https://create.t3.gg/)
- [Learn the T3 Stack](https://create.t3.gg/en/faq#what-learning-resources-are-currently-available) — Check out these awesome tutorials

You can check out the [create-t3-app GitHub repository](https://github.com/t3-oss/create-t3-app) — your feedback and contributions are welcome!

## How do I deploy this?

Follow our deployment guides for [Vercel](https://create.t3.gg/en/deployment/vercel), [Netlify](https://create.t3.gg/en/deployment/netlify) and [Docker](https://create.t3.gg/en/deployment/docker) for more information.
# DID Explorer

### Deploy

Next, in the [Cloudflare Dashboard](https://dash.cloudflare.com/?to=/:account/pages), create a new Pages project:

- Navigate to the project creation pages (_Your account Home_ > _Workers & Pages_ > _Create application_ > _Pages_ > _Connect to Git_).
- Select the GitHub/GitLab repository you pushed your code to.
- Choose a project name and your production branch.
- Select _Next.js_ as the _Framework preset_ and provide the following options:
| Option | Value |
| ---------------------- | ---------------------------------- |
| Build command | `npx @cloudflare/next-on-pages@1` |
| Build output directory | `.vercel/output/static` |
- In the _Environment variables (advanced)_ section, add a new variable named `NODE_VERSION` set to `20` or greater.
- Click on _Save and Deploy_ to start the deployment (this first deployment won't be fully functional as the next step is also necessary).
- Go to the Pages project settings page (_Settings_ > _Functions_ > _Compatibility Flags_), **add the `nodejs_compat` flag** for both production and preview, and make sure that the **Compatibility Date** for both production and preview is set to at least `2022-11-30`.
6 changes: 3 additions & 3 deletions explorer-ui/codegen.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { type CodegenConfig } from '@graphql-codegen/cli'

const config: CodegenConfig = {
schema: 'http://localhost:10700/branch/main/graphql',
schema: 'http://localhost:10701/branch/main/graphql',
documents: ['src/queries.ts'],
ignoreNoDocuments: true, // for better experience with the watcher
generates: {
'./src/gql/': {
preset: 'client',
'./src/gql/graphql.ts': {
// preset: 'client',
plugins: [
'typescript',
'typescript-operations',
Expand Down
17 changes: 17 additions & 0 deletions explorer-ui/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/styles/globals.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
4 changes: 4 additions & 0 deletions explorer-ui/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ await import("./src/env.js");

/** @type {import("next").NextConfig} */
const config = {
// output: "export",
reactStrictMode: true,

/**
Expand All @@ -18,6 +19,9 @@ const config = {
defaultLocale: "en",
},
transpilePackages: ["geist"],
images: {
unoptimized: true,
},
};

export default config;
8 changes: 8 additions & 0 deletions explorer-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,25 @@
},
"dependencies": {
"@graphql-typed-document-node/core": "^3.2.0",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-slot": "^1.1.0",
"@t3-oss/env-nextjs": "^0.10.1",
"@tanstack/react-query": "^5.45.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"geist": "^1.3.0",
"graphql": "^16.9.0",
"graphql-request": "^7.1.0",
"lucide-react": "^0.397.0",
"next": "^14.2.1",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.23.3"
},
"devDependencies": {
"@cloudflare/next-on-pages": "^1.12.0",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/client-preset": "^4.3.0",
"@parcel/watcher": "^2.4.1",
Expand Down
Loading

0 comments on commit 11570af

Please sign in to comment.