PureWare Docs
PureWare is a platform for game tools, mods, launchers and utilities. Publish projects, ship releases, post news, build a community and customize your pages. This page documents the public REST API and the custom-CSS theming system.
Authentication
The API uses JWT bearer tokens. Register or log in to receive a token, then send it in the Authorization header.
# 1. Log in
curl -X POST http://localhost:4000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"identifier":"alice","password":"secret123"}'
# -> { "token": "<JWT>", "user": { ... } }
# 2. Call an authenticated endpoint
curl http://localhost:4000/api/auth/me \
-H "Authorization: Bearer <JWT>"Custom CSS theming
Profiles and projects (including their post pages) support custom CSS. Open Settings → Custom CSS for your profile, or Manage → Custom CSS on a project you own. Your CSS is saved and rendered for everyone who visits the page.
Rules are automatically scoped under .pw-custom, the wrapper around your page content, so your theme can not break the rest of the site. Write selectors normally — they are prefixed for you. You can target body, html and :root to style the page container itself.
Starter templates
Download a ready-to-edit CSS file, change the values and paste it back into the editor.
What you can style
| Selector | Targets |
|---|---|
| body / :root | Whole-page background (image, gradient, color) |
| .pw-custom | Content wrapper (max-width, font) |
| .card | Every card block |
| .btn / .btn-primary / .btn-secondary | Buttons and their states (:hover/:active/:focus-visible) |
| h1, h2, h3 / p / a | Headings, text, links |
| img | Banner, logo, avatar, screenshots |
| pre, code / .prose | Code blocks and rendered wiki/markdown |
| Profile: .pw-profile-header .pw-banner .pw-avatar .pw-name .pw-level .pw-handle | Profile header elements |
| Profile: .pw-xp .pw-xp-track .pw-xp-fill .pw-badge .pw-stats .pw-projects | XP bar, badges, stats, projects grid |
| Project: .pw-hero .pw-banner .pw-logo .pw-name .pw-summary .pw-stats | Project hero elements |
| Project: .pw-overview .pw-news .pw-releases .pw-sidebar | Project section cards |
Properties you can change
Any standard CSS property works, for example: background, color, border / border-color, border-radius, box-shadow, font-family / font-size / font-weight, letter-spacing, text-transform, opacity, filter.
/* style the page container */
:root { background: #120a1f; }
/* headings */
h1 { color: #c8a8ff; letter-spacing: -0.02em; }
/* cards */
.card { border-color: #4c2a82; box-shadow: 0 6px 24px rgba(120,60,200,.15); }
/* primary buttons */
.btn-primary { background: #8b5cf6; color: #fff; }
@media (max-width: 640px) {
h1 { font-size: 1.5rem; }
}Note: @keyframes and @font-face are kept global. Keep it tasteful — neon/seizure-inducing themes break the platform vibe.
API reference
Base URL: http://localhost:4000. Endpoints marked 🔒 require a bearer token.
| Method | Path | Description |
|---|---|---|
| POST | /api/auth/register | Create an account, returns a JWT |
| POST | /api/auth/login | Log in with username/email + password |
| GET | /api/auth/me 🔒 | Current authenticated user |
| POST | /api/auth/change-password 🔒 | Change password |
| GET | /api/feed?sort=popular|new|updated | Project feed with sorting & filters |
| GET | /api/feed?category=&tag= | Filter feed by category or tag |
| GET | /api/categories | List categories with counts |
| GET | /api/search?q= | Search projects |
| GET | /api/users/:username | Public profile incl. level, xp, badges |
| PATCH | /api/users/me/profile 🔒 | Update display name, bio, custom CSS |
| POST | /api/users/:username/follow 🔒 | Follow / unfollow a user |
| POST | /api/projects 🔒 | Create a project |
| GET | /api/projects/:slug | Project detail (counts a view per user/day) |
| PATCH | /api/projects/:id 🔒 | Update project (incl. custom CSS, tags) |
| POST | /api/projects/:id/releases 🔒 | Publish a release |
| POST | /api/releases/:id/files 🔒 | Attach a file to a release |
| POST | /api/projects/:id/posts 🔒 | Publish a news post |
| GET | /api/posts/:id/comments | Threaded comments for a post |
| POST | /api/posts/:id/react 🔒 | Like / dislike a post |
| GET | /api/projects/by-slug/:slug/members | Project members & roles |
| GET | /api/projects/by-slug/:slug/wiki | Wiki pages of a project |
| GET | /api/projects/by-slug/:slug/git | Commit feed, branches and tags |
| GET | /api/marketplace | Top rated, trending and category collections |
| POST | /api/projects/:id/rate 🔒 | Rate a project 1–5 |
| POST | /api/security/2fa/begin 🔒 | Start TOTP 2FA setup |
| GET | /api/me/api-keys 🔒 | List your API keys |
| GET | /api/v1/me | Public API: current user (via X-API-Key header) |
| POST | /api/projects/:id/webhooks 🔒 | Register a webhook (release/post events) |
Realtime notifications are delivered over Socket.IO at ws://localhost:4000/realtime (pass the JWT via auth.token).