-
Notifications
You must be signed in to change notification settings - Fork 308
Add Developer Hub to monorepo #2672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
60f0863
1da438c
b01e0a3
a6e9c64
a63891f
6adee5d
8ad2a70
3d94928
68c4312
9352934
67f61d1
3e14458
ee48c8c
f330b3d
3914dcc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,3 +25,4 @@ __pycache__ | |
| .turbo/ | ||
| .cursorrules | ||
| .corepack | ||
| justfile | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| .env*.local | ||
| .source |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| .next/ | ||
| coverage/ | ||
| node_modules/ | ||
| *.tsbuildinfo | ||
| .env*.local | ||
| .env | ||
| .DS_Store |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| title: Entropy How-To Guide | ||
| description: A placeholder docs page | ||
| --- | ||
|
|
||
| # How To | ||
|
|
||
| Build secure smart contracts with provably random numbers from Pyth Entropy. Launch NFTs, games, and other unique experiences that your users trust with seamless UX. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| title: Overview | ||
| description: A placeholder landing page | ||
| icon: CardsThree | ||
| full: true | ||
| --- | ||
|
|
||
| # Secure On-Chain Randomness | ||
|
|
||
| Build secure smart contracts with provably random numbers from Pyth Entropy. Launch NFTs, games, and other unique experiences that your users trust with seamless UX. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "root": true, | ||
| "title": "Entropy", | ||
| "description": "Random numbers for smart contracts", | ||
| "icon": "Shuffle", | ||
| "pages": ["index", "---Guides---", "how-to-guides"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| title: Express Relay How-To Guide | ||
| description: A placeholder docs page | ||
| --- | ||
|
|
||
| # How To | ||
|
|
||
| Integrate directly with searchers to recapture MEV. Go to market faster. Accelerate your protocol's growth. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| title: Overview | ||
| description: A placeholder landing page | ||
| icon: CardsThree | ||
| full: true | ||
| --- | ||
|
|
||
| # Take Back Control with Express Relay | ||
|
|
||
| Integrate directly with searchers to recapture MEV. Go to market faster. Accelerate your protocol's growth. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "root": true, | ||
| "title": "Express Relay", | ||
| "description": "Eliminate MEV", | ||
| "icon": "Gavel", | ||
| "pages": ["index", "---Guides---", "how-to-guides"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| title: Lazer How-To Guide | ||
| description: A placeholder docs page | ||
| --- | ||
|
|
||
| # How To | ||
|
|
||
| Pyth Lazer is a low latency, highly customizable price oracle. It offers a customizable set of price feeds, target chains (EVM or Solana) and channels (real time or fixed rate) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| title: Overview | ||
| description: A placeholder landing page | ||
| icon: CardsThree | ||
| full: true | ||
| --- | ||
|
|
||
| # Low latency, highly customizable price oracle | ||
|
|
||
| Pyth Lazer is a low latency, highly customizable price oracle. It offers a customizable set of price feeds, target chains (EVM or Solana) and channels (real time or fixed rate) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "root": true, | ||
| "title": "Lazer", | ||
| "description": "Low latency, highly customizable price oracle", | ||
| "icon": "Lightning", | ||
| "pages": ["index", "---Guides---", "how-to-guides"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "pages": ["pyth-core", "lazer", "express-relay", "entropy"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| title: Pyth Core How-To Guide | ||
| description: A placeholder docs page | ||
| --- | ||
|
|
||
| # Heading One | ||
|
|
||
| The fastest and most reliable data powering more transactions than any other oracle. Permissionless integration on every blockchain. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| title: Overview | ||
| description: A placeholder landing page | ||
| icon: CardsThree | ||
| full: true | ||
| --- | ||
|
|
||
| # Real-time data from financial institutions | ||
|
|
||
| The fastest and most reliable data powering more transactions than any other oracle. Permissionless integration on every blockchain. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "root": true, | ||
| "title": "Pyth Core", | ||
| "description": "Real-time data from financial institutions", | ||
| "icon": "ChartLine", | ||
| "pages": ["index", "---Guides---", "how-to-guides"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { nextjs as default } from "@cprussin/eslint-config"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { nextjs as default } from "@cprussin/jest-config/next"; |
| 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/app/api-reference/config/typescript for more information. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| import createBundleAnalyzer from "@next/bundle-analyzer"; | ||
|
||
| import { createMDX } from "fumadocs-mdx/next"; | ||
|
|
||
| const withAnalyzer = createBundleAnalyzer({ | ||
| enabled: process.env.ANALYZE === "true", | ||
| }); | ||
|
|
||
| const config = { | ||
| reactStrictMode: true, | ||
| pageExtensions: ["ts", "tsx", "mdx"], | ||
|
|
||
| logging: { | ||
| fetches: { | ||
| fullUrl: true, | ||
| }, | ||
| }, | ||
|
|
||
| webpack(config) { | ||
| config.module.rules.push({ | ||
| test: /\.svg$/i, | ||
| use: ["@svgr/webpack"], | ||
| }); | ||
|
|
||
| return config; | ||
| }, | ||
|
|
||
| headers: async () => [ | ||
| { | ||
| source: "/:path*", | ||
| headers: [ | ||
| { | ||
| key: "X-XSS-Protection", | ||
| value: "1; mode=block", | ||
| }, | ||
| { | ||
| key: "Referrer-Policy", | ||
| value: "strict-origin-when-cross-origin", | ||
| }, | ||
| { | ||
| key: "Strict-Transport-Security", | ||
| value: "max-age=2592000", | ||
| }, | ||
| { | ||
| key: "X-Content-Type-Options", | ||
| value: "nosniff", | ||
| }, | ||
| { | ||
| key: "Permissions-Policy", | ||
| value: | ||
| "vibrate=(), geolocation=(), midi=(), notifications=(), push=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), speaker=(), vibrate=(), fullscreen=self", | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| }; | ||
|
|
||
| const withMDX = createMDX(); | ||
|
|
||
| export default withAnalyzer(withMDX(config)); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| { | ||
| "name": "@pythnetwork/developer-hub", | ||
| "version": "0.0.0", | ||
| "private": true, | ||
| "type": "module", | ||
| "engines": { | ||
| "node": "22" | ||
| }, | ||
| "scripts": { | ||
| "build:vercel": "next build", | ||
| "build:analyze": "ANALYZE=true next build", | ||
| "fix:format": "prettier --write .", | ||
| "fix:lint:eslint": "eslint --fix .", | ||
| "fix:lint:stylelint": "stylelint --fix 'src/**/*.scss'", | ||
| "start:dev": "next dev --port 3627", | ||
| "start:prod": "next start --port 3627", | ||
| "test:format": "prettier --check .", | ||
| "test:lint:eslint": "eslint . --max-warnings 0", | ||
| "test:lint:stylelint": "stylelint 'src/**/*.scss' --max-warnings 0", | ||
| "test:types": "tsc" | ||
| }, | ||
| "dependencies": { | ||
| "@phosphor-icons/react": "catalog:", | ||
| "@pythnetwork/component-library": "workspace:*", | ||
| "@react-hookz/web": "catalog:", | ||
| "clsx": "catalog:", | ||
| "fumadocs-core": "catalog:", | ||
| "fumadocs-mdx": "catalog:", | ||
| "fumadocs-ui": "catalog:", | ||
| "next": "catalog:", | ||
| "next-themes": "catalog:", | ||
| "nuqs": "catalog:", | ||
| "react": "catalog:", | ||
| "react-aria": "catalog:", | ||
| "react-dom": "catalog:", | ||
| "zod": "catalog:", | ||
| "zod-validation-error": "catalog:" | ||
aaronbassett marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| "devDependencies": { | ||
| "@cprussin/eslint-config": "catalog:", | ||
| "@cprussin/jest-config": "catalog:", | ||
| "@cprussin/prettier-config": "catalog:", | ||
| "@cprussin/tsconfig": "catalog:", | ||
| "@next/bundle-analyzer": "catalog:", | ||
| "@svgr/webpack": "catalog:", | ||
| "@tailwindcss/postcss": "catalog:", | ||
| "@types/jest": "catalog:", | ||
| "@types/mdx": "catalog:", | ||
| "@types/node": "catalog:", | ||
| "@types/react": "catalog:", | ||
| "@types/react-dom": "catalog:", | ||
| "autoprefixer": "catalog:", | ||
| "eslint": "catalog:", | ||
| "jest": "catalog:", | ||
| "postcss": "catalog:", | ||
| "prettier": "catalog:", | ||
| "sass": "catalog:", | ||
| "stylelint": "catalog:", | ||
| "stylelint-config-standard-scss": "catalog:", | ||
| "tailwindcss": "^4.1.6", | ||
| "typescript": "catalog:", | ||
| "vercel": "catalog:" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| export default { | ||
| plugins: { | ||
| "@tailwindcss/postcss": {}, | ||
| }, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { base as default } from "@cprussin/prettier-config"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { | ||
| defineConfig, | ||
| defineDocs, | ||
| frontmatterSchema, | ||
| metaSchema, | ||
| } from "fumadocs-mdx/config"; | ||
| import { z } from "zod"; | ||
|
|
||
| export const docs = defineDocs({ | ||
| docs: { | ||
| schema: frontmatterSchema.extend({ | ||
| index: z.boolean().default(false), | ||
| }), | ||
| }, | ||
| meta: { | ||
| schema: metaSchema.extend({ | ||
| description: z.string().optional(), | ||
| }), | ||
| }, | ||
| }); | ||
|
|
||
| export default defineConfig({ | ||
| mdxOptions: { | ||
| // MDX options | ||
| }, | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| export { DocumentationPage as default } from "../../../../components/Pages/DocumentationPage"; | ||
| import type { Metadata } from "next"; | ||
| import { notFound } from "next/navigation"; | ||
| import { source } from "../../../../source"; | ||
|
|
||
| export async function generateStaticParams() { | ||
| return source.generateParams(); | ||
| } | ||
|
|
||
| export async function generateMetadata(props: { | ||
| params: Promise<{ section: string; slug: string[] }>; | ||
| }) { | ||
| const params = await props.params; | ||
|
|
||
| const page = source.getPage([params.section, ...params.slug]); | ||
|
|
||
| if (!page) notFound(); | ||
|
|
||
| return { | ||
| title: page.data.title, | ||
| description: page.data.description, | ||
| } satisfies Metadata; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| export { LandingPage as default } from "../../../components/Pages/LandingPage"; | ||
| import type { Metadata } from "next"; | ||
| import { notFound } from "next/navigation"; | ||
| import { source } from "../../../source"; | ||
|
|
||
| export async function generateStaticParams() { | ||
| return source.generateParams(); | ||
| } | ||
|
|
||
| export async function generateMetadata(props: { | ||
| params: Promise<{ section: string }>; | ||
| }) { | ||
| const params = await props.params; | ||
| const page = source.getPage([params.section]); | ||
|
|
||
| if (!page) notFound(); | ||
|
|
||
| return { | ||
| title: page.data.title, | ||
| description: page.data.description, | ||
| } satisfies Metadata; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { DocsLayout } from "fumadocs-ui/layouts/docs"; | ||
| import type { ReactNode } from "react"; | ||
| import { docsOptions } from "../../config/layout.config"; | ||
|
|
||
| export default function Layout({ children }: { children: ReactNode }) { | ||
| return <DocsLayout {...docsOptions}>{children}</DocsLayout>; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { HomeLayout } from "fumadocs-ui/layouts/home"; | ||
| import type { ReactNode } from "react"; | ||
| import { baseOptions } from "../../config/layout.config"; | ||
|
|
||
| export default function Layout({ children }: { children: ReactNode }) { | ||
| return <HomeLayout {...baseOptions}>{children}</HomeLayout>; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { Homepage as default } from "../../components/Pages/Homepage"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import { source } from "@/src/source"; | ||
| import { createFromSource } from "fumadocs-core/search/server"; | ||
|
|
||
| export const { GET } = createFromSource(source); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| export { Root as default } from "../components/Root"; | ||
| export { metadata, viewport } from "../metadata"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import type { MetadataRoute } from "next"; | ||
|
|
||
| import { IS_PRODUCTION_SERVER } from "../config/server"; | ||
|
|
||
| const robots = (): MetadataRoute.Robots => ({ | ||
| rules: { | ||
| userAgent: "*", | ||
| ...(IS_PRODUCTION_SERVER ? { allow: "/" } : { disallow: "/" }), | ||
| }, | ||
| }); | ||
| export default robots; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm what is this? Is it intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, justfile is like a Makefile (but with a simplified syntax) it's a local command runner I use in terminal which probably isn't helpful to commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
totally reasonable, feel free to commit files like this if you think they may be useful for others, for instance I've committed my nix files (flake.nix etc) -- maybe in a separate commit though