chore: sync codebase remediation, gameplay systems, and docs

Security & infrastructure:
- Remove unused services/ (auth, spacetimedb) and auth.db
- Add .env.example template, expand .gitignore for env/db files
- Add GitHub Actions CI + commitlint config and workflows
- Add manual vendor chunking and source maps to docs/site vite configs

Shared UI & docs app:
- Add ARIA props and focus-visible rings to Button/Panel
- Add ButtonAsLink primitive; use shared Button in NotFound
- Wire @void-nav/ui into docs app; refresh content pages
- Replace Todo page with Kanban board

Gameplay (Bevy):
- Add ai module (behavior, faction, navigation, perception, spawning, states)
- Add narrative module (events, history, synthesis, ui)
- Refine galaxy contents and in-system flight/scene systems
This commit is contained in:
2026-06-16 11:49:13 -04:00
parent 98c2ba59df
commit 57633addfe
60 changed files with 5084 additions and 2473 deletions

View File

@@ -1,32 +1,37 @@
# VOID::NAV
**A single-player open-world space exploration RPG** — trade, quest, fight, or simply drift and enjoy the ambiance. Inspired by the charm and freedom of Windward Horizon, set in a procedurally generated galaxy with FTL-style tactical combat.
**A single-player narrative-driven space exploration experience** where you author your own mini-series. Inspired by Windward's open-world freedom, Stellaris's strategic depth, and AI-generated storytelling in the style of The Templin Institute. Every campaign generates a unique tale of exploration, commerce, diplomacy, and conquest.
You are a young, unaffiliated captain with an entire galaxy open for exploration. Every campaign features a unique, procedurally generated sector map. Trade goods between stations, take on quests for various factions, mine asteroid belts, or simply cruise and enjoy the void. Prefer a quieter life? You can simply sail the stars.
You are a young captain with an entire galaxy to explore—and a story to write. Every campaign features a unique, procedurally generated galaxy. Trade between stations, broker alliances between factions, wage war or maintain peace, and watch as the **AI Story Director** weaves your choices into an evolving narrative. Prefer a quieter life? Simply sail the stars and let your story unfold.
Combat is **FTL-style tactical resource management**no dogfighting or direct piloting. Click a hostile, your ship auto-engages, and you manage reactor power between Weapons / Shields / Engines / Auxiliary. The skill is in *what* you power and *when*, not how fast you click.
Conflict occurs through **FTL-style tactical resource management**not dogfighting. When combat happens, it's a dramatic beat in your story. Click a hostile, your ship auto-engages, and you manage reactor power between Weapons / Shields / Engines / Auxiliary. The skill is in *what* you power and *when*, not how fast you click. But combat is a feature, not the focus.
VOID::NAV is a pnpm workspace monorepo for the game website, living design docs, browser game shell, and SpacetimeDB backend module. The architecture supports optional co-op servers in the future, but the core experience is designed as a solo adventure.
VOID::NAV is a pnpm workspace monorepo for the game website, living design docs, and game client. V1 focuses on single-player emergent storytelling with local persistence and AI-driven narrative generation.
## Core Pillars
| Pillar | Description |
|--------|-------------|
| **Open-World Exploration** | Procedurally generated galaxy with unique sectors, anomalies, and hidden treasures every campaign |
| **Trade & Commerce** | Regional price differences, supply/demand, and trade routes between stations and factions |
| **FTL-Style Combat** | Tactical power management (not action). Auto-engage with reactor allocation decisions |
| **Ship Customization** | Build the ship that suits your style — tough juggernaut, nimble scout, or cargo hauler |
| **Dynamic World Impact** | Faction leaders, world events, and player actions shape the galaxy without firing a shot |
| **Solo Adventure** | A personal galaxy to explore at your own pace. The architecture supports optional co-op servers later. |
| **AI Story Director** | Emergent narrative generation tracks your choices, alliances, conflicts, and discoveries. The AI weaves your actions into an ongoing saga. V1: real-time emergent storytelling. Future: episodic mini-series generation. |
| **Exploration & Discovery** | Procedurally generated galaxy with fog of war. Discover anomalies, derelicts, new factions. Every discovery becomes part of your story. |
| **Trade & Diplomacy** | Stellaris-inspired economic and political systems. Supply factions, broker alliances, negotiate borders. Commerce and conversation are equally viable paths. |
| **Ship Customization** | Your ship is your narrative vessel. Customize for trade, exploration, or conflict. Multiple classes from nimble scouts to powerful cruisers. |
| **Dynamic Galaxy** | Your actions shape both the world AND the story. Faction relations, territory control, and world events evolve through your choices. |
| **Solo Adventure** | A personal galaxy to explore at your own pace. Your story, your pace. The architecture supports optional co-op servers later. |
### Secondary Features
- **FTL-Style Tactical Combat** — Power management combat exists as a dramatic beat in your story, not the gameplay loop
- Mining and resource gathering
- Mission and quest systems
## Layout
```text
apps/docs Existing docs, interactive demos, and vertical slice
apps/docs Living design docs and interactive demos
apps/site Public landing page / game website
apps/game Playable game shell connected to SpacetimeDB bindings
packages/ui Small shared UI primitives and CSS tokens
services/spacetimedb TypeScript SpacetimeDB module
apps/game Playable game client (Rust + Bevy)
packages/ui Shared UI primitives and CSS tokens
archive/legacy-static Legacy static prototype files kept for reference
```
@@ -34,9 +39,7 @@ archive/legacy-static Legacy static prototype files kept for reference
- Node.js 24+
- pnpm 9+
- SpacetimeDB CLI (`spacetime`) v2.3.0+
The SpacetimeDB CLI is not vendored. Frontend builds use the committed placeholder bindings in `apps/game/src/module_bindings`; run `pnpm generate:bindings` after installing the CLI to replace them with generated bindings.
- Rust toolchain (for the game client)
## Quick Start
@@ -45,19 +48,19 @@ pnpm install
pnpm dev
```
This single command starts a fresh SpacetimeDB instance (ephemeral, in-memory), publishes the module, generates bindings, and launches the game dev server.
This launches the docs and site servers.
Open `http://localhost:5175` to play.
Open `http://localhost:5175` to play the game.
Press `Ctrl+C` to stop everything.
## Development
```bash
pnpm dev # Full stack: SpacetimeDB + game (port 5175)
pnpm dev # Docs + site servers
pnpm dev:docs # Docs only (port 5173)
pnpm dev:site # Site only (port 5174)
pnpm dev:game # Game frontend only (requires running SpacetimeDB)
cd apps/game && cargo run # Game client
```
Default ports:
@@ -65,20 +68,15 @@ Default ports:
- docs: `http://localhost:5173/docs`
- site: `http://localhost:5174`
- game: `http://localhost:5175`
- SpacetimeDB: `http://127.0.0.1:3000`
## Builds
```bash
pnpm build # Build all apps
pnpm check # Typecheck all packages
pnpm generate:bindings # Regenerate SpacetimeDB TypeScript bindings
cd apps/game && cargo build # Build game client
```
## SpacetimeDB
## Game Client
Root `spacetime.json` points at `services/spacetimedb` and generates TypeScript bindings into `apps/game/src/module_bindings`.
The `pnpm dev` script uses an isolated ephemeral data directory (`.spacetime-dev/`) so it starts clean every time. No stale database or auth issues.
Reducers: `connectPlayer`, `renamePlayer`, `seedWorld`, `ping`, `undock`, `selectTarget`, `startApproach`, `completeApproach`, `dock`, `startMining`, `completeMiningCycle`, `sellOreToNpcMarket`
The game client (`apps/game`) is built with Rust and Bevy. It runs locally and persists game state locally with full single-player campaign support.