Skip to content

WikitTeam/WikitDB-Server

Repository files navigation

WikitDB Server

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.

Requirements

  • Node.js 20 or newer
  • PostgreSQL

Setup

  1. Copy .env.example to .env and fill in the required values.
  2. Install dependencies with npm install.
  3. Apply the Prisma schema with npm run prisma:push.
  4. Start development with npm run dev.

Production validation:

npm test
npm run typecheck
npm run build

TypeScript Migration

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.

Security Notes

  • Set SITE_ORIGIN to the public HTTPS origin.
  • Set TRUST_PROXY=true only when requests always pass through a trusted reverse proxy that overwrites forwarding headers.
  • Administrator access is controlled only by the User.isAdmin database 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.

About

WikitDB在服务器上使用

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors