Every name is a door. Some only open once.
Live Demo Β· h4sib.pro Β· kortzlab.pro Β· Discord: kirawth Β· Social: hasibwth
A dark, atmospheric, heavily animated digital notebook inspired by the concept of Death Note. Styled in stark, rainy black and white with gothic cathedral light; red appears only where it matters: apples, shinigami eyes and the last seconds before the ink sets. Open the cursed book, read its rules, and write in ink. Everything you see is original: the notebook, the shinigami, the rules, the cathedral backdrop, the sounds (synthesised in your browser) and the effects.
Note
Unofficial fan project. Not affiliated with the creators or publishers of Death Note. For fiction and fun only. Don't use this to threaten or harass real people.
| The notebook falls | The cover opens, pages curl |
|---|---|
![]() |
![]() |
| Writing in ink, with the 40-second ring | The rules write themselves as you scroll |
![]() |
![]() |
| Sponsor modal (70% to charity) | Mobile (CSS fallback) |
![]() |
![]() |
Recording the GIFs (intro fall, page flip, ink writing, sponsor modal)
Animated previews are best recorded by hand. Placeholders to fill in:
.github/assets/gifs/intro-fall.gifβ load/, wait for the book to land and open it.github/assets/gifs/page-flip.gifβ on/notebook, drag a page corner slowly.github/assets/gifs/ink-writing.gifβ type a name and let the 40-second ring finish.github/assets/gifs/sponsor-modal.gifβ open the wax seal, pick chips and a custom amount
On Windows: press Win+Alt+R (Xbox Game Bar) or use ScreenToGif at 30 fps, 1280Γ720, then keep each GIF under ~8 MB. Turn sound on in the header first if you also record video.
- Cinematic intro (WebGL) β drifting ash and embers, the notebook falls in slow motion, lands with a camera shake and a dust burst, tilts toward your cursor with light sliding over the leather. An etched gothic title flickers like embers. Click or drag to open the heavy cover.
- A real-feeling book β 3D pages that curl as they turn (vertex-shader bending), plus a DOM flip-book for writing with drag/swipe, edge buttons, β β and the mouse wheel, bending shadows, aged paper, stains, a swaying ribbon bookmark, contents page and handwritten page numbers.
- Writing in ink β every typed character bleeds onto the page; a 40-second ring starts after a name is written, then a red flash, a heartbeat, and the ink sets darker. Ink drips, a candle that flickers harder when you type fast, and wind lifting the page when idle.
- Shinigami presence β an original silhouette appears behind the book now and then, its eyes following your cursor. Whispers fade in at the margins. A hidden apple opens a secret page, and the Konami code unlocks Shinigami Eyes.
- Guests write immediately (localStorage). Signed-in users (e-mail and password) sync to PostgreSQL with debounced autosave, a "saved" ink stamp and a one-click import of guest notes. Search, edit, delete, export a page as PNG or PDF, or share an image with names blurred.
- The Open Book β one public notebook everyone can write in, no sign-in needed. Unlimited pages (loaded a chapter at a time), autosaved on write, live "new names" updates, pen names, page jumps and a random page. Authors can withdraw their own entries.
- Shared pages β share any note from your notebook or the Open Book. It gets its own page
(
/n/<id>) with a generated preview image and shows up on the home page. Owners can unshare. - Candles & reports β light a candle for a page (one per person), or report it. Three
reports from different people hide an item until a moderator reviews it in
/admin. - Privacy & safety β your own notebook stays private; public content goes through the same content guard (threats, slurs, personal data), strict rate limits, and IPs are only ever stored as salted hashes.
- Sponsor with crypto (OxaPay) β recommended chips and a custom amount, a live "70% goes to charity" split, verified webhooks only, a themed return page and an opt-in supporters page.
- Accessible & fast β reduced-motion version with fades only, lazy-loaded 3D with an ink loading bar, 2D fallback for weak or missing WebGL, keyboard navigation and ARIA labels. Lighthouse (desktop): Accessibility 100, Performance 92β99.
| Layer | Choice |
|---|---|
| Framework | Next.js 16 (App Router), React 19, TypeScript 6 (strict) |
| Styling | Tailwind CSS 4, self-hosted OFL fonts (UnifrakturCook, IM Fell English, Caveat, Homemade Apple) |
| Animation | GSAP 3 + ScrollTrigger, Motion (Framer Motion), CSS 3D |
| 3D | Three.js via @react-three/fiber and @react-three/drei |
| Data | PostgreSQL 16 + Prisma 7 (driver adapter @prisma/adapter-pg) |
| Auth | Auth.js v5 (e-mail/password with argon2id) |
| Validation | Zod 4 on the client and the server |
| Sound | Howler.js playing sounds synthesised at runtime (no audio files) |
| Payments | OxaPay v1 invoices and HMAC-SHA512 callbacks |
| Tests | Vitest (unit), Playwright (end-to-end) |
Deviations from the original brief: Auth.js v5 is still published as a beta tag but is the App Router-native version; TypeScript 6 is used instead of 7 because tooling around Next.js still relies on the JavaScript compiler API; Motion is the current name of Framer Motion.
flowchart LR
subgraph Browser
UI[Next.js pages<br/>React 19] --> FX[GSAP Β· Motion Β· R3F/Three.js]
UI --> LS[(localStorage<br/>guest notes)]
UI --> SND[Howler<br/>synth sounds]
end
subgraph Server[Next.js server]
API[/Route handlers<br/>Zod Β· CSRF Β· rate limit/]
AUTH[Auth.js]
WH[/OxaPay webhook<br/>HMAC verify Β· idempotent/]
end
DB[(PostgreSQL<br/>Prisma)]
OXA[OxaPay API]
UI -- notes, sponsor --> API
UI -- sign in --> AUTH
API --> DB
AUTH --> DB
API -- create invoice --> OXA
OXA -- payer pays --> OXA
OXA -- signed callback --> WH --> DB
UI -. redirect .-> OXA
OXA -. return_url .-> UI
Payment flow in detail
- The modal validates the amount with Zod and calls
POST /api/sponsor. - The server validates again, stores a
sponsorshipsrow with statuspending, then callsPOST https://api.oxapay.com/v1/payment/invoicewithamount,currency: USD,order_id,callback_url,return_urland a description. The key is sent in themerchant_api_keyheader. - The browser is redirected to the returned
payment_url. - OxaPay calls
/api/webhooks/oxapay. The route verifies theHMACheader (HMAC-SHA512 of the raw body with the merchant key), stores the delivery inwebhook_eventskeyed by a SHA-256 of the body (duplicates are ignored), checks the amount, and moves the status forward only (pending β paying β paid,paid β refunded; never backwards). /sponsor/returnonly reads the stored status. The return URL never marks anything as paid.
Requirements: Node.js 20.9+ (22 LTS recommended), Docker Desktop, Git.
git clone https://github.com/KortzLab/DeathNote.git
cd DeathNote
npm installStart PostgreSQL in Docker:
npm run db:upCreate your .env from the example and fill it in (see the table below):
Copy-Item .env.example .envA minimal local .env:
NEXT_PUBLIC_SITE_URL=http://localhost:3000
DATABASE_URL=postgresql://deathnote:deathnote@localhost:5432/deathnote?schema=public
AUTH_SECRET=<generate one: npx auth secret>
AUTH_TRUST_HOST=trueRun the migrations, seed demo data and start the dev server:
npm run db:migrate
npm run db:seed
npm run devOpen http://localhost:3000. The seed prints a demo account (demo@deathnote.local) with a fresh
random password each time it runs.
On macOS/Linux the same npm scripts work; use
cp .env.example .envinstead ofCopy-Item.
Useful scripts
| Script | What it does |
|---|---|
npm run dev |
Development server |
npm run build / npm start |
Production build / server |
npm run lint Β· npm run typecheck Β· npm run format |
Quality checks |
npm test |
Unit tests (Vitest) |
npm run test:e2e |
End-to-end tests (Playwright) |
npm run db:up / db:down |
Start / stop Postgres in Docker |
npm run db:migrate Β· db:deploy Β· db:seed Β· db:studio |
Prisma |
npm run webhook:test -- <order_id> [status] |
Send a signed test callback to your local server |
npm run seed:public |
Add 15 sample Open Book entries and 10 shared pages (safe to re-run, works in production) |
Names and descriptions only. Never commit real values; .env is ignored by git.
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_SITE_URL |
β | Public URL of the site, used for callbacks, OG tags and the sitemap |
GOOGLE_SITE_VERIFICATION |
β¬ | Google Search Console verification code (meta tag content) |
BING_SITE_VERIFICATION |
β¬ | Bing Webmaster Tools verification code (msvalidate.01 content) |
DATABASE_URL |
β | PostgreSQL connection string |
AUTH_SECRET |
β | Secret used by Auth.js to sign sessions (npx auth secret) |
AUTH_TRUST_HOST |
β¬ | true when running behind a proxy or on a VPS |
ADMIN_EMAILS |
β¬ | Comma-separated admin e-mails (see Admin access below) |
OXAPAY_ENABLED |
β¬ | true to show the sponsor buttons and accept payments |
OXAPAY_MERCHANT_API_KEY |
β¬ | OxaPay merchant key (server only, never logged or sent to the client) |
OXAPAY_ENABLEDand the two*_SITE_VERIFICATIONcodes are read when pages are built, so redeploy after changing them.
/admin holds the sponsorship ledger and the moderation queue. An account is an admin only when
both are true: its e-mail is in ADMIN_EMAILS, and it was created on the server with the
admin script. The site's own sign-up refuses admin e-mails, so nobody can claim yours first.
-
Put your e-mail in
ADMIN_EMAILSon the server and redeploy (or restart). -
On the server, with the production
DATABASE_URLandADMIN_EMAILSin the environment, run:npm run admin:create -- you@example.com
Type a unique password (8+ characters) at the hidden prompt. Running it again resets the password and signs out every earlier admin session.
-
Open
/signin, sign in with that e-mail and password, then visit/admin.
Admin rights last 12 hours after you sign in; after that /admin asks you to sign in again
(your notebook session is unaffected). Anyone else, signed in or not, gets a plain 404.
Tables: users, accounts, sessions, verification_tokens (Auth.js), notebooks, pages,
notes (soft delete, indexed by owner/page/name), sponsorships (amounts in cents, charity share,
status, OxaPay track id), webhook_events (idempotency + audit) and rate_limits.
npm run db:migrate # create/apply migrations in development
npm run db:deploy # apply migrations in production
npm run db:seed # demo data (refuses to run with NODE_ENV=production)
npm run db:studio # browse the dataThe schema lives in prisma/schema.prisma; configuration in
prisma.config.ts.
npm test # unit: validation, content guard, amounts, webhook signature, status transitions
npm run test:e2e # e2e: guest writes β refresh β still there; sponsor modal amount selectionThe first e2e run needs a browser: npx playwright install chromium. The sponsor test runs when
OXAPAY_ENABLED=true (no payment is ever created by the tests).
Testing the OxaPay webhook locally (tunnel)
OxaPay must reach your machine, so expose port 3000 with a tunnel:
# Option A: Cloudflare Tunnel (winget install Cloudflare.cloudflared)
cloudflared tunnel --url http://localhost:3000
# Option B: ngrok (winget install ngrok.ngrok)
ngrok http 3000-
Set
NEXT_PUBLIC_SITE_URLin.envto the tunnel URL (for examplehttps://random-words.trycloudflare.com), setOXAPAY_ENABLED=trueand yourOXAPAY_MERCHANT_API_KEY, then restartnpm run dev. -
Open the sponsor modal through the tunnel URL and create an invoice. The callback URL sent to OxaPay is
<NEXT_PUBLIC_SITE_URL>/api/webhooks/oxapay. -
Without a real payment, simulate one: copy the
order_idfrom/adminor Prisma Studio and runnpm run webhook:test -- dn_xxxxxxxxxxxxxxxx PaidThe script signs the body with your local key exactly like OxaPay does.
Vercel + managed Postgres (Neon, Supabase, Railwayβ¦)
- Create a Postgres database and copy its connection string.
- Import the repository in Vercel. Add every variable from the table above in
Settings β Environment Variables (
NEXT_PUBLIC_SITE_URL= your production URL). - Set the build command to
npx prisma migrate deploy && next build(or runnpm run db:deployonce from your machine against the production database). - Set the OxaPay callback domain in your OxaPay merchant settings if required.
- Deploy, then create the admin account (see Admin access above).
VPS (Node 22 + reverse proxy)
git clone https://github.com/KortzLab/DeathNote.git && cd DeathNote
npm ci
cp .env.example .env # fill in production values, AUTH_TRUST_HOST=true
npm run db:deploy
npm run build
npm start # listens on :3000; run it with pm2 or a systemd servicePut Caddy or Nginx in front for HTTPS. Keep .env readable only by the service user.
Show the tree
.
βββ .github/ # CI, issue/PR templates, funding, README assets
βββ prisma/ # schema, migrations, seed
βββ scripts/ # send-test-webhook.ts
βββ src/
β βββ app/ # routes (App Router)
β β βββ api/ # notes, public, shares, reports, candles, sponsor, webhooks/oxapay, auth
β β βββ notebook/ # the private writing experience
β β βββ public/ # the Open Book
β β βββ n/[id]/ # a shared page and its preview image
β β βββ rules/ # scroll-driven rules
β β βββ supporters/ sponsor/return/ admin/
β β βββ about/ privacy/ terms/ secret/ signin/
β β βββ opengraph-image.tsx sitemap.ts robots.ts icon.svg
β β βββ layout.tsx globals.css not-found.tsx
β βββ components/
β β βββ three/ # IntroScene, page-curl material, particles, textures
β β βββ intro/ # 3D/2D/calm intro, ink loader
β β βββ notebook/ # FlipBook, InkText, CountdownRing, Candle, pages
β β βββ fx/ # quill cursor, shinigami, whispers, Konami, apple
β β βββ sponsor/ # modal, triggers, return page
β β βββ public/ # Open Book, share/report dialogs, paper cards
β β βββ home/ # home page feed
β β βββ layout/ ui/ providers/ rules/ auth/
β βββ content/rules.ts # the 18 original rules
β βββ lib/ # validation, content guard, oxapay, server helpers, hooks, sound
β βββ auth.ts # Auth.js configuration
βββ tests/ # unit (Vitest) and e2e (Playwright)
- 3D intro with falling notebook, ash and page curl
- Ink writing, 40-second ring, guest + account notes
- Scroll-written rules, easter eggs, procedural sound
- OxaPay sponsorships with verified webhooks
- Second language for the rules (structure ready)
- Recorded GIFs for the README
- Account deletion from the UI
- More notebook covers and paper styles
- Public Open Book and shareable pages with candles, reports and moderation
Issues and pull requests are welcome. Please read CONTRIBUTING.md and the Code of Conduct. Security issues go through SECURITY.md, not public issues.
This site is free. If it made your day a little darker (in a good way), consider a small contribution through the sponsor button on the site.
From this sponsor amount, 70% will go to charity.
MIT Β© h4sib.pro. The license covers this project's original code and assets. "Death Note" is a trademark of its respective owners.
Unofficial fan project. Not affiliated with the creators or publishers of Death Note. No official artwork, logos, characters, fonts or rule text are used. For fiction and fun only. Don't use this to threaten or harass real people.
Built by h4sib.pro Β· Powered by kortzlab.pro





