1
0
Fork 0
Web app for the Arma 3 unit Polaris Task Force. Uses Next.js for client- and server-side rendering, with a Postgres database and some other neat libraries. https://arma.onyxsimple.com
Find a file
Z8MB1E 3597833843 chore: add local account debugging scripts
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-12 16:21:15 -04:00
.vscode feat: initial payload scaffolding 2025-10-24 02:07:13 -04:00
docs/bot feat(bot): add Discord bot scaffold with sign-up, attendance embeds, and notification bridge 2026-08-12 12:39:00 -04:00
public/images chore: update TODO.md and add soldier wardrobe images 2026-08-02 18:50:31 -04:00
src feat(factions): redesign faction card and add faction detail page 2026-08-12 16:21:13 -04:00
tests feat(market): add trading marketplace with listings, haggling, and NPC vendors 2026-08-10 16:05:57 -04:00
Writerside feat: application staging deployment (ensure better commits after this) 2025-12-15 01:14:30 -05:00
.env.example feat(bot): add Discord bot scaffold with sign-up, attendance embeds, and notification bridge 2026-08-12 12:39:00 -04:00
.env.test feat: add LAST_UPDATED environment variable, update VersionOverlay to display last updated timestamp, and introduce patch script 2025-12-22 16:41:29 -05:00
.gitignore feat(version): expose build/commit metadata via /api/version and overlay 2026-08-12 12:38:33 -04:00
.npmrc feat: initial commit 2025-10-15 14:03:31 -04:00
.prettierrc.json feat: initial payload scaffolding 2025-10-24 02:07:13 -04:00
.yarnrc feat: initial commit 2025-10-15 14:03:31 -04:00
AGENTS.md feat(bot): add Discord bot scaffold with sign-up, attendance embeds, and notification bridge 2026-08-12 12:39:00 -04:00
bun.lock feat(bot): add Discord bot scaffold with sign-up, attendance embeds, and notification bridge 2026-08-12 12:39:00 -04:00
bunfig.toml feat: add LAST_UPDATED environment variable, update VersionOverlay to display last updated timestamp, and introduce patch script 2025-12-22 16:41:29 -05:00
components.json feat: application staging deployment (ensure better commits after this) 2025-12-15 01:14:30 -05:00
docker-compose.yml feat: initial commit 2025-10-15 14:03:31 -04:00
Dockerfile feat: initial commit 2025-10-15 14:03:31 -04:00
drizzle.config.ts feat: application staging deployment (ensure better commits after this) 2025-12-15 01:14:30 -05:00
eslint.config.mjs feat: initial payload scaffolding 2025-10-24 02:07:13 -04:00
next.config.mjs feat: display app version using environment variable and add VersionOverlay component, add migration for new database tables 2025-12-22 16:07:48 -05:00
package.json feat(bot): add Discord bot scaffold with sign-up, attendance embeds, and notification bridge 2026-08-12 12:39:00 -04:00
playwright.config.ts test(e2e): refresh frontend login and landing smoke tests 2026-08-10 16:01:51 -04:00
pnpm-lock.yaml.bk chore(deps): drop pnpm lockfile in favor of bun 2026-08-11 23:25:00 -04:00
postcss.config.mjs feat: application staging deployment (ensure better commits after this) 2025-12-15 01:14:30 -05:00
README.md docs: replace template README with project documentation 2026-08-11 23:25:50 -04:00
repro-account.ts chore: add local account debugging scripts 2026-08-12 16:21:15 -04:00
reset-test-user-password.ts chore: add local account debugging scripts 2026-08-12 16:21:15 -04:00
test.env feat: initial commit 2025-10-15 14:03:31 -04:00
TODO.md docs: document marketplace, notifications, NPCs, and MVP roadmap 2026-08-10 16:06:05 -04:00
tsconfig.json feat: switch to Bun, add fonts and styling, update components and UI, add basic front-end 2025-12-16 23:26:52 -05:00
vitest.config.mts feat: initial payload scaffolding 2025-10-24 02:07:13 -04:00
vitest.setup.ts feat: initial payload scaffolding 2025-10-24 02:07:13 -04:00

Polaris Task Force

Web operations and administration hub for the Arma 3 unit Polaris Task Force. Dark-themed dashboard built with Next.js, Payload CMS, and PostgreSQL.

Tech stack

  • Framework: Next.js 16 (App Router, webpack)
  • CMS / Admin: Payload CMS 3.79.1 (@payloadcms/db-postgres + Drizzle)
  • Database: PostgreSQL
  • Styling: Tailwind CSS v4 (CSS-based, no config file) + shadcn/ui (New York style)
  • Package manager: Bun (bun.lock, bunfig.toml). The package.json scripts use cross-env and reference pnpm — run everything via bun run.

Features

  • Unit roster with org chart, ranks, assignments, and qualifications
  • Missions, campaigns, and factions with intel gating by assignment
  • Logistics: structures with storage grids and whitelist rules, resources, vehicles, shipments with distance and fuel tracking, automated game tick
  • Banking system: personal and treasury/faction accounts with full transaction ledger
  • Trading marketplace with NPC vendors, haggling negotiations, patience meters, and buyer-to-seller offers
  • Player lockers with loadouts, equipment, and wardrobe
  • Profiles with rank progression, XP, awards, and qualifications
  • In-app notification inbox (market offers, deal outcomes)
  • Real-time event log tied to structures and game entities, SSE updates from game ticks
  • Narrative event flowchart editor (React Flow) for GMs
  • Full Payload admin panel for content and configuration management

Quickstart

  1. bun install
  2. cp .env.example .env
  3. Edit .env: the DATABASE_URI line in .env.example is outdated (MongoDB). Replace it with a PostgreSQL connection string:
    DATABASE_URI=postgres://user:password@localhost:5432/your_database
    
    Set PAYLOAD_SECRET, APP_URL (default http://localhost:3000), and GAME_TICK_NOTIFY_SECRET.
  4. bun run dev — starts the dev server at http://localhost:3000.
    • Use bun run devsafe to wipe the .next cache before starting.

Dev credentials: dev / Test123 (if seed data has been applied).

Commands

Command Description
bun run dev Dev server (webpack, localhost:3000)
bun run devsafe Clear .next cache then start dev
bun run devturbo Dev server with Turbopack
bun run build Production build (webpack, increases memory limit)
bun run start Run the production build
bun run staging Start with NODE_ENV=test
bun run test Run integration tests then E2E tests
bun run test:int Vitest integration tests (requires live PostgreSQL)
bun run test:e2e Playwright E2E tests (auto-starts dev server)
bun run db Drizzle-kit wrapper (e.g. bun run db migrate)
bun run generate:types Regenerate payload-types.ts
bun run generate:importmap Regenerate admin import map
bun run payload <bin> Run Payload binaries
bun run payload game-tick Process shipment arrivals and fuel consumption
bun run payload market-tick Expire listings and refresh NPC vendor stock
bun run deploy Bump patch version, build, and deploy

Note: game-tick and market-tick are Payload bins registered in payload.config.ts, not npm scripts. Run via bun run payload.

Project structure

  • src/app/(frontend)/ — public-facing app pages (dashboard, logistics, banking, market)
  • src/app/(payload)/ — Payload admin panel and API routes
  • src/collections/ — Payload collections organized by domain (users, logistics, banking, market, game, etc.)
  • src/lib/ — shared utilities (storage rules, banking, shipping, market logic, realtime bus)
  • src/components/frontend/ — app UI components
  • src/components/ui/ — shadcn/ui primitives
  • src/tools/seed/ — seed scripts for initial data
  • src/scripts/ — game tick and utility scripts
  • tests/int/ — Vitest integration tests
  • tests/e2e/ — Playwright E2E tests

For full development notes (auth flow, access control, storage rules, event system, gotchas), see AGENTS.md.