Skip to content
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

feat(entropy-debug) Add Entropy debug app #2274

Merged
merged 3 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ patches/
apps/api-reference
apps/staking
apps/insights
apps/entropy-debug
governance/pyth_staking_sdk
packages/*
1 change: 1 addition & 0 deletions apps/entropy-debugger/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env*.local
7 changes: 7 additions & 0 deletions apps/entropy-debugger/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.next/
coverage/
node_modules/
*.tsbuildinfo
.env*.local
.env
.DS_Store
Empty file added apps/entropy-debugger/README.md
Empty file.
14 changes: 14 additions & 0 deletions apps/entropy-debugger/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "lucide"
}
1 change: 1 addition & 0 deletions apps/entropy-debugger/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { nextjs as default } from "@cprussin/eslint-config";
1 change: 1 addition & 0 deletions apps/entropy-debugger/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { nextjs as default } from "@cprussin/jest-config";
5 changes: 5 additions & 0 deletions apps/entropy-debugger/next-env.d.ts
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.
49 changes: 49 additions & 0 deletions apps/entropy-debugger/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const config = {
reactStrictMode: true,

pageExtensions: ["ts", "tsx", "mdx"],

logging: {
fetches: {
fullUrl: true,
},
},

webpack(config) {
config.resolve.extensionAlias = {
".js": [".js", ".ts", ".tsx"],
};

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",
},
],
},
],
};
export default config;
52 changes: 52 additions & 0 deletions apps/entropy-debugger/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "@pythnetwork/entropy-debugger",
"version": "0.0.0",
"private": true,
"type": "module",
"engines": {
"node": "22"
},
"scripts": {
"build": "next build",
"fix:format": "prettier --write .",
"fix:lint": "eslint --fix .",
"start:dev": "next dev --port 3005",
"start:prod": "next start --port 3005",
"test:format": "prettier --check .",
"test:lint": "eslint .",
"test:types": "tsc"
},
"dependencies": {
"@radix-ui/react-select": "^2.1.2",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-switch": "^1.1.1",
"class-variance-authority": "^0.7.1",
"clsx": "catalog:",
"highlight.js": "^11.10.0",
"lucide-react": "^0.465.0",
"next": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"tailwind-merge": "^2.5.5",
"tailwindcss-animate": "^1.0.7",
"viem": "^2.21.53",
"zod": "catalog:"
},
"devDependencies": {
"@cprussin/eslint-config": "catalog:",
"@cprussin/jest-config": "catalog:",
"@cprussin/prettier-config": "catalog:",
"@cprussin/tsconfig": "catalog:",
"@types/jest": "catalog:",
"@types/node": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"eslint": "catalog:",
"jest": "catalog:",
"postcss": "catalog:",
"prettier": "catalog:",
"tailwindcss": "catalog:",
"typescript": "catalog:",
"vercel": "catalog:"
}
}
8 changes: 8 additions & 0 deletions apps/entropy-debugger/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;
1 change: 1 addition & 0 deletions apps/entropy-debugger/prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { base as default } from "@cprussin/prettier-config";
7 changes: 7 additions & 0 deletions apps/entropy-debugger/prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.next/
coverage/
node_modules/
*.tsbuildinfo
.env*.local
.env
.DS_Store
Binary file added apps/entropy-debugger/src/app/favicon.ico
Binary file not shown.
Binary file not shown.
Binary file added apps/entropy-debugger/src/app/fonts/GeistVF.woff
Binary file not shown.
72 changes: 72 additions & 0 deletions apps/entropy-debugger/src/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

body {
font-family: Arial, Helvetica, sans-serif;
}

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 0 0% 3.9%;
--card: 0 0% 100%;
--card-foreground: 0 0% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 0 0% 3.9%;
--primary: 0 0% 9%;
--primary-foreground: 0 0% 98%;
--secondary: 0 0% 96.1%;
--secondary-foreground: 0 0% 9%;
--muted: 0 0% 96.1%;
--muted-foreground: 0 0% 45.1%;
--accent: 0 0% 96.1%;
--accent-foreground: 0 0% 9%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 89.8%;
--input: 0 0% 89.8%;
--ring: 0 0% 3.9%;
--chart-1: 12 76% 61%;
--chart-2: 173 58% 39%;
--chart-3: 197 37% 24%;
--chart-4: 43 74% 66%;
--chart-5: 27 87% 67%;
--radius: 0.5rem;
}
.dark {
--background: 0 0% 3.9%;
--foreground: 0 0% 98%;
--card: 0 0% 3.9%;
--card-foreground: 0 0% 98%;
--popover: 0 0% 3.9%;
--popover-foreground: 0 0% 98%;
--primary: 0 0% 98%;
--primary-foreground: 0 0% 9%;
--secondary: 0 0% 14.9%;
--secondary-foreground: 0 0% 98%;
--muted: 0 0% 14.9%;
--muted-foreground: 0 0% 63.9%;
--accent: 0 0% 14.9%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 14.9%;
--input: 0 0% 14.9%;
--ring: 0 0% 83.1%;
--chart-1: 220 70% 50%;
--chart-2: 160 60% 45%;
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
}
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
35 changes: 35 additions & 0 deletions apps/entropy-debugger/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import type { Metadata } from "next";
import localFont from "next/font/local";
import "./globals.css";

const geistSans = localFont({
src: "./fonts/GeistVF.woff",
variable: "--font-geist-sans",
weight: "100 900",
});
const geistMono = localFont({
src: "./fonts/GeistMonoVF.woff",
variable: "--font-geist-mono",
weight: "100 900",
});

export const metadata: Metadata = {
title: "Pyth Entropy Debug App",
description: "Pyth Entropy Debug App",
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
</body>
</html>
);
}
Loading
Loading