diff --git a/explorer-nextjs/package.json b/explorer-nextjs/package.json index 24e6656a35..6f58ebdcd6 100644 --- a/explorer-nextjs/package.json +++ b/explorer-nextjs/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@nymproject/react": "^1.0.0", - "@nymproject/nym-validator-client": "0.18.0", + "@nymproject/nym-validator-client": "1.2.0", "next": "14.1.4", "react": "^18", "react-dom": "^18", diff --git a/explorer-nextjs/remark42/.eslintrc.json b/explorer-nextjs/remark42/.eslintrc.json new file mode 100644 index 0000000000..3722418549 --- /dev/null +++ b/explorer-nextjs/remark42/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": ["next/core-web-vitals", "next/typescript"] +} diff --git a/explorer-nextjs/remark42/.gitignore b/explorer-nextjs/remark42/.gitignore new file mode 100644 index 0000000000..26b002aac1 --- /dev/null +++ b/explorer-nextjs/remark42/.gitignore @@ -0,0 +1,40 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/versions + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# env files (can opt-in for commiting if needed) +.env* + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/explorer-nextjs/remark42/README.md b/explorer-nextjs/remark42/README.md new file mode 100644 index 0000000000..b9b4173512 --- /dev/null +++ b/explorer-nextjs/remark42/README.md @@ -0,0 +1,50 @@ +This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). + +## Getting Started + +Starting Docker: + +```bash +docker-compose pull +docker-compose up -d +``` + +Stopping Docker: + +```bash +docker-compose down +``` + + +First, run the development server: + +```bash +npm run dev -- -p 8080 +# or +yarn dev +# or +pnpm dev +# or +bun dev +``` + +Open [http://localhost:8080/](http://localhost:8080/) with your browser to see the result. + +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. + +This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! + +## Deploy on Vercel + +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. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/explorer-nextjs/remark42/docker-compose.yml b/explorer-nextjs/remark42/docker-compose.yml new file mode 100644 index 0000000000..c6b7e19052 --- /dev/null +++ b/explorer-nextjs/remark42/docker-compose.yml @@ -0,0 +1,43 @@ +version: "2" + +services: + remark: + # remove the next line in case you want to use this Docker Compose file separately + # as otherwise it would complain for absence of Dockerfile + build: . + image: umputun/remark42:latest + container_name: "remark42" + hostname: "remark42" + restart: always + + logging: + driver: json-file + options: + max-size: "10m" + max-file: "5" + + # uncomment to expose directly (no proxy) + ports: + - "8081:8080" + - "443:8443" + + environment: + - REMARK_URL=http://localhost:8081 + - SECRET=secret-key + - AUTH_ANON=true + - SITE=remark42 + # - DEBUG=true + # - AUTH_GOOGLE_CID + # - AUTH_GOOGLE_CSEC + # - AUTH_GITHUB_CID + # - AUTH_GITHUB_CSEC + # - AUTH_FACEBOOK_CID + # - AUTH_FACEBOOK_CSEC + # - AUTH_DISQUS_CID + # - AUTH_DISQUS_CSEC + # Enable it only for the initial comment import or for manual backups. + # Do not leave the server running with the ADMIN_PASSWD set if you don't have an intention + # to keep creating backups manually! + - ADMIN_PASSWD=password + volumes: + - ./var:/srv/var \ No newline at end of file diff --git a/explorer-nextjs/remark42/next.config.ts b/explorer-nextjs/remark42/next.config.ts new file mode 100644 index 0000000000..e9ffa3083a --- /dev/null +++ b/explorer-nextjs/remark42/next.config.ts @@ -0,0 +1,7 @@ +import type { NextConfig } from "next"; + +const nextConfig: NextConfig = { + /* config options here */ +}; + +export default nextConfig; diff --git a/explorer-nextjs/remark42/package.json b/explorer-nextjs/remark42/package.json new file mode 100644 index 0000000000..c4a1fdaae3 --- /dev/null +++ b/explorer-nextjs/remark42/package.json @@ -0,0 +1,24 @@ +{ + "name": "remark42-app", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "react": "19.0.0-rc-02c0e824-20241028", + "react-dom": "19.0.0-rc-02c0e824-20241028", + "next": "15.0.2" + }, + "devDependencies": { + "typescript": "^5", + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "eslint": "^8", + "eslint-config-next": "15.0.2" + } +} diff --git a/explorer-nextjs/remark42/public/file.svg b/explorer-nextjs/remark42/public/file.svg new file mode 100644 index 0000000000..004145cddf --- /dev/null +++ b/explorer-nextjs/remark42/public/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/explorer-nextjs/remark42/public/globe.svg b/explorer-nextjs/remark42/public/globe.svg new file mode 100644 index 0000000000..567f17b0d7 --- /dev/null +++ b/explorer-nextjs/remark42/public/globe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/explorer-nextjs/remark42/public/next.svg b/explorer-nextjs/remark42/public/next.svg new file mode 100644 index 0000000000..5174b28c56 --- /dev/null +++ b/explorer-nextjs/remark42/public/next.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/explorer-nextjs/remark42/public/vercel.svg b/explorer-nextjs/remark42/public/vercel.svg new file mode 100644 index 0000000000..7705396033 --- /dev/null +++ b/explorer-nextjs/remark42/public/vercel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/explorer-nextjs/remark42/public/window.svg b/explorer-nextjs/remark42/public/window.svg new file mode 100644 index 0000000000..b2b2a44f6e --- /dev/null +++ b/explorer-nextjs/remark42/public/window.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/explorer-nextjs/remark42/src/app/favicon.ico b/explorer-nextjs/remark42/src/app/favicon.ico new file mode 100644 index 0000000000..718d6fea48 Binary files /dev/null and b/explorer-nextjs/remark42/src/app/favicon.ico differ diff --git a/explorer-nextjs/remark42/src/app/fonts/GeistMonoVF.woff b/explorer-nextjs/remark42/src/app/fonts/GeistMonoVF.woff new file mode 100644 index 0000000000..f2ae185cbf Binary files /dev/null and b/explorer-nextjs/remark42/src/app/fonts/GeistMonoVF.woff differ diff --git a/explorer-nextjs/remark42/src/app/fonts/GeistVF.woff b/explorer-nextjs/remark42/src/app/fonts/GeistVF.woff new file mode 100644 index 0000000000..1b62daacff Binary files /dev/null and b/explorer-nextjs/remark42/src/app/fonts/GeistVF.woff differ diff --git a/explorer-nextjs/remark42/src/app/globals.css b/explorer-nextjs/remark42/src/app/globals.css new file mode 100644 index 0000000000..e3734be15e --- /dev/null +++ b/explorer-nextjs/remark42/src/app/globals.css @@ -0,0 +1,42 @@ +:root { + --background: #ffffff; + --foreground: #171717; +} + +@media (prefers-color-scheme: dark) { + :root { + --background: #0a0a0a; + --foreground: #ededed; + } +} + +html, +body { + max-width: 100vw; + overflow-x: hidden; +} + +body { + color: var(--foreground); + background: var(--background); + font-family: Arial, Helvetica, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +* { + box-sizing: border-box; + padding: 0; + margin: 0; +} + +a { + color: inherit; + text-decoration: none; +} + +@media (prefers-color-scheme: dark) { + html { + color-scheme: dark; + } +} diff --git a/explorer-nextjs/remark42/src/app/layout.tsx b/explorer-nextjs/remark42/src/app/layout.tsx new file mode 100644 index 0000000000..dca06aee77 --- /dev/null +++ b/explorer-nextjs/remark42/src/app/layout.tsx @@ -0,0 +1,33 @@ +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: "Create Next App", + description: "Generated by create next app", +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + + {children} + + + ); +} diff --git a/explorer-nextjs/remark42/src/app/page.module.css b/explorer-nextjs/remark42/src/app/page.module.css new file mode 100644 index 0000000000..ee9b8e6339 --- /dev/null +++ b/explorer-nextjs/remark42/src/app/page.module.css @@ -0,0 +1,168 @@ +.page { + --gray-rgb: 0, 0, 0; + --gray-alpha-200: rgba(var(--gray-rgb), 0.08); + --gray-alpha-100: rgba(var(--gray-rgb), 0.05); + + --button-primary-hover: #383838; + --button-secondary-hover: #f2f2f2; + + display: grid; + grid-template-rows: 20px 1fr 20px; + align-items: center; + justify-items: center; + min-height: 100svh; + padding: 80px; + gap: 64px; + font-family: var(--font-geist-sans); +} + +@media (prefers-color-scheme: dark) { + .page { + --gray-rgb: 255, 255, 255; + --gray-alpha-200: rgba(var(--gray-rgb), 0.145); + --gray-alpha-100: rgba(var(--gray-rgb), 0.06); + + --button-primary-hover: #ccc; + --button-secondary-hover: #1a1a1a; + } +} + +.main { + display: flex; + flex-direction: column; + gap: 32px; + grid-row-start: 2; +} + +.main ol { + font-family: var(--font-geist-mono); + padding-left: 0; + margin: 0; + font-size: 14px; + line-height: 24px; + letter-spacing: -0.01em; + list-style-position: inside; +} + +.main li:not(:last-of-type) { + margin-bottom: 8px; +} + +.main code { + font-family: inherit; + background: var(--gray-alpha-100); + padding: 2px 4px; + border-radius: 4px; + font-weight: 600; +} + +.ctas { + display: flex; + gap: 16px; +} + +.ctas a { + appearance: none; + border-radius: 128px; + height: 48px; + padding: 0 20px; + border: none; + border: 1px solid transparent; + transition: + background 0.2s, + color 0.2s, + border-color 0.2s; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + line-height: 20px; + font-weight: 500; +} + +a.primary { + background: var(--foreground); + color: var(--background); + gap: 8px; +} + +a.secondary { + border-color: var(--gray-alpha-200); + min-width: 180px; +} + +.footer { + grid-row-start: 3; + display: flex; + gap: 24px; +} + +.footer a { + display: flex; + align-items: center; + gap: 8px; +} + +.footer img { + flex-shrink: 0; +} + +/* Enable hover only on non-touch devices */ +@media (hover: hover) and (pointer: fine) { + a.primary:hover { + background: var(--button-primary-hover); + border-color: transparent; + } + + a.secondary:hover { + background: var(--button-secondary-hover); + border-color: transparent; + } + + .footer a:hover { + text-decoration: underline; + text-underline-offset: 4px; + } +} + +@media (max-width: 600px) { + .page { + padding: 32px; + padding-bottom: 80px; + } + + .main { + align-items: center; + } + + .main ol { + text-align: center; + } + + .ctas { + flex-direction: column; + } + + .ctas a { + font-size: 14px; + height: 40px; + padding: 0 16px; + } + + a.secondary { + min-width: auto; + } + + .footer { + flex-wrap: wrap; + align-items: center; + justify-content: center; + } +} + +@media (prefers-color-scheme: dark) { + .logo { + filter: invert(); + } +} diff --git a/explorer-nextjs/remark42/src/app/page.tsx b/explorer-nextjs/remark42/src/app/page.tsx new file mode 100644 index 0000000000..df963cf1b7 --- /dev/null +++ b/explorer-nextjs/remark42/src/app/page.tsx @@ -0,0 +1,57 @@ +import Head from "next/head"; +import Script from "next/script"; +import { Box } from "@mui/material"; + +export default function Home() { + return ( +
+ + Create Next App + + + +
NymNode X
+
Info about NymNode X
+
+ + {/* Configuration Script */} +