WikitDB is a Next.js application that aggregates Wikidot page, author, rating, and forum data. It also provides authenticated community tools backed by PostgreSQL and Prisma.
- Node.js 20 or newer
- PostgreSQL
- Copy
.env.exampleto.envand fill in the required values. - Install dependencies with
npm install. - Apply the Prisma schema with
npm run prisma:push. - Start development with
npm run dev.
Production validation:
npm test
npm run typecheck
npm run build
The application supports gradual TypeScript adoption without changing the
Pages Router or existing JavaScript routes. New or substantially modified
modules should prefer .ts or .tsx; existing JavaScript can be migrated one
area at a time.
Reference repositories under others/ are intentionally excluded from the
application type check.
- Set
SITE_ORIGINto the public HTTPS origin. - Set
TRUST_PROXY=trueonly when requests always pass through a trusted reverse proxy that overwrites forwarding headers. - Administrator access is controlled only by the
User.isAdmindatabase field. There is no username-based administrator fallback. - Runtime data and credentials must not be committed under
data/or in environment files. - Wikidot management proxy tools only accept HTTPS origins listed in
wikitdb.config.js.
The schema includes persistent registration verification records and bounty
claim idempotency. Deployments upgrading from an older revision must run
npm run prisma:push before serving traffic.