{"id":47790679,"url":"https://github.com/deadronos/packet-foundry","last_synced_at":"2026-04-03T15:36:31.882Z","repository":{"id":339169242,"uuid":"1160694314","full_name":"deadronos/packet-foundry","owner":"deadronos","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-18T14:23:47.000Z","size":163,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-18T15:16:59.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://deadronos.github.io/packet-foundry/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deadronos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-18T09:02:45.000Z","updated_at":"2026-02-18T13:36:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/deadronos/packet-foundry","commit_stats":null,"previous_names":["deadronos/packet-foundry"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/deadronos/packet-foundry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadronos%2Fpacket-foundry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadronos%2Fpacket-foundry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadronos%2Fpacket-foundry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadronos%2Fpacket-foundry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deadronos","download_url":"https://codeload.github.com/deadronos/packet-foundry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadronos%2Fpacket-foundry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31360807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T15:19:21.178Z","status":"ssl_error","status_checked_at":"2026-04-03T15:19:20.670Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T15:36:31.237Z","updated_at":"2026-04-03T15:36:31.865Z","avatar_url":"https://github.com/deadronos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Packet Foundry 17\n\n\u003e An optimization-heavy idle game set in a retro-futurist interplanetary network economy.\n\nYou operate **Packet Foundry 17** in orbital district Aster Dock. Buy low-quality packet streams, route them through a configurable processing pipeline, and sell certified payloads for C-Reds. Hit the throughput ceiling, then prestige into a stronger ISP contract with permanent meta perks.\n\n---\n\n## Quick Start\n\n```bash\nnpm install\nnpm run dev       # website (Vite + React)\nnpm run dev:cli   # interactive CLI\nnpm run preview   # preview production web build\nnpm run smoke     # automated milestone demonstration\nnpm test          # unit test suite\nnpm run build     # TypeScript type-check + web build\n```\n\n### GitHub Pages Deployment\n\n- Deploys to: `https://deadronos.github.io/packet-foundry/`\n- Trigger: push a tag matching `v*` (example: `v1.0.0`)\n- Workflow: `.github/workflows/deploy-pages.yml`\n- Vite production base is set to `/packet-foundry/` for Pages compatibility\n\n### Web Save Behavior\n\n- The website version auto-saves to browser `localStorage` under `packet-foundry-web-save`.\n- Loading the site applies offline progress based on the last saved tick time.\n- CLI save files (`packet-foundry-save.json`) are still used only by the CLI mode.\n\n### Web UX Controls\n\n- Keyboard shortcuts: `1` (+1 tick), `2` (+10 ticks), `3` (+60 ticks), `Space` (toggle auto tick), `S` (save), `L` (load), `R` (refresh contracts), `P` (prestige).\n- Keyboard help modal: press `H` or `?` to open shortcut/accessibility help, `Esc` to close.\n- Responsive quick-action dock appears on mobile for one-tap ticking/save controls.\n- HUD includes progress bars (prestige/contract/lane heat) and mini telemetry charts for payload/credits per tick.\n- Major gameplay panels are collapsible for long sessions, and a compact HUD can be pinned/unpinned while you scroll.\n\n---\n\n## Gameplay Overview\n\n### Core Loop\n\n1. **Generate scrap** — raw packets arrive continuously across your lanes.\n2. **Process through pipeline** — enabled modules decrypt, verify, compress, and tag each packet batch.\n3. **Earn C-Reds** — certified payload auto-sells at the current credit rate.\n4. **Upgrade \u0026 expand** — buy hardware upgrades (faster processing), software upgrades (more scrap, better credits), and new modules.\n5. **Complete contracts** — rotating board of protocol-specific objectives pay bonus credits and Schema Fragments.\n6. **Prestige (\"New ISP Contract\")** — once you've certified ≥ 3 000 payload, prestige to gain Contract Reputation, buy permanent meta perks, and start a faster run.\n\n### Resources\n\n| Resource | Description |\n|---|---|\n| **Scrap Stream** | Raw packets — generated automatically per lane |\n| **Certified Payload** | Output of the pipeline — used for contract progress |\n| **C-Reds (Credits)** | Main spendable currency for upgrades \u0026 expansion |\n| **Schema Fragments** | Research currency from contracts and drops |\n| **Contract Reputation** | Prestige currency — persists across runs |\n\n### Modules\n\nEach module you unlock is enabled on every lane. They form a processing chain that boosts throughput and output quality — but deeper chains increase latency, applying a penalty to effective output.\n\n| Module | Effect | Required for |\n|---|---|---|\n| **Decrypt** | Base processing (starts unlocked) | — |\n| **Checksum** | +integrity, +credits | Secure protocol |\n| **Compress** | +payload-per-scrap | — |\n| **Tag** | +routing, +fragments | Legacy protocol |\n\n**Latency formula:** `penalty = max(0.1, 1 − 0.06×max(0, modules−3) − 0.0008×queueSize)`\n\n### Protocol Families\n\n| Protocol | Processing speed | Credit rate | Special |\n|---|---|---|---|\n| **Burst** | 1.4× | 0.9× | High volume, no requirements |\n| **Secure** | 0.8× | 1.5× | Premium; needs Checksum |\n| **Legacy** | 1.0× | 1.2× | Bonus if Tag is active |\n\n### Pipeline Lanes (max 3)\n\n- Lane 1 is free. Lane 2 costs 200C, Lane 3 costs 500C.\n- All lanes share the same module configuration and protocol.\n- Each lane has an independent queue and heat tracker (visible in the CLI header).\n\n### Upgrade Shop\n\n- **Hardware** — Module Speed (+2 processing/s per level), Buffer Expansion (queue tolerance), Lane Cooling (latency reduction)\n- **Software** — Routing AI (+15% scrap/s per level), Protocol Parser (+10% credits), Fragment Miner (faster fragment drops)\n- **Module upgrades** — per-module level up to 5 (increases both capacity and output multiplier)\n\n### Contract Board\n\n3 contracts are shown at a time, rotating across the three protocol families. Accept one at a time; it progresses automatically as payload is produced. Timed contracts expire if not completed in time. Completing high-tier contracts contributes to your prestige reputation formula.\n\n### Prestige — New ISP Contract\n\n**Trigger:** 3 000 total payload certified.\n\n**Formula:** `rep = floor(totalPayload^0.25) + completedContracts×0.25 + highTierContracts×0.5 + uniqueProtocols`\n\n**Resets:** credits, lanes (back to 1), module levels, contracts  \n**Persists:** Contract Reputation, purchased meta perks, prestige count\n\n#### Meta Perks\n\n| Perk | Max Level | Cost/Level | Effect |\n|---|---|---|---|\n| Throughput Boost | 3 | 2 rep | +10% scrap gen \u0026 processing speed |\n| Latency Shield | 2 | 3 rep | −15% latency penalty scaling |\n| Head Start | 1 | 4 rep | Begin run with 2 lanes |\n| Fragment Surge | 2 | 2 rep | −5 ticks between fragment drops |\n| Offline Cap+ | 1 | 3 rep | +4h offline cap |\n| Credit Multiplier | 1 | 5 rep | +20% credit rate permanently |\n\n### Offline Progression\n\n- Offline time is simulated in 60-second chunks, capped at 8 hours (12h with Offline Cap+).\n- Progress is summarised when you reload.\n- Autosave triggers every 60 ticks; game also saves on quit.\n\n---\n\n## Architecture\n\n```\nsrc/\n  core/\n    types.ts        ← All shared type definitions (pure, no imports)\n    latency.ts      ← Pure latency penalty math\n    pipeline.ts     ← Lane throughput \u0026 scrap-gen calculations\n    tick.ts         ← Deterministic fixed-step tick + offline replay\n    contracts.ts    ← Contract board management\n    prestige.ts     ← Reputation formula, prestige reset, perk buying\n  content/\n    modules.ts      ← Module definitions (capacity, multipliers, costs)\n    protocols.ts    ← Protocol family definitions\n    upgrades.ts     ← Hardware/software/module upgrade catalogue\n    contracts.ts    ← Contract templates + meta perk catalogue\n  state/\n    gameState.ts    ← Initial state factory + JSON ser/deser helpers\n    actions.ts      ← Pure state-mutation functions (buy, unlock, switch)\n  persistence/\n    saveLoad.ts     ← JSON save/load + autosave helper\n  web/\n    App.tsx         ← Browser game UI (React)\n    main.tsx        ← Web entrypoint\n    styles.css      ← UI theme/layout\n  ui/\n    cli.ts          ← Interactive terminal menu (readline-based)\n  vite-env.d.ts     ← Vite client typings\nscripts/\n  smoke.ts          ← Automated gameplay simulation / milestone demo\ntests/\n  tick.test.ts      ← Deterministic tick, offline replay, contract auto-complete\n  latency.test.ts   ← Latency penalty math\n  contracts.test.ts ← Board rotation, activation, completion, expiry\n  prestige.test.ts  ← Reputation formula, reset, meta perk lifecycle\n```\n\n### Design Principles\n\n- **Deterministic core** — `processTick(state, delta)` is a pure function; same inputs always produce the same output. No `Date.now()` or `Math.random()` inside the tick.\n- **Immutability** — every action and tick returns a new state object (deep clone via JSON).\n- **Separation of concerns** — `core/` contains zero I/O; `ui/` and `persistence/` handle all side effects.\n- **Data-driven content** — all game constants live in `content/`; balancing is done by editing those files.\n\n---\n\n## Development Notes\n\n- TypeScript strict mode; `bundler` module resolution.\n- Tests via Vitest (`npm test`).\n- Website via Vite + React (`npm run dev`).\n- CLI via `tsx` (`npm run dev:cli`).\n- Save file: `./packet-foundry-save.json` in the working directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadronos%2Fpacket-foundry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeadronos%2Fpacket-foundry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadronos%2Fpacket-foundry/lists"}