Dan's Plugins Community Website is the central hub for the Dan's Plugins Community. It showcases DPC plugins, provides links to documentation and support resources, and acts as the public face of the community at https://dansplugins.com.
This repository holds both halves of the site:
| Path | What it is | Toolchain |
|---|---|---|
| repository root | The Next.js front end (pages/, components/, services/, utils/) |
Node.js 18.17+ |
dpc-api/ |
The Spring Boot back end serving community data (accounts, likes, factions, the plugin catalogue) | Java 17, Maven (via the bundled ./mvnw) |
Front-end work needs only Node.js. Back-end work also needs Java 17. Running the whole stack locally is easiest with Docker Compose — see Development.
These steps run the front end on its own. Features backed by the API (accounts, likes, the leaderboard) need dpc-api running too; see Development.
- Ensure Node.js (v18.17 or later, the floor Next.js 14 requires) is installed on your machine.
- Clone this repository:
git clone https://github.com/Dans-Plugins/dansplugins-dot-com.git - Install dependencies:
npm install
- Build the project:
npm run build
- Start the server:
npm run start
The site will be available at http://localhost:3000.
npm run dev is the day-to-day development server, and Docker Compose brings up the whole stack including dpc-api. See the Development section below for both.
- User Guide – Getting started and common scenarios
- Configuration Guide – Detailed configuration options
- API Documentation – The
dpc-apiback end: endpoints, configuration and local setup - Resource Hub Design – How the plugin catalogue grows into full resource pages
- Changelog – Release history
You can find the support Discord server here.
Please fill out a bug report here.
When the server is given a trace key in USAGE_REPORTING_KEY, it reports one page-view event per
HTML page it serves to trace, as the program dansplugins-dot-com,
carrying the page's path (for example /about — never a query string or fragment) and the site
version. Public profile pages are recorded as /u/[username], never with the username. Nothing about the visitor is sent: no IP address, user agent, cookie, session, account or
referrer. No script is added to any page — the report is made by the server (Next.js middleware),
so the key never reaches the browser — and crawlers, uptime monitors, prefetches, API calls,
assets and 404s are not counted.
Every page view also carries a random installation ID for the server (the tag install), so
trace can count installations of the site rather than raw events. It is a UUID made when the
server first reports, derived from nothing about the server or any visitor. TRACE_INSTALL_ID,
when set, is used as is; otherwise the client is pointed at
$XDG_DATA_HOME/dansplugins-dot-com/trace-install-id (or ~/.local/share/dansplugins-dot-com/trace-install-id).
The report is made from Next.js middleware, which runs in the Edge runtime and has no file system,
so in practice the ID lives in memory for the life of the server process: each restart or redeploy
counts as a new installation unless TRACE_INSTALL_ID is set. To reset it, restart the server or
change TRACE_INSTALL_ID (or delete the file, where a runtime with file access created one). Every
switch below also stops it: with reporting off no ID is made, read or written.
Reporting is off unless a key is set, and any of these turns it off:
USAGE_REPORTING_ENABLED=falsein the server's environmentTRACE_USAGE_REPORTING=offin the environment (alsofalse,0,no; shared by every program that reports to trace, and it wins over the setting above)DO_NOT_TRACK=1in the environment (alsotrue,yes; see consoledonottrack.com)- leaving
USAGE_REPORTING_KEYunset
USAGE_REPORTING_ENDPOINT sends the reports to a different trace server. With a key set, the
server logs one line on its first request saying whether reporting is on and, if it is off, which
switch turned it off. Details: https://danielstephenson.dev/usage-reporting
npm run lint
If you see no errors, the lint check has passed.
The frontend uses Vitest for unit tests. Run the suite with:
npm test
Test files live in the __tests__/ directory. If all tests pass, the suite has succeeded.
If the change touches dpc-api/:
cd dpc-api && ./mvnw verify
CI runs the front-end checks and this one as separate jobs on every pull request.
npm run dev is the hot-reloading path — edits are picked up without a restart:
npm run dev
On its own it serves the front end only, against whatever NEXT_PUBLIC_API_URL points at.
Docker Compose brings up the site together with dpc-api, its database, and the UserAuth service the API delegates authentication to. The site runs as a production build here, so it does not hot-reload: source is copied into the image, and changes need a rebuild (./up.sh rebuilds).
- Install Docker Desktop.
- Install the site's dependencies on the host:
This step is not optional:
npm install
compose.ymlbind-mounts./node_modulesinto the website container, so on a fresh clone with no hostnode_modulesthe container starts against an empty directory and fails to launch. - Set
JWT_SECRET— the stack will not start without it. Either export it, or put it in a.envfile in the project root (git-ignored):See CONFIG.md for what it does and the other variables available.export JWT_SECRET="your-secret-key-at-least-32-bytes-long"
- Start the stack:
The site will be accessible at
./up.sh
http://localhost:3000and the API athttp://localhost:45345. The website container does not start untildpc-apireports healthy — which in turn waits on its database and on UserAuth — so expect a minute or so beforelocalhost:3000answers on a cold start. The wait is deliberate: the home page's "Latest" chips and a resource page's Versions section are read fromdpc-apiwhile rendering, and a page served before the API was up would simply omit them.
./down.sh
| Name | Main Contributions |
|---|---|
| Dans | Project founder and lead developer |
This project is licensed under the MIT License.
You are free to use, modify, and distribute this software, provided that the original copyright and license notice are included.
See the LICENSE file for the full text.
This project is in active development.