2026-04-07 21:33:31 -07:00
2026-04-07 21:33:31 -07:00

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 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 to automatically optimize and load Geist, a new font family for Vercel.

CyberLux on Tor (classroom / demo)

The UI uses fictional .onion names in places; live addresses come from your Tor daemon after you install the hidden services.

One-command launch: install tor and nginx (apt install tor nginx on Debian/Ubuntu), then:

chmod +x start.sh   # once
git pull && ./start.sh

The first step regenerates configs from scripts/onion-nodes.json (43 Tor v3 services → loopback 80808122, one .onion per top-level area). Then it runs git pull if .git exists (failure is non-fatal), npm install / npm run build. If .next/ is not writable (common after a sudo npm run build), the script runs sudo chown on .next for you. It then installs Tor + nginx via sudo (skip with CYBERLUX_SKIP_TOR=1 for local-only), prints every .onion URL, and starts Next on 127.0.0.1:3000. Use Tor Browser with http://YOUR56CHAR.onion.

To add or reorder onions, edit scripts/onion-nodes.json and run node scripts/generate-onion-config.cjs (also runs automatically on npm run build and via ./start.sh).

Manual steps (equivalent): sudo bash scripts/install-tor-onion.sh, then npm run build && npm run start:onion.

Start at boot (systemd): copy scripts/cyberlux.service, set User, Group, and WorkingDirectory to your clone, sudo install -m 0644 scripts/cyberlux.service /etc/systemd/system/, then sudo systemctl daemon-reload && sudo systemctl enable --now cyberlux.service. Tor and nginx should already be enabled; this only keeps Next running after reboot.

Build fails with EACCES on unlink / build-diagnostics.json: Next.js writes metadata under .next/diagnostics/build-diagnostics.json (build stage, options — not an app bug). If those files were created as root (e.g. sudo npm run build), your user cannot overwrite them. npm run build now stops in prebuild with a clear error instead of a cryptic unlink message. Fix once:

sudo bash scripts/fix-next-perms.sh

(or sudo chown -R "$USER" .next / sudo rm -rf .next), then npm run build or ./start.sh again.

Verify locally: after fixing permissions, run npm run verify — regenerates onion configs, runs tsc --noEmit, checks shell scripts, and runs a production build.

Security notes (for instructors): No stack is “perfectly” secure. This setup keeps the app off the public internet: nginx and Next listen on loopback; Tor exposes onion endpoints only. Optional: sudo bash scripts/classroom-ufw.sh — do not publish 3000 or nginx loopback ports (80808122) to the public internet. Tor improves reachability privacy for the service vs raw IP hosting; it does not make unsafe application code safe or absolve lawful/ethical/use-policy obligations—use only for legitimate teaching and demos.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

Description
personal-web-of-money
Readme MIT 673 KiB
Languages
TypeScript 93.7%
Shell 4.2%
JavaScript 1.2%
CSS 0.8%