Skip to content

Commit 28caaa0

Browse files
committed
feat(insights): initialize insights hub
1 parent 69950f9 commit 28caaa0

Some content is hidden

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

75 files changed

+3147
-2362
lines changed

.prettierignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ patches/
1919
# build graph config.
2020
apps/api-reference
2121
apps/staking
22+
apps/insights
2223
governance/pyth_staking_sdk
23-
packages/component-library
24-
packages/fonts
24+
packages/*

apps/insights/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env*.local

apps/insights/.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.next/
2+
coverage/
3+
node_modules/
4+
*.tsbuildinfo
5+
.env*.local
6+
.env
7+
.DS_Store

apps/insights/eslint.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { fileURLToPath } from "node:url";
2+
3+
import { nextjs, tailwind, storybook } from "@cprussin/eslint-config";
4+
5+
const tailwindConfig = fileURLToPath(
6+
import.meta.resolve(`./tailwind.config.ts`),
7+
);
8+
9+
export default [...nextjs, ...tailwind(tailwindConfig), ...storybook];

apps/insights/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { nextjs as default } from "@cprussin/jest-config";

apps/insights/next-env.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.

apps/insights/next.config.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
const config = {
2+
reactStrictMode: true,
3+
4+
pageExtensions: ["ts", "tsx", "mdx"],
5+
6+
logging: {
7+
fetches: {
8+
fullUrl: true,
9+
},
10+
},
11+
12+
webpack(config) {
13+
config.module.rules.push({
14+
test: /\.svg$/i,
15+
use: ["@svgr/webpack"],
16+
});
17+
18+
config.resolve.extensionAlias = {
19+
".js": [".js", ".ts", ".tsx"],
20+
};
21+
22+
return config;
23+
},
24+
25+
transpilePackages: ["@pythnetwork/*"],
26+
27+
headers: async () => [
28+
{
29+
source: "/:path*",
30+
headers: [
31+
{
32+
key: "X-XSS-Protection",
33+
value: "1; mode=block",
34+
},
35+
{
36+
key: "Referrer-Policy",
37+
value: "strict-origin-when-cross-origin",
38+
},
39+
{
40+
key: "Strict-Transport-Security",
41+
value: "max-age=2592000",
42+
},
43+
{
44+
key: "X-Content-Type-Options",
45+
value: "nosniff",
46+
},
47+
{
48+
key: "Permissions-Policy",
49+
value:
50+
"vibrate=(), geolocation=(), midi=(), notifications=(), push=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), speaker=(), vibrate=(), fullscreen=self",
51+
},
52+
],
53+
},
54+
],
55+
};
56+
export default config;

apps/insights/package.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "@pythnetwork/insights",
3+
"version": "0.0.0",
4+
"private": true,
5+
"type": "module",
6+
"engines": {
7+
"node": "20"
8+
},
9+
"scripts": {
10+
"build": "next build",
11+
"fix:format": "prettier --write .",
12+
"fix:lint": "eslint --fix .",
13+
"start:dev": "next dev --port 3003",
14+
"start:prod": "next start --port 3003",
15+
"test:format": "prettier --check .",
16+
"test:lint": "jest --selectProjects lint",
17+
"test:types": "tsc"
18+
},
19+
"dependencies": {
20+
"@pythnetwork/app-logger": "workspace:*",
21+
"@pythnetwork/component-library": "workspace:*",
22+
"@pythnetwork/fonts": "workspace:*",
23+
"@pythnetwork/next-root": "workspace:*",
24+
"clsx": "catalog:",
25+
"next": "catalog:",
26+
"react": "catalog:",
27+
"react-dom": "catalog:"
28+
},
29+
"devDependencies": {
30+
"@cprussin/eslint-config": "catalog:",
31+
"@cprussin/jest-config": "catalog:",
32+
"@cprussin/prettier-config": "catalog:",
33+
"@cprussin/tsconfig": "catalog:",
34+
"@svgr/webpack": "catalog:",
35+
"@types/jest": "catalog:",
36+
"@types/node": "catalog:",
37+
"@types/react": "catalog:",
38+
"@types/react-dom": "catalog:",
39+
"autoprefixer": "catalog:",
40+
"eslint": "catalog:",
41+
"jest": "catalog:",
42+
"postcss": "catalog:",
43+
"prettier": "catalog:",
44+
"tailwindcss": "catalog:",
45+
"typescript": "catalog:",
46+
"vercel": "catalog:"
47+
}
48+
}

apps/insights/postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
plugins: {
3+
autoprefixer: {},
4+
tailwindcss: {},
5+
},
6+
};

apps/insights/prettier.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { fileURLToPath } from "node:url";
2+
3+
import { base, tailwind, mergeConfigs } from "@cprussin/prettier-config";
4+
5+
const tailwindConfig = fileURLToPath(
6+
import.meta.resolve(`./tailwind.config.ts`),
7+
);
8+
9+
export default mergeConfigs([base, tailwind(tailwindConfig)]);

0 commit comments

Comments
 (0)