From c1cc70eeb92539716ef352a7ce344dca42fcf1a7 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 27 Apr 2026 21:04:07 -0400 Subject: [PATCH] Rename AI Tycoon to Token Empire across entire codebase Full rebrand: UI display text, package scope (@ai-tycoon/* -> @token-empire/*), localStorage keys, Docker/CI image paths, database names, and documentation. Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/balance-check.yml | 6 ++--- .gitea/workflows/ci.yml | 2 +- README.md | 6 ++--- apps/server/Dockerfile | 4 +-- apps/server/drizzle.config.ts | 2 +- apps/server/package.json | 6 ++--- apps/server/src/db/index.ts | 2 +- apps/server/src/index.ts | 2 +- apps/server/tsconfig.json | 2 +- apps/web/Dockerfile | 6 ++--- apps/web/index.html | 2 +- apps/web/package.json | 8 +++--- apps/web/src/App.tsx | 6 ++--- .../components/common/NotificationPanel.tsx | 2 +- apps/web/src/components/dev/DevMenu.tsx | 2 +- .../src/components/dev/EventTriggersTab.tsx | 2 +- apps/web/src/components/dev/ResourcesTab.tsx | 2 +- .../src/components/dev/StateInspectionTab.tsx | 2 +- .../src/components/dev/TimeCompletionTab.tsx | 4 +-- .../src/components/game/CompanyStatsCard.tsx | 6 ++--- .../src/components/game/InviteGateScreen.tsx | 2 +- .../web/src/components/game/NewGameScreen.tsx | 2 +- .../src/components/game/OfflineCatchUp.tsx | 4 +-- apps/web/src/components/game/TutorialHint.tsx | 2 +- apps/web/src/components/layout/Sidebar.tsx | 6 ++--- apps/web/src/components/layout/TopBar.tsx | 4 +-- apps/web/src/hooks/useCloudSave.ts | 2 +- apps/web/src/hooks/useGameLoop.ts | 4 +-- apps/web/src/hooks/useKeyboardShortcuts.ts | 2 +- apps/web/src/lib/api.ts | 6 ++--- apps/web/src/pages/AchievementsPage.tsx | 6 ++--- apps/web/src/pages/CompetitorsPage.tsx | 4 +-- apps/web/src/pages/DashboardPage.tsx | 8 +++--- apps/web/src/pages/DataPage.tsx | 4 +-- apps/web/src/pages/FinancePage.tsx | 8 +++--- apps/web/src/pages/InfrastructurePage.tsx | 4 +-- apps/web/src/pages/LeaderboardPage.tsx | 2 +- apps/web/src/pages/ModelsPage.tsx | 4 +-- apps/web/src/pages/ResearchPage.tsx | 6 ++--- apps/web/src/pages/ServingPage.tsx | 2 +- apps/web/src/pages/SettingsPage.tsx | 8 +++--- apps/web/src/pages/TalentPage.tsx | 6 ++--- apps/web/src/pages/market/ApiTiersPanel.tsx | 4 +-- .../src/pages/market/ConsumerTiersPanel.tsx | 4 +-- .../pages/market/DeveloperEcosystemPanel.tsx | 2 +- .../pages/market/EnterprisePipelinePanel.tsx | 4 +-- .../src/pages/market/MarketOverviewPanel.tsx | 4 +-- .../src/pages/market/ProductLinesPanel.tsx | 2 +- apps/web/src/store/index.ts | 10 +++---- apps/web/tsconfig.json | 2 +- docker-compose.yml | 14 +++++----- docs/architecture.md | 4 +-- package.json | 6 ++--- packages/game-engine/package.json | 6 ++--- .../src/__test-utils__/builders.ts | 4 +-- .../src/__test-utils__/createTestState.ts | 4 +-- packages/game-engine/src/data/achievements.ts | 2 +- packages/game-engine/src/data/competitors.ts | 2 +- .../game-engine/src/data/enterpriseNames.ts | 2 +- packages/game-engine/src/data/keyHires.ts | 2 +- packages/game-engine/src/data/techTree.ts | 2 +- packages/game-engine/src/engine.ts | 2 +- .../src/systems/achievementSystem.test.ts | 2 +- .../src/systems/achievementSystem.ts | 2 +- .../src/systems/competitorSystem.test.ts | 4 +-- .../src/systems/competitorSystem.ts | 4 +-- .../src/systems/computeSystem.test.ts | 4 +-- .../game-engine/src/systems/computeSystem.ts | 4 +-- .../src/systems/dataSystem.test.ts | 2 +- .../game-engine/src/systems/dataSystem.ts | 2 +- .../src/systems/economySystem.test.ts | 2 +- .../game-engine/src/systems/economySystem.ts | 4 +-- packages/game-engine/src/systems/eraSystem.ts | 4 +-- .../game-engine/src/systems/fundingSystem.ts | 4 +-- .../src/systems/infrastructureSystem.ts | 4 +-- .../src/systems/market/apiTierSystem.ts | 4 +-- .../src/systems/market/consumerTierSystem.ts | 4 +-- .../src/systems/market/developerEcosystem.ts | 6 ++--- .../src/systems/market/enterprisePipeline.ts | 4 +-- .../game-engine/src/systems/market/index.ts | 6 ++--- .../src/systems/market/obsolescenceSystem.ts | 4 +-- .../src/systems/market/productLines.ts | 4 +-- .../src/systems/market/seasonalSystem.ts | 4 +-- .../src/systems/market/servingPipeline.ts | 8 +++--- .../src/systems/market/tamSystem.ts | 4 +-- .../game-engine/src/systems/marketSystem.ts | 2 +- .../src/systems/modelSystem.test.ts | 2 +- .../game-engine/src/systems/modelSystem.ts | 4 +-- .../src/systems/reputationSystem.test.ts | 2 +- .../src/systems/reputationSystem.ts | 4 +-- .../game-engine/src/systems/researchSystem.ts | 2 +- .../game-engine/src/systems/talentSystem.ts | 4 +-- packages/game-engine/src/tick.ts | 2 +- packages/game-engine/tsconfig.json | 2 +- packages/game-simulation/package.json | 8 +++--- .../src/actions/competitors.ts | 2 +- packages/game-simulation/src/actions/data.ts | 2 +- .../game-simulation/src/actions/funding.ts | 6 ++--- .../src/actions/infrastructure.ts | 6 ++--- .../game-simulation/src/actions/market.ts | 2 +- .../game-simulation/src/actions/models.ts | 6 ++--- .../game-simulation/src/actions/research.ts | 4 +-- .../game-simulation/src/actions/talent.ts | 2 +- .../src/analysis/breakpoints.ts | 2 +- .../game-simulation/src/analysis/deadZones.ts | 4 +-- .../src/analysis/eraProximity.ts | 2 +- .../src/analysis/featureUtilization.ts | 6 ++--- .../game-simulation/src/analysis/metrics.ts | 2 +- .../src/analysis/milestones.ts | 2 +- .../game-simulation/src/analysis/report.ts | 2 +- .../src/analysis/sanityChecks.ts | 2 +- .../src/analysis/systemInterconnections.ts | 2 +- packages/game-simulation/src/initialState.ts | 6 ++--- packages/game-simulation/src/runner.ts | 6 ++--- .../game-simulation/src/strategies/greedy.ts | 6 ++--- .../game-simulation/src/strategies/persona.ts | 6 ++--- .../game-simulation/src/strategies/random.ts | 6 ++--- .../game-simulation/src/strategies/types.ts | 2 +- packages/game-simulation/tsconfig.json | 2 +- packages/shared/package.json | 4 +-- packages/shared/tsconfig.json | 2 +- packages/tsconfig/package.json | 2 +- pnpm-lock.yaml | 26 +++++++++---------- 123 files changed, 248 insertions(+), 248 deletions(-) diff --git a/.gitea/workflows/balance-check.yml b/.gitea/workflows/balance-check.yml index fdfe0ee..cf69cbe 100644 --- a/.gitea/workflows/balance-check.yml +++ b/.gitea/workflows/balance-check.yml @@ -35,7 +35,7 @@ jobs: run: pnpm test - name: Run greedy simulation - run: pnpm --filter @ai-tycoon/game-simulation simulate:ci + run: pnpm --filter @token-empire/game-simulation simulate:ci multi-run-balance: runs-on: ubuntu-latest @@ -54,8 +54,8 @@ jobs: run: pnpm install --frozen-lockfile - name: Run multi-simulation (100 runs) - run: pnpm --filter @ai-tycoon/game-simulation multirun -- --runs 100 --parallel 10 --strategy persona --ticks 28800 --no-timeseries + run: pnpm --filter @token-empire/game-simulation multirun -- --runs 100 --parallel 10 --strategy persona --ticks 28800 --no-timeseries - name: Interpret results if: always() - run: pnpm --filter @ai-tycoon/game-simulation interpret -- --summary multirun-summary.csv + run: pnpm --filter @token-empire/game-simulation interpret -- --summary multirun-summary.csv diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9af48d6..989e6f0 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -6,7 +6,7 @@ on: env: REGISTRY: gitea.thewrightserver.net - IMAGE_PREFIX: gitea.thewrightserver.net/josh/aihostingtycoon + IMAGE_PREFIX: gitea.thewrightserver.net/josh/tokenempire jobs: build-and-push: diff --git a/README.md b/README.md index 3f9c9b7..3fc7007 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# AI Tycoon +# Token Empire A browser-based incremental/idle game where you manage an AI company from a garage startup to building AGI. Navigate the real tensions of the AI industry: scaling compute, training frontier models, balancing safety vs capability, hiring talent, and competing with rival labs. @@ -29,7 +29,7 @@ The web app starts at `http://localhost:5173` (or the next available port). The ## Project Structure ``` -ai-tycoon/ +token-empire/ ├── apps/ │ ├── web/ # React frontend (Vite) │ └── server/ # Hono API backend @@ -81,7 +81,7 @@ pnpm clean # Clean build artifacts The backend requires PostgreSQL for cloud saves and leaderboards. Set the connection string in `apps/server/.env`: ``` -DATABASE_URL=postgresql://user:password@localhost:5432/ai_tycoon +DATABASE_URL=postgresql://user:password@localhost:5432/token_empire ``` Run migrations: diff --git a/apps/server/Dockerfile b/apps/server/Dockerfile index 6066675..e4e698a 100644 --- a/apps/server/Dockerfile +++ b/apps/server/Dockerfile @@ -14,8 +14,8 @@ COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/packages/shared/node_modules ./packages/shared/node_modules COPY --from=deps /app/apps/server/node_modules ./apps/server/node_modules COPY . . -RUN pnpm --filter @ai-tycoon/shared build && \ - pnpm --filter @ai-tycoon/server typecheck +RUN pnpm --filter @token-empire/shared build && \ + pnpm --filter @token-empire/server typecheck FROM base AS production COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./ diff --git a/apps/server/drizzle.config.ts b/apps/server/drizzle.config.ts index de7ac8a..2f67812 100644 --- a/apps/server/drizzle.config.ts +++ b/apps/server/drizzle.config.ts @@ -5,6 +5,6 @@ export default defineConfig({ schema: './src/db/schema.ts', out: './drizzle', dbCredentials: { - url: process.env.DATABASE_URL ?? 'postgresql://localhost:5432/ai_tycoon', + url: process.env.DATABASE_URL ?? 'postgresql://localhost:5432/token_empire', }, }); diff --git a/apps/server/package.json b/apps/server/package.json index 1b63086..45953a9 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -1,5 +1,5 @@ { - "name": "@ai-tycoon/server", + "name": "@token-empire/server", "version": "0.0.1", "private": true, "type": "module", @@ -13,7 +13,7 @@ "db:push": "drizzle-kit push" }, "dependencies": { - "@ai-tycoon/shared": "workspace:*", + "@token-empire/shared": "workspace:*", "@hono/node-server": "^1.13.8", "bcryptjs": "^3.0.3", "drizzle-orm": "^0.44.2", @@ -23,7 +23,7 @@ "uuid": "^11.1.0" }, "devDependencies": { - "@ai-tycoon/tsconfig": "workspace:*", + "@token-empire/tsconfig": "workspace:*", "@types/node": "^25.6.0", "drizzle-kit": "^0.31.1", "typescript": "^5.8.3" diff --git a/apps/server/src/db/index.ts b/apps/server/src/db/index.ts index 041ad0c..fc4dd27 100644 --- a/apps/server/src/db/index.ts +++ b/apps/server/src/db/index.ts @@ -5,7 +5,7 @@ import { migrate } from 'drizzle-orm/postgres-js/migrator'; import postgres from 'postgres'; import * as schema from './schema'; -const connectionString = process.env.DATABASE_URL ?? 'postgresql://localhost:5432/ai_tycoon'; +const connectionString = process.env.DATABASE_URL ?? 'postgresql://localhost:5432/token_empire'; const client = postgres(connectionString); export const db = drizzle(client, { schema }); diff --git a/apps/server/src/index.ts b/apps/server/src/index.ts index 6dca455..739982b 100644 --- a/apps/server/src/index.ts +++ b/apps/server/src/index.ts @@ -40,7 +40,7 @@ app.route('/api/invites', invitesRouter); const port = Number(process.env.PORT) || 3001; -console.log(`AI Tycoon API server starting on port ${port}...`); +console.log(`Token Empire API server starting on port ${port}...`); await runMigrations(); await seedAdmin(); diff --git a/apps/server/tsconfig.json b/apps/server/tsconfig.json index 07fbfa6..44cee7e 100644 --- a/apps/server/tsconfig.json +++ b/apps/server/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@ai-tycoon/tsconfig/node.json", + "extends": "@token-empire/tsconfig/node.json", "compilerOptions": { "outDir": "dist", "rootDir": "src" diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index bd3cab8..1bb7a54 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -18,9 +18,9 @@ COPY --from=deps /app/apps/web/node_modules ./apps/web/node_modules COPY . . ARG VITE_API_URL= ENV VITE_API_URL=$VITE_API_URL -RUN pnpm --filter @ai-tycoon/shared build && \ - pnpm --filter @ai-tycoon/game-engine build && \ - pnpm --filter @ai-tycoon/web build +RUN pnpm --filter @token-empire/shared build && \ + pnpm --filter @token-empire/game-engine build && \ + pnpm --filter @token-empire/web build FROM nginx:alpine COPY --from=build /app/apps/web/dist /usr/share/nginx/html diff --git a/apps/web/index.html b/apps/web/index.html index d61ff88..22b8f57 100644 --- a/apps/web/index.html +++ b/apps/web/index.html @@ -4,7 +4,7 @@ - AI Tycoon + Token Empire diff --git a/apps/web/package.json b/apps/web/package.json index 0d29b15..0e861e1 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,5 +1,5 @@ { - "name": "@ai-tycoon/web", + "name": "@token-empire/web", "private": true, "version": "0.0.1", "type": "module", @@ -10,8 +10,8 @@ "preview": "vite preview" }, "dependencies": { - "@ai-tycoon/shared": "workspace:*", - "@ai-tycoon/game-engine": "workspace:*", + "@token-empire/shared": "workspace:*", + "@token-empire/game-engine": "workspace:*", "react": "^19.1.0", "react-dom": "^19.1.0", "recharts": "^2.15.0", @@ -19,7 +19,7 @@ "lucide-react": "^0.475.0" }, "devDependencies": { - "@ai-tycoon/tsconfig": "workspace:*", + "@token-empire/tsconfig": "workspace:*", "@types/react": "^19.1.0", "@types/react-dom": "^19.1.0", "@vitejs/plugin-react": "^4.4.0", diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index f7978ee..8866d9a 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -6,7 +6,7 @@ import { OfflineCatchUp } from '@/components/game/OfflineCatchUp'; import { InviteGateScreen } from '@/components/game/InviteGateScreen'; import { useGameLoop } from '@/hooks/useGameLoop'; import { useAuthGate } from '@/hooks/useAuthGate'; -import { TICK_INTERVAL_MS } from '@ai-tycoon/shared'; +import { TICK_INTERVAL_MS } from '@token-empire/shared'; import { Sparkles, RefreshCw, WifiOff } from 'lucide-react'; function LoadingScreen() { @@ -16,7 +16,7 @@ function LoadingScreen() {

- AI Tycoon + Token Empire

Loading...

@@ -32,7 +32,7 @@ function BackendErrorScreen({ error, onRetry }: { error: string; onRetry: () =>

- AI Tycoon + Token Empire

diff --git a/apps/web/src/components/common/NotificationPanel.tsx b/apps/web/src/components/common/NotificationPanel.tsx index 533cf02..ad69bcb 100644 --- a/apps/web/src/components/common/NotificationPanel.tsx +++ b/apps/web/src/components/common/NotificationPanel.tsx @@ -1,7 +1,7 @@ import { useEffect, useRef } from 'react'; import { X, CheckCircle, AlertTriangle, AlertCircle, Info, Bell, Trash2 } from 'lucide-react'; import { useGameStore, type GameNotification } from '@/store'; -import { formatDuration } from '@ai-tycoon/shared'; +import { formatDuration } from '@token-empire/shared'; const ICON_MAP = { success: { icon: CheckCircle, color: 'text-success' }, diff --git a/apps/web/src/components/dev/DevMenu.tsx b/apps/web/src/components/dev/DevMenu.tsx index b6ea9cf..8fb78b6 100644 --- a/apps/web/src/components/dev/DevMenu.tsx +++ b/apps/web/src/components/dev/DevMenu.tsx @@ -18,7 +18,7 @@ export function DevMenu() { const [isOpen, setIsOpen] = useState(false); const [activeTab, setActiveTab] = useState('resources'); - const isEnabled = import.meta.env.DEV || localStorage.getItem('ai-tycoon-dev-menu') === 'true'; + const isEnabled = import.meta.env.DEV || localStorage.getItem('token-empire-dev-menu') === 'true'; useEffect(() => { if (!isEnabled) return; diff --git a/apps/web/src/components/dev/EventTriggersTab.tsx b/apps/web/src/components/dev/EventTriggersTab.tsx index 268c6a0..97d5911 100644 --- a/apps/web/src/components/dev/EventTriggersTab.tsx +++ b/apps/web/src/components/dev/EventTriggersTab.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { useGameStore } from '@/store'; -import type { FundingRoundType } from '@ai-tycoon/shared'; +import type { FundingRoundType } from '@token-empire/shared'; function DevButton({ onClick, children, variant = 'default' }: { onClick: () => void; diff --git a/apps/web/src/components/dev/ResourcesTab.tsx b/apps/web/src/components/dev/ResourcesTab.tsx index 330e85c..2a01b6e 100644 --- a/apps/web/src/components/dev/ResourcesTab.tsx +++ b/apps/web/src/components/dev/ResourcesTab.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { useGameStore } from '@/store'; -import { formatMoney } from '@ai-tycoon/shared'; +import { formatMoney } from '@token-empire/shared'; function DevButton({ onClick, children, variant = 'default' }: { onClick: () => void; diff --git a/apps/web/src/components/dev/StateInspectionTab.tsx b/apps/web/src/components/dev/StateInspectionTab.tsx index 7cab60e..e189ce4 100644 --- a/apps/web/src/components/dev/StateInspectionTab.tsx +++ b/apps/web/src/components/dev/StateInspectionTab.tsx @@ -1,5 +1,5 @@ import { useGameStore } from '@/store'; -import { formatMoney, formatNumber, formatFlops, formatPercent } from '@ai-tycoon/shared'; +import { formatMoney, formatNumber, formatFlops, formatPercent } from '@token-empire/shared'; function Section({ title, children }: { title: string; children: React.ReactNode }) { return ( diff --git a/apps/web/src/components/dev/TimeCompletionTab.tsx b/apps/web/src/components/dev/TimeCompletionTab.tsx index a750d42..b5ece46 100644 --- a/apps/web/src/components/dev/TimeCompletionTab.tsx +++ b/apps/web/src/components/dev/TimeCompletionTab.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { useGameStore } from '@/store'; -import { processTick, setAchievementDefinitions, ACHIEVEMENT_DEFINITIONS, TECH_TREE } from '@ai-tycoon/game-engine'; -import type { GameState, Era } from '@ai-tycoon/shared'; +import { processTick, setAchievementDefinitions, ACHIEVEMENT_DEFINITIONS, TECH_TREE } from '@token-empire/game-engine'; +import type { GameState, Era } from '@token-empire/shared'; function DevButton({ onClick, children, variant = 'default' }: { onClick: () => void; diff --git a/apps/web/src/components/game/CompanyStatsCard.tsx b/apps/web/src/components/game/CompanyStatsCard.tsx index 6f871dc..e861900 100644 --- a/apps/web/src/components/game/CompanyStatsCard.tsx +++ b/apps/web/src/components/game/CompanyStatsCard.tsx @@ -1,8 +1,8 @@ import { useGameStore } from '@/store'; -import { formatMoney, formatNumber, formatPercent } from '@ai-tycoon/shared'; +import { formatMoney, formatNumber, formatPercent } from '@token-empire/shared'; import { Share2, Copy, Check } from 'lucide-react'; import { useState } from 'react'; -import { ACHIEVEMENT_DEFINITIONS } from '@ai-tycoon/game-engine'; +import { ACHIEVEMENT_DEFINITIONS } from '@token-empire/game-engine'; export function CompanyStatsCard({ onClose }: { onClose: () => void }) { const [copied, setCopied] = useState(false); @@ -25,7 +25,7 @@ export function CompanyStatsCard({ onClose }: { onClose: () => void }) { const minutes = Math.floor((totalPlayTime % 3600) / 60); const statsText = [ - `${companyName} — AI Tycoon`, + `${companyName} — Token Empire`, `Era: ${eraLabel} | Playtime: ${hours}h ${minutes}m`, `Cash: ${formatMoney(money)} | Revenue: ${formatMoney(totalRevenue)}`, `Valuation: ${formatMoney(valuation)}`, diff --git a/apps/web/src/components/game/InviteGateScreen.tsx b/apps/web/src/components/game/InviteGateScreen.tsx index 8568d81..3e3e345 100644 --- a/apps/web/src/components/game/InviteGateScreen.tsx +++ b/apps/web/src/components/game/InviteGateScreen.tsx @@ -111,7 +111,7 @@ export function InviteGateScreen({ onRegistered }: { onRegistered: () => void })

- AI Tycoon + Token Empire

diff --git a/apps/web/src/components/game/NewGameScreen.tsx b/apps/web/src/components/game/NewGameScreen.tsx index 2eb489a..b69d582 100644 --- a/apps/web/src/components/game/NewGameScreen.tsx +++ b/apps/web/src/components/game/NewGameScreen.tsx @@ -24,7 +24,7 @@ export function NewGameScreen() {

- AI Tycoon + Token Empire

diff --git a/apps/web/src/components/game/OfflineCatchUp.tsx b/apps/web/src/components/game/OfflineCatchUp.tsx index f0e9a04..823d9fd 100644 --- a/apps/web/src/components/game/OfflineCatchUp.tsx +++ b/apps/web/src/components/game/OfflineCatchUp.tsx @@ -1,6 +1,6 @@ import { useState, useEffect, useRef } from 'react'; -import { formatMoney, formatDuration, formatNumber, MAX_OFFLINE_TICKS, TICK_INTERVAL_MS } from '@ai-tycoon/shared'; -import { GameEngine } from '@ai-tycoon/game-engine'; +import { formatMoney, formatDuration, formatNumber, MAX_OFFLINE_TICKS, TICK_INTERVAL_MS } from '@token-empire/shared'; +import { GameEngine } from '@token-empire/game-engine'; import { useGameStore } from '@/store'; interface OfflineResult { diff --git a/apps/web/src/components/game/TutorialHint.tsx b/apps/web/src/components/game/TutorialHint.tsx index 3cdeffc..ef9a5bc 100644 --- a/apps/web/src/components/game/TutorialHint.tsx +++ b/apps/web/src/components/game/TutorialHint.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { X, Lightbulb } from 'lucide-react'; -const DISMISSED_KEY = 'ai-tycoon-dismissed-hints'; +const DISMISSED_KEY = 'token-empire-dismissed-hints'; function getDismissed(): Set { try { diff --git a/apps/web/src/components/layout/Sidebar.tsx b/apps/web/src/components/layout/Sidebar.tsx index f7e86d6..503bf33 100644 --- a/apps/web/src/components/layout/Sidebar.tsx +++ b/apps/web/src/components/layout/Sidebar.tsx @@ -26,7 +26,7 @@ const NAV_ITEMS: { page: ActivePage; label: string; icon: typeof LayoutDashboard function getInitialCollapsed(): boolean { try { - const stored = localStorage.getItem('ai-tycoon-sidebar-collapsed'); + const stored = localStorage.getItem('token-empire-sidebar-collapsed'); if (stored !== null) return stored === 'true'; return window.innerWidth < 1280; } catch { return false; } @@ -82,7 +82,7 @@ export function Sidebar() { const toggleCollapse = () => { setCollapsed(prev => { const next = !prev; - localStorage.setItem('ai-tycoon-sidebar-collapsed', String(next)); + localStorage.setItem('token-empire-sidebar-collapsed', String(next)); return next; }); }; @@ -166,7 +166,7 @@ export function Sidebar() { )}

- {collapsed ? 'v0.1' : 'AI Tycoon v0.1'} + {collapsed ? 'v0.1' : 'Token Empire v0.1'}
); diff --git a/apps/web/src/components/layout/TopBar.tsx b/apps/web/src/components/layout/TopBar.tsx index c95d294..4056996 100644 --- a/apps/web/src/components/layout/TopBar.tsx +++ b/apps/web/src/components/layout/TopBar.tsx @@ -3,8 +3,8 @@ import { Pause, Play, Bell, Share2 } from 'lucide-react'; import { CompanyStatsCard } from '@/components/game/CompanyStatsCard'; import { NotificationPanel } from '@/components/common/NotificationPanel'; import { useGameStore } from '@/store'; -import { formatMoney, formatNumber, formatDuration, formatPercent } from '@ai-tycoon/shared'; -import type { GameSpeed } from '@ai-tycoon/shared'; +import { formatMoney, formatNumber, formatDuration, formatPercent } from '@token-empire/shared'; +import type { GameSpeed } from '@token-empire/shared'; import { Tooltip } from '@/components/common/Tooltip'; const SPEEDS: GameSpeed[] = [1, 2, 5]; diff --git a/apps/web/src/hooks/useCloudSave.ts b/apps/web/src/hooks/useCloudSave.ts index bf0a38b..22ac093 100644 --- a/apps/web/src/hooks/useCloudSave.ts +++ b/apps/web/src/hooks/useCloudSave.ts @@ -1,7 +1,7 @@ import { useEffect, useRef } from 'react'; import { useGameStore } from '@/store'; import { api, getAuthToken, setAuthToken, clearAuthToken, decodeTokenPayload } from '@/lib/api'; -import { AUTO_SAVE_INTERVAL_TICKS } from '@ai-tycoon/shared'; +import { AUTO_SAVE_INTERVAL_TICKS } from '@token-empire/shared'; export function useCloudSave() { const tickCount = useGameStore((s) => s.meta.tickCount); diff --git a/apps/web/src/hooks/useGameLoop.ts b/apps/web/src/hooks/useGameLoop.ts index 7f9b521..7317b79 100644 --- a/apps/web/src/hooks/useGameLoop.ts +++ b/apps/web/src/hooks/useGameLoop.ts @@ -1,6 +1,6 @@ import { useEffect, useRef } from 'react'; -import { GameEngine, setAchievementDefinitions, ACHIEVEMENT_DEFINITIONS } from '@ai-tycoon/game-engine'; -import type { TickNotification } from '@ai-tycoon/game-engine'; +import { GameEngine, setAchievementDefinitions, ACHIEVEMENT_DEFINITIONS } from '@token-empire/game-engine'; +import type { TickNotification } from '@token-empire/game-engine'; import { useGameStore } from '@/store'; export function useGameLoop(skip = false) { diff --git a/apps/web/src/hooks/useKeyboardShortcuts.ts b/apps/web/src/hooks/useKeyboardShortcuts.ts index 0741998..4b58feb 100644 --- a/apps/web/src/hooks/useKeyboardShortcuts.ts +++ b/apps/web/src/hooks/useKeyboardShortcuts.ts @@ -1,6 +1,6 @@ import { useEffect } from 'react'; import { useGameStore, type ActivePage } from '@/store'; -import type { GameSpeed } from '@ai-tycoon/shared'; +import type { GameSpeed } from '@token-empire/shared'; const PAGE_SHORTCUTS: Record = { d: 'dashboard', diff --git a/apps/web/src/lib/api.ts b/apps/web/src/lib/api.ts index 2e9f7a2..1c0cebe 100644 --- a/apps/web/src/lib/api.ts +++ b/apps/web/src/lib/api.ts @@ -1,10 +1,10 @@ const API_BASE = import.meta.env.VITE_API_URL ?? 'http://localhost:3001'; -let authToken: string | null = localStorage.getItem('ai-tycoon-auth-token'); +let authToken: string | null = localStorage.getItem('token-empire-auth-token'); export function setAuthToken(token: string) { authToken = token; - localStorage.setItem('ai-tycoon-auth-token', token); + localStorage.setItem('token-empire-auth-token', token); } export function getAuthToken() { @@ -13,7 +13,7 @@ export function getAuthToken() { export function clearAuthToken() { authToken = null; - localStorage.removeItem('ai-tycoon-auth-token'); + localStorage.removeItem('token-empire-auth-token'); } export interface TokenPayload { diff --git a/apps/web/src/pages/AchievementsPage.tsx b/apps/web/src/pages/AchievementsPage.tsx index 5846bda..898cd48 100644 --- a/apps/web/src/pages/AchievementsPage.tsx +++ b/apps/web/src/pages/AchievementsPage.tsx @@ -1,12 +1,12 @@ import { useGameStore } from '@/store'; -import { ACHIEVEMENT_DEFINITIONS } from '@ai-tycoon/game-engine'; -import { formatNumber } from '@ai-tycoon/shared'; +import { ACHIEVEMENT_DEFINITIONS } from '@token-empire/game-engine'; +import { formatNumber } from '@token-empire/shared'; import { Trophy, Lock, Server, Brain, Rocket, DollarSign, Sprout, Users, Globe, Sparkles, TrendingUp, Building2, Atom, Cpu, FlaskConical, GitBranch, Zap, } from 'lucide-react'; -import type { AchievementCondition } from '@ai-tycoon/shared'; +import type { AchievementCondition } from '@token-empire/shared'; const ICON_MAP: Record> = { Trophy, Server, Brain, Rocket, DollarSign, Sprout, Users, diff --git a/apps/web/src/pages/CompetitorsPage.tsx b/apps/web/src/pages/CompetitorsPage.tsx index 011788d..1660367 100644 --- a/apps/web/src/pages/CompetitorsPage.tsx +++ b/apps/web/src/pages/CompetitorsPage.tsx @@ -3,8 +3,8 @@ import { Swords, TrendingUp, Shield, Users, Brain, ShoppingCart } from 'lucide-r import { useGameStore } from '@/store'; import { ConfirmModal } from '@/components/common/ConfirmModal'; import { Tooltip } from '@/components/common/Tooltip'; -import { formatMoney, formatNumber } from '@ai-tycoon/shared'; -import type { Era } from '@ai-tycoon/shared'; +import { formatMoney, formatNumber } from '@token-empire/shared'; +import type { Era } from '@token-empire/shared'; const ARCHETYPE_LABELS: Record = { 'safety-first': 'Safety-First Lab', diff --git a/apps/web/src/pages/DashboardPage.tsx b/apps/web/src/pages/DashboardPage.tsx index 0b95d1c..ebf68e7 100644 --- a/apps/web/src/pages/DashboardPage.tsx +++ b/apps/web/src/pages/DashboardPage.tsx @@ -1,8 +1,8 @@ import type React from 'react'; import { useGameStore, type ActivePage } from '@/store'; -import { formatMoney, formatNumber, formatPercent, formatDuration } from '@ai-tycoon/shared'; -import type { Era } from '@ai-tycoon/shared'; -import { TECH_TREE } from '@ai-tycoon/game-engine'; +import { formatMoney, formatNumber, formatPercent, formatDuration } from '@token-empire/shared'; +import type { Era } from '@token-empire/shared'; +import { TECH_TREE } from '@token-empire/game-engine'; import { DollarSign, TrendingUp, TrendingDown, Minus, Cpu, Brain, Users, Shield, ChevronRight, Zap, Wifi, Sparkles, FlaskConical, Building2, @@ -96,7 +96,7 @@ export function DashboardPage() { {totalDCs === 0 && ( - Welcome to AI Tycoon! Start by building a cluster in the Infrastructure tab, then add a campus and data center to deploy racks and train your first AI model. + Welcome to Token Empire! Start by building a cluster in the Infrastructure tab, then add a campus and data center to deploy racks and train your first AI model. )} diff --git a/apps/web/src/pages/DataPage.tsx b/apps/web/src/pages/DataPage.tsx index 32b10e1..99f246c 100644 --- a/apps/web/src/pages/DataPage.tsx +++ b/apps/web/src/pages/DataPage.tsx @@ -1,8 +1,8 @@ import { useState } from 'react'; import { Database, ShoppingCart, Zap } from 'lucide-react'; import { useGameStore } from '@/store'; -import { formatNumber, formatMoney, uuid } from '@ai-tycoon/shared'; -import type { OwnedDataset, DataDomain } from '@ai-tycoon/shared'; +import { formatNumber, formatMoney, uuid } from '@token-empire/shared'; +import type { OwnedDataset, DataDomain } from '@token-empire/shared'; interface MarketplaceDataset { name: string; diff --git a/apps/web/src/pages/FinancePage.tsx b/apps/web/src/pages/FinancePage.tsx index 99580f8..346d568 100644 --- a/apps/web/src/pages/FinancePage.tsx +++ b/apps/web/src/pages/FinancePage.tsx @@ -1,10 +1,10 @@ import { useGameStore } from '@/store'; -import { formatMoney, formatPercent, formatNumber, FUNDING_ROUNDS } from '@ai-tycoon/shared'; -import type { FundingRoundType } from '@ai-tycoon/shared'; +import { formatMoney, formatPercent, formatNumber, FUNDING_ROUNDS } from '@token-empire/shared'; +import type { FundingRoundType } from '@token-empire/shared'; import { TrendingUp, DollarSign, PiggyBank, BarChart3, Rocket, Check, X as XIcon } from 'lucide-react'; import { AreaChart, Area, XAxis, YAxis, ResponsiveContainer, LineChart, Line, Tooltip } from 'recharts'; -import { canRaiseFunding } from '@ai-tycoon/game-engine'; -import type { GameState } from '@ai-tycoon/shared'; +import { canRaiseFunding } from '@token-empire/game-engine'; +import type { GameState } from '@token-empire/shared'; export function FinancePage() { const money = useGameStore((s) => s.economy.money); diff --git a/apps/web/src/pages/InfrastructurePage.tsx b/apps/web/src/pages/InfrastructurePage.tsx index 1b97474..c494044 100644 --- a/apps/web/src/pages/InfrastructurePage.tsx +++ b/apps/web/src/pages/InfrastructurePage.tsx @@ -18,11 +18,11 @@ import { SWITCH_TIER_CONFIGS, DC_UPGRADE_COST_FRACTION, DC_UPGRADE_INCREMENT, skuTotalFlops, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import type { DCTier, RackSkuId, LocationId, PipelineStage, Era, Cluster, Campus, DataCenter, DeploymentCohort, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; const ERA_ORDER: Era[] = ['startup', 'scaleup', 'bigtech', 'agi']; diff --git a/apps/web/src/pages/LeaderboardPage.tsx b/apps/web/src/pages/LeaderboardPage.tsx index 9ab0cc8..8c303e2 100644 --- a/apps/web/src/pages/LeaderboardPage.tsx +++ b/apps/web/src/pages/LeaderboardPage.tsx @@ -1,7 +1,7 @@ import { useState, useEffect } from 'react'; import { Trophy, Medal, Clock, TrendingUp } from 'lucide-react'; import { useGameStore } from '@/store'; -import { formatMoney, formatNumber } from '@ai-tycoon/shared'; +import { formatMoney, formatNumber } from '@token-empire/shared'; import { api, getAuthToken } from '@/lib/api'; interface LeaderboardEntry { diff --git a/apps/web/src/pages/ModelsPage.tsx b/apps/web/src/pages/ModelsPage.tsx index 89fc4db..4d4077f 100644 --- a/apps/web/src/pages/ModelsPage.tsx +++ b/apps/web/src/pages/ModelsPage.tsx @@ -13,12 +13,12 @@ import { SIZE_TIER_LABELS, SFT_SPECIALIZATION_BONUSES, PRETRAINING_BASE_TICKS, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import type { ModelArchitecture, DataMixAllocation, SFTSpecialization, AlignmentMethod, DataDomain, QuantizationLevel, BaseModel, ModelVariant, SizeTier, ModelFamily, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; const DATA_MIX_PRESETS: Record = { balanced: { label: 'Balanced', mix: DEFAULT_DATA_MIX }, diff --git a/apps/web/src/pages/ResearchPage.tsx b/apps/web/src/pages/ResearchPage.tsx index 6a30e1c..c38706b 100644 --- a/apps/web/src/pages/ResearchPage.tsx +++ b/apps/web/src/pages/ResearchPage.tsx @@ -1,9 +1,9 @@ import { FlaskConical, Lock, Check, Play, ListOrdered, X } from 'lucide-react'; import { TutorialHint } from '@/components/game/TutorialHint'; import { useGameStore } from '@/store'; -import { formatDuration, formatPercent, formatNumber, formatMoney } from '@ai-tycoon/shared'; -import { TECH_TREE, getAvailableResearch } from '@ai-tycoon/game-engine'; -import type { ResearchNode } from '@ai-tycoon/shared'; +import { formatDuration, formatPercent, formatNumber, formatMoney } from '@token-empire/shared'; +import { TECH_TREE, getAvailableResearch } from '@token-empire/game-engine'; +import type { ResearchNode } from '@token-empire/shared'; const CATEGORY_COLORS: Record = { generation: 'border-purple-500/50 bg-purple-500/10', diff --git a/apps/web/src/pages/ServingPage.tsx b/apps/web/src/pages/ServingPage.tsx index 420687c..3c3ecdf 100644 --- a/apps/web/src/pages/ServingPage.tsx +++ b/apps/web/src/pages/ServingPage.tsx @@ -3,7 +3,7 @@ import { formatNumber, formatPercent, type TrafficPriority, type OverflowBehavior, type RoutingStrategy, TRAFFIC_PRIORITIES, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { Activity, Shield, Clock, CheckCircle, XCircle, Layers, AlertTriangle, Zap, Server, ArrowRight, diff --git a/apps/web/src/pages/SettingsPage.tsx b/apps/web/src/pages/SettingsPage.tsx index 3c66e08..56806a7 100644 --- a/apps/web/src/pages/SettingsPage.tsx +++ b/apps/web/src/pages/SettingsPage.tsx @@ -21,7 +21,7 @@ export function SettingsPage() { }; const handleReset = () => { - localStorage.removeItem('ai-tycoon-save'); + localStorage.removeItem('token-empire-save'); window.location.reload(); }; @@ -32,7 +32,7 @@ export function SettingsPage() { const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; - a.download = `ai-tycoon-${companyName.replace(/\s+/g, '-').toLowerCase()}.json`; + a.download = `token-empire-${companyName.replace(/\s+/g, '-').toLowerCase()}.json`; a.click(); URL.revokeObjectURL(url); }; @@ -51,7 +51,7 @@ export function SettingsPage() { } setImportData({ data, name: data.meta.companyName }); } catch { - addNotification({ title: 'Import Failed', message: 'Could not read save file. Make sure it is a valid AI Tycoon export.', type: 'danger', tick: useGameStore.getState().meta.tickCount }); + addNotification({ title: 'Import Failed', message: 'Could not read save file. Make sure it is a valid Token Empire export.', type: 'danger', tick: useGameStore.getState().meta.tickCount }); } }; reader.readAsText(file); @@ -60,7 +60,7 @@ export function SettingsPage() { const confirmImport = () => { if (!importData) return; - localStorage.setItem('ai-tycoon-save', JSON.stringify({ state: importData.data })); + localStorage.setItem('token-empire-save', JSON.stringify({ state: importData.data })); window.location.reload(); }; diff --git a/apps/web/src/pages/TalentPage.tsx b/apps/web/src/pages/TalentPage.tsx index f6863ff..b896716 100644 --- a/apps/web/src/pages/TalentPage.tsx +++ b/apps/web/src/pages/TalentPage.tsx @@ -1,9 +1,9 @@ import { useState } from 'react'; import { Users, Plus, Star, Briefcase } from 'lucide-react'; import { useGameStore } from '@/store'; -import { formatMoney } from '@ai-tycoon/shared'; -import { KEY_HIRE_POOL } from '@ai-tycoon/game-engine'; -import type { DepartmentId } from '@ai-tycoon/shared'; +import { formatMoney } from '@token-empire/shared'; +import { KEY_HIRE_POOL } from '@token-empire/game-engine'; +import type { DepartmentId } from '@token-empire/shared'; const DEPT_LABELS: Record = { research: 'Research', diff --git a/apps/web/src/pages/market/ApiTiersPanel.tsx b/apps/web/src/pages/market/ApiTiersPanel.tsx index cd136d9..9fbac9c 100644 --- a/apps/web/src/pages/market/ApiTiersPanel.tsx +++ b/apps/web/src/pages/market/ApiTiersPanel.tsx @@ -1,7 +1,7 @@ import { useState, useEffect, useRef, useCallback } from 'react'; import { useGameStore } from '@/store'; -import { formatNumber, formatMoney, formatPercent } from '@ai-tycoon/shared'; -import type { ApiTierId } from '@ai-tycoon/shared'; +import { formatNumber, formatMoney, formatPercent } from '@token-empire/shared'; +import type { ApiTierId } from '@token-empire/shared'; import { Code, Check } from 'lucide-react'; const TIER_ORDER: ApiTierId[] = ['free', 'payg', 'scale', 'enterprise-api']; diff --git a/apps/web/src/pages/market/ConsumerTiersPanel.tsx b/apps/web/src/pages/market/ConsumerTiersPanel.tsx index fde73de..a62bfd5 100644 --- a/apps/web/src/pages/market/ConsumerTiersPanel.tsx +++ b/apps/web/src/pages/market/ConsumerTiersPanel.tsx @@ -1,7 +1,7 @@ import { useState, useEffect, useRef, useCallback } from 'react'; import { useGameStore } from '@/store'; -import { formatNumber, formatMoney, formatPercent } from '@ai-tycoon/shared'; -import type { ConsumerTierId } from '@ai-tycoon/shared'; +import { formatNumber, formatMoney, formatPercent } from '@token-empire/shared'; +import type { ConsumerTierId } from '@token-empire/shared'; import { Users, Check } from 'lucide-react'; const TIER_ORDER: ConsumerTierId[] = ['free', 'plus', 'pro', 'team']; diff --git a/apps/web/src/pages/market/DeveloperEcosystemPanel.tsx b/apps/web/src/pages/market/DeveloperEcosystemPanel.tsx index 2c33c95..9f0293f 100644 --- a/apps/web/src/pages/market/DeveloperEcosystemPanel.tsx +++ b/apps/web/src/pages/market/DeveloperEcosystemPanel.tsx @@ -1,6 +1,6 @@ import { useState, useEffect, useRef, useCallback } from 'react'; import { useGameStore } from '@/store'; -import { formatNumber, formatMoney, formatPercent } from '@ai-tycoon/shared'; +import { formatNumber, formatMoney, formatPercent } from '@token-empire/shared'; import { Boxes, Check } from 'lucide-react'; function useAppliedFeedback() { diff --git a/apps/web/src/pages/market/EnterprisePipelinePanel.tsx b/apps/web/src/pages/market/EnterprisePipelinePanel.tsx index 0fc38dc..711859f 100644 --- a/apps/web/src/pages/market/EnterprisePipelinePanel.tsx +++ b/apps/web/src/pages/market/EnterprisePipelinePanel.tsx @@ -1,6 +1,6 @@ import { useGameStore } from '@/store'; -import { formatNumber, formatMoney, formatPercent } from '@ai-tycoon/shared'; -import type { EnterprisePipelineStage, EnterpriseSegment } from '@ai-tycoon/shared'; +import { formatNumber, formatMoney, formatPercent } from '@token-empire/shared'; +import type { EnterprisePipelineStage, EnterpriseSegment } from '@token-empire/shared'; import { Building2, AlertTriangle } from 'lucide-react'; const STAGE_ORDER: EnterprisePipelineStage[] = ['lead', 'qualification', 'poc', 'negotiation']; diff --git a/apps/web/src/pages/market/MarketOverviewPanel.tsx b/apps/web/src/pages/market/MarketOverviewPanel.tsx index 55170ab..e7d2d78 100644 --- a/apps/web/src/pages/market/MarketOverviewPanel.tsx +++ b/apps/web/src/pages/market/MarketOverviewPanel.tsx @@ -1,6 +1,6 @@ import { useGameStore } from '@/store'; -import { formatNumber, formatPercent } from '@ai-tycoon/shared'; -import type { TAMSegmentId } from '@ai-tycoon/shared'; +import { formatNumber, formatPercent } from '@token-empire/shared'; +import type { TAMSegmentId } from '@token-empire/shared'; import { Globe, TrendingUp, Clock, Thermometer } from 'lucide-react'; const SEGMENT_LABELS: Record = { diff --git a/apps/web/src/pages/market/ProductLinesPanel.tsx b/apps/web/src/pages/market/ProductLinesPanel.tsx index 2dc967b..04eb441 100644 --- a/apps/web/src/pages/market/ProductLinesPanel.tsx +++ b/apps/web/src/pages/market/ProductLinesPanel.tsx @@ -1,6 +1,6 @@ import { useState, useEffect, useRef, useCallback } from 'react'; import { useGameStore } from '@/store'; -import { formatNumber, formatMoney, formatPercent } from '@ai-tycoon/shared'; +import { formatNumber, formatMoney, formatPercent } from '@token-empire/shared'; import { Wrench, Bot, Check, Lock } from 'lucide-react'; function useAppliedFeedback() { diff --git a/apps/web/src/store/index.ts b/apps/web/src/store/index.ts index 447c247..f220ac1 100644 --- a/apps/web/src/store/index.ts +++ b/apps/web/src/store/index.ts @@ -16,7 +16,7 @@ import type { ModelArchitecture, AlignmentMethod, SizeTier, SFTSpecialization, QuantizationLevel, VariantCreationJob, ConsumerTierId, ApiTierId, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { INITIAL_SETTINGS, SAVE_VERSION, INITIAL_ECONOMY, INITIAL_INFRASTRUCTURE, INITIAL_COMPUTE, @@ -39,12 +39,12 @@ import { SFT_TIME_FRACTION, ALIGNMENT_TIME_FRACTION, SIZE_TIER_MAP, SIZE_TIER_LABELS, POINT_RELEASE_TIME_FRACTION, POINT_RELEASE_MAX_VERSION, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { emptyDCNetworkSummary, emptyCampusNetworkSummary, emptyClusterNetworkSummary, TECH_TREE, onModelDeployed, -} from '@ai-tycoon/game-engine'; -import { INITIAL_RIVALS } from '@ai-tycoon/game-engine'; +} from '@token-empire/game-engine'; +import { INITIAL_RIVALS } from '@token-empire/game-engine'; export type ActivePage = 'dashboard' | 'infrastructure' | 'research' | 'models' | 'market' | 'serving' | 'talent' | 'data' | 'competitors' | 'finance' | 'achievements' | 'leaderboard' | 'invitations' | 'settings'; @@ -1428,7 +1428,7 @@ export const useGameStore = create()( }), }), { - name: 'ai-tycoon-save', + name: 'token-empire-save', version: SAVE_VERSION, partialize: (state) => { const { activePage, notifications, infraNav, modelsTab, ...rest } = state; diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 6c0574c..aa3a45d 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@ai-tycoon/tsconfig/react.json", + "extends": "@token-empire/tsconfig/react.json", "compilerOptions": { "baseUrl": ".", "paths": { diff --git a/docker-compose.yml b/docker-compose.yml index d42853c..5fe5c0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: web: - image: gitea.thewrightserver.net/josh/aihostingtycoon/web:latest + image: gitea.thewrightserver.net/josh/tokenempire/web:latest ports: - "80:80" depends_on: @@ -8,11 +8,11 @@ services: restart: unless-stopped server: - image: gitea.thewrightserver.net/josh/aihostingtycoon/server:latest + image: gitea.thewrightserver.net/josh/tokenempire/server:latest ports: - "3001:3001" environment: - - DATABASE_URL=postgresql://aitycoon:aitycoon@db:5432/aitycoon + - DATABASE_URL=postgresql://tokenempire:tokenempire@db:5432/tokenempire - PORT=3001 - CORS_ORIGIN=* - JWT_SECRET=change-me-to-a-random-secret @@ -26,13 +26,13 @@ services: db: image: postgres:17-alpine environment: - - POSTGRES_USER=aitycoon - - POSTGRES_PASSWORD=aitycoon - - POSTGRES_DB=aitycoon + - POSTGRES_USER=tokenempire + - POSTGRES_PASSWORD=tokenempire + - POSTGRES_DB=tokenempire volumes: - pgdata:/var/lib/postgresql/data healthcheck: - test: ["CMD-SHELL", "pg_isready -U aitycoon"] + test: ["CMD-SHELL", "pg_isready -U tokenempire"] interval: 5s timeout: 5s retries: 5 diff --git a/docs/architecture.md b/docs/architecture.md index bac63fd..40181f2 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -17,7 +17,7 @@ The game engine and simulation core have no React dependency. They can run ident ## Monorepo Layout ``` -ai-tycoon/ +token-empire/ ├── turbo.json # Turborepo task config ├── pnpm-workspace.yaml # Workspace definition │ @@ -122,7 +122,7 @@ The store uses a slice pattern with 14 slices, each owning a portion of the game ### Persistence -- **localStorage**: Auto-save every 60 ticks under key `ai-tycoon-save`. The Zustand `persist` middleware handles serialization. +- **localStorage**: Auto-save every 60 ticks under key `token-empire-save`. The Zustand `persist` middleware handles serialization. - **Cloud saves**: Optional. POST to `/api/saves` every 5 minutes when authenticated. Requires the Hono backend + PostgreSQL. - **Save format versioning**: A `version` field in meta enables migration functions for breaking state changes. diff --git a/package.json b/package.json index edff14a..5e76b90 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ai-tycoon", + "name": "token-empire", "private": true, "scripts": { "dev": "turbo dev", @@ -9,8 +9,8 @@ "test": "vitest run", "test:watch": "vitest", "clean": "turbo clean", - "simulate": "turbo simulate --filter=@ai-tycoon/game-simulation", - "simulate:ci": "pnpm --filter @ai-tycoon/game-simulation simulate:ci" + "simulate": "turbo simulate --filter=@token-empire/game-simulation", + "simulate:ci": "pnpm --filter @token-empire/game-simulation simulate:ci" }, "devDependencies": { "turbo": "^2.5.0", diff --git a/packages/game-engine/package.json b/packages/game-engine/package.json index 449cfa4..1911b4f 100644 --- a/packages/game-engine/package.json +++ b/packages/game-engine/package.json @@ -1,5 +1,5 @@ { - "name": "@ai-tycoon/game-engine", + "name": "@token-empire/game-engine", "private": true, "version": "0.0.1", "type": "module", @@ -11,10 +11,10 @@ "test": "vitest run" }, "dependencies": { - "@ai-tycoon/shared": "workspace:*" + "@token-empire/shared": "workspace:*" }, "devDependencies": { - "@ai-tycoon/tsconfig": "workspace:*", + "@token-empire/tsconfig": "workspace:*", "typescript": "^5.8.0" } } diff --git a/packages/game-engine/src/__test-utils__/builders.ts b/packages/game-engine/src/__test-utils__/builders.ts index 27e06d1..d80c2f2 100644 --- a/packages/game-engine/src/__test-utils__/builders.ts +++ b/packages/game-engine/src/__test-utils__/builders.ts @@ -2,8 +2,8 @@ import type { Cluster, Campus, DataCenter, DeploymentCohort, DCNetworkSummary, CampusNetworkSummary, ClusterNetworkSummary, TrainingPipeline, BaseModel, ModelFamily, -} from '@ai-tycoon/shared'; -import { uuid } from '@ai-tycoon/shared'; +} from '@token-empire/shared'; +import { uuid } from '@token-empire/shared'; import type { DeepPartial } from './createTestState'; function emptyDCNetwork(): DCNetworkSummary { diff --git a/packages/game-engine/src/__test-utils__/createTestState.ts b/packages/game-engine/src/__test-utils__/createTestState.ts index f7a97ab..e8c7b3c 100644 --- a/packages/game-engine/src/__test-utils__/createTestState.ts +++ b/packages/game-engine/src/__test-utils__/createTestState.ts @@ -1,11 +1,11 @@ -import type { GameState } from '@ai-tycoon/shared'; +import type { GameState } from '@token-empire/shared'; import { INITIAL_SETTINGS, SAVE_VERSION, INITIAL_ECONOMY, INITIAL_INFRASTRUCTURE, INITIAL_COMPUTE, INITIAL_RESEARCH, INITIAL_MODELS, INITIAL_MARKET, INITIAL_COMPETITORS, INITIAL_TALENT, INITIAL_DATA, INITIAL_REPUTATION, INITIAL_ACHIEVEMENTS, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; export type DeepPartial = T extends object ? { [K in keyof T]?: DeepPartial } diff --git a/packages/game-engine/src/data/achievements.ts b/packages/game-engine/src/data/achievements.ts index e3beab9..5718c2d 100644 --- a/packages/game-engine/src/data/achievements.ts +++ b/packages/game-engine/src/data/achievements.ts @@ -1,4 +1,4 @@ -import type { AchievementDefinition } from '@ai-tycoon/shared'; +import type { AchievementDefinition } from '@token-empire/shared'; export const ACHIEVEMENT_DEFINITIONS: AchievementDefinition[] = [ { diff --git a/packages/game-engine/src/data/competitors.ts b/packages/game-engine/src/data/competitors.ts index 90f301c..7451a94 100644 --- a/packages/game-engine/src/data/competitors.ts +++ b/packages/game-engine/src/data/competitors.ts @@ -1,4 +1,4 @@ -import type { Competitor } from '@ai-tycoon/shared'; +import type { Competitor } from '@token-empire/shared'; export const INITIAL_RIVALS: Competitor[] = [ { diff --git a/packages/game-engine/src/data/enterpriseNames.ts b/packages/game-engine/src/data/enterpriseNames.ts index d108d5d..e0b2219 100644 --- a/packages/game-engine/src/data/enterpriseNames.ts +++ b/packages/game-engine/src/data/enterpriseNames.ts @@ -1,4 +1,4 @@ -import type { EnterpriseSegment } from '@ai-tycoon/shared'; +import type { EnterpriseSegment } from '@token-empire/shared'; export const ENTERPRISE_NAMES: Record = { startup: [ diff --git a/packages/game-engine/src/data/keyHires.ts b/packages/game-engine/src/data/keyHires.ts index f0aa3d5..77657a9 100644 --- a/packages/game-engine/src/data/keyHires.ts +++ b/packages/game-engine/src/data/keyHires.ts @@ -1,4 +1,4 @@ -import type { DepartmentId } from '@ai-tycoon/shared'; +import type { DepartmentId } from '@token-empire/shared'; /** * A recruitable key hire as it appears in the available pool. diff --git a/packages/game-engine/src/data/techTree.ts b/packages/game-engine/src/data/techTree.ts index 689fcc1..5c1203d 100644 --- a/packages/game-engine/src/data/techTree.ts +++ b/packages/game-engine/src/data/techTree.ts @@ -1,4 +1,4 @@ -import type { ResearchNode } from '@ai-tycoon/shared'; +import type { ResearchNode } from '@token-empire/shared'; export const TECH_TREE: ResearchNode[] = [ // === COMPUTE / INFRASTRUCTURE === diff --git a/packages/game-engine/src/engine.ts b/packages/game-engine/src/engine.ts index a933117..0ceae97 100644 --- a/packages/game-engine/src/engine.ts +++ b/packages/game-engine/src/engine.ts @@ -1,4 +1,4 @@ -import type { GameState } from '@ai-tycoon/shared'; +import type { GameState } from '@token-empire/shared'; import { processTick } from './tick'; export interface GameEngineCallbacks { diff --git a/packages/game-engine/src/systems/achievementSystem.test.ts b/packages/game-engine/src/systems/achievementSystem.test.ts index 0017542..2250630 100644 --- a/packages/game-engine/src/systems/achievementSystem.test.ts +++ b/packages/game-engine/src/systems/achievementSystem.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect } from 'vitest'; import { processAchievements } from './achievementSystem'; import { createTestState } from '../__test-utils__'; -import type { AchievementDefinition } from '@ai-tycoon/shared'; +import type { AchievementDefinition } from '@token-empire/shared'; function makeDef(overrides: Partial = {}): AchievementDefinition { return { diff --git a/packages/game-engine/src/systems/achievementSystem.ts b/packages/game-engine/src/systems/achievementSystem.ts index 77cd906..353a0a0 100644 --- a/packages/game-engine/src/systems/achievementSystem.ts +++ b/packages/game-engine/src/systems/achievementSystem.ts @@ -1,4 +1,4 @@ -import type { GameState, AchievementState, AchievementDefinition } from '@ai-tycoon/shared'; +import type { GameState, AchievementState, AchievementDefinition } from '@token-empire/shared'; export interface AchievementTickResult { achievements: AchievementState; diff --git a/packages/game-engine/src/systems/competitorSystem.test.ts b/packages/game-engine/src/systems/competitorSystem.test.ts index 9bcca3d..6fc9c4d 100644 --- a/packages/game-engine/src/systems/competitorSystem.test.ts +++ b/packages/game-engine/src/systems/competitorSystem.test.ts @@ -1,8 +1,8 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import { processCompetitors } from './competitorSystem'; import { createTestState, createSeededRNG } from '../__test-utils__'; -import { FRESHNESS_DECAY_RATE } from '@ai-tycoon/shared'; -import type { Competitor } from '@ai-tycoon/shared'; +import { FRESHNESS_DECAY_RATE } from '@token-empire/shared'; +import type { Competitor } from '@token-empire/shared'; const rng = createSeededRNG(42); beforeEach(() => rng.install()); diff --git a/packages/game-engine/src/systems/competitorSystem.ts b/packages/game-engine/src/systems/competitorSystem.ts index 07b8700..72d776d 100644 --- a/packages/game-engine/src/systems/competitorSystem.ts +++ b/packages/game-engine/src/systems/competitorSystem.ts @@ -1,10 +1,10 @@ -import type { GameState, CompetitorState, Competitor } from '@ai-tycoon/shared'; +import type { GameState, CompetitorState, Competitor } from '@token-empire/shared'; import { COMPETITOR_PRODUCT_THRESHOLDS, COMPETITOR_CATCHUP_SHARE_THRESHOLD, COMPETITOR_CATCHUP_PRICE_CUT, FRESHNESS_DECAY_RATE, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; function updateCompetitorProducts(rival: Competitor): Competitor['products'] { const cap = rival.estimatedCapability; diff --git a/packages/game-engine/src/systems/computeSystem.test.ts b/packages/game-engine/src/systems/computeSystem.test.ts index 8c306b8..cf0b0bd 100644 --- a/packages/game-engine/src/systems/computeSystem.test.ts +++ b/packages/game-engine/src/systems/computeSystem.test.ts @@ -1,8 +1,8 @@ import { describe, it, expect } from 'vitest'; import { createTestState } from '../__test-utils__'; import { computeCapacity, finalizeCompute } from './computeSystem'; -import type { InfrastructureState } from '@ai-tycoon/shared'; -import { INITIAL_INFRASTRUCTURE, FLOPS_TO_TOKENS_MULTIPLIER, COMPUTE_SNAPSHOT_INTERVAL, MAX_COMPUTE_HISTORY } from '@ai-tycoon/shared'; +import type { InfrastructureState } from '@token-empire/shared'; +import { INITIAL_INFRASTRUCTURE, FLOPS_TO_TOKENS_MULTIPLIER, COMPUTE_SNAPSHOT_INTERVAL, MAX_COMPUTE_HISTORY } from '@token-empire/shared'; function createInfrastructure(overrides: Partial = {}): InfrastructureState { return { ...INITIAL_INFRASTRUCTURE, ...overrides }; diff --git a/packages/game-engine/src/systems/computeSystem.ts b/packages/game-engine/src/systems/computeSystem.ts index 106d811..b0528b9 100644 --- a/packages/game-engine/src/systems/computeSystem.ts +++ b/packages/game-engine/src/systems/computeSystem.ts @@ -1,5 +1,5 @@ -import type { GameState, ComputeState, InfrastructureState } from '@ai-tycoon/shared'; -import { FLOPS_TO_TOKENS_MULTIPLIER, COMPUTE_SNAPSHOT_INTERVAL, MAX_COMPUTE_HISTORY } from '@ai-tycoon/shared'; +import type { GameState, ComputeState, InfrastructureState } from '@token-empire/shared'; +import { FLOPS_TO_TOKENS_MULTIPLIER, COMPUTE_SNAPSHOT_INTERVAL, MAX_COMPUTE_HISTORY } from '@token-empire/shared'; import type { ResearchBonuses } from './researchBonuses'; export interface CapacityResult { diff --git a/packages/game-engine/src/systems/dataSystem.test.ts b/packages/game-engine/src/systems/dataSystem.test.ts index 1d0420d..31e1584 100644 --- a/packages/game-engine/src/systems/dataSystem.test.ts +++ b/packages/game-engine/src/systems/dataSystem.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect } from 'vitest'; import { processData } from './dataSystem'; import { createTestState } from '../__test-utils__'; -import type { DataPartnership } from '@ai-tycoon/shared'; +import type { DataPartnership } from '@token-empire/shared'; function makePartnership(tokensPerTick: number): DataPartnership { return { diff --git a/packages/game-engine/src/systems/dataSystem.ts b/packages/game-engine/src/systems/dataSystem.ts index a0835a4..a4f9415 100644 --- a/packages/game-engine/src/systems/dataSystem.ts +++ b/packages/game-engine/src/systems/dataSystem.ts @@ -1,4 +1,4 @@ -import type { GameState, DataState } from '@ai-tycoon/shared'; +import type { GameState, DataState } from '@token-empire/shared'; export function processData(state: GameState): DataState { const subscribers = state.market.consumerTiers.totalUsers; diff --git a/packages/game-engine/src/systems/economySystem.test.ts b/packages/game-engine/src/systems/economySystem.test.ts index 26ce13f..ab351da 100644 --- a/packages/game-engine/src/systems/economySystem.test.ts +++ b/packages/game-engine/src/systems/economySystem.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect } from 'vitest'; import { processEconomy } from './economySystem'; import { createTestState, createTestCluster } from '../__test-utils__'; import type { MarketTickResult } from './marketSystem'; -import type { InfrastructureState } from '@ai-tycoon/shared'; +import type { InfrastructureState } from '@token-empire/shared'; function createMarketResult( overrides: Partial = {}, diff --git a/packages/game-engine/src/systems/economySystem.ts b/packages/game-engine/src/systems/economySystem.ts index daaf349..b71dbd4 100644 --- a/packages/game-engine/src/systems/economySystem.ts +++ b/packages/game-engine/src/systems/economySystem.ts @@ -1,5 +1,5 @@ -import type { GameState, EconomyState, InfrastructureState } from '@ai-tycoon/shared'; -import { FINANCIAL_SNAPSHOT_INTERVAL, MAX_FINANCIAL_HISTORY, REGULATION_COMPLIANCE_PER_CAPABILITY } from '@ai-tycoon/shared'; +import type { GameState, EconomyState, InfrastructureState } from '@token-empire/shared'; +import { FINANCIAL_SNAPSHOT_INTERVAL, MAX_FINANCIAL_HISTORY, REGULATION_COMPLIANCE_PER_CAPABILITY } from '@token-empire/shared'; import { TECH_TREE } from '../data/techTree'; import type { MarketTickResult } from './marketSystem'; diff --git a/packages/game-engine/src/systems/eraSystem.ts b/packages/game-engine/src/systems/eraSystem.ts index b210ac4..7585d0c 100644 --- a/packages/game-engine/src/systems/eraSystem.ts +++ b/packages/game-engine/src/systems/eraSystem.ts @@ -1,5 +1,5 @@ -import type { GameState, Era } from '@ai-tycoon/shared'; -import { ERA_THRESHOLDS } from '@ai-tycoon/shared'; +import type { GameState, Era } from '@token-empire/shared'; +import { ERA_THRESHOLDS } from '@token-empire/shared'; export function checkEraTransition(state: GameState): Era | null { const current = state.meta.currentEra; diff --git a/packages/game-engine/src/systems/fundingSystem.ts b/packages/game-engine/src/systems/fundingSystem.ts index ca43ebf..a49e10b 100644 --- a/packages/game-engine/src/systems/fundingSystem.ts +++ b/packages/game-engine/src/systems/fundingSystem.ts @@ -1,5 +1,5 @@ -import type { GameState, FundingState, FundingRoundType } from '@ai-tycoon/shared'; -import { FUNDING_ROUNDS } from '@ai-tycoon/shared'; +import type { GameState, FundingState, FundingRoundType } from '@token-empire/shared'; +import { FUNDING_ROUNDS } from '@token-empire/shared'; const ROUND_ORDER: FundingRoundType[] = ['seed', 'seriesA', 'seriesB', 'seriesC', 'seriesD', 'ipo']; diff --git a/packages/game-engine/src/systems/infrastructureSystem.ts b/packages/game-engine/src/systems/infrastructureSystem.ts index 1b02e9f..7840473 100644 --- a/packages/game-engine/src/systems/infrastructureSystem.ts +++ b/packages/game-engine/src/systems/infrastructureSystem.ts @@ -3,7 +3,7 @@ import type { DeploymentCohort, PipelineStage, RackSkuId, SwitchTier, DCNetworkSummary, CampusNetworkSummary, ClusterNetworkSummary, RepairBatch, CampusRetrofitQueue, DCTier, IntraNodeInterconnect, NetworkFabric, RackSkuConfig, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { LOCATION_CONFIGS, RACK_SKU_CONFIGS, @@ -22,7 +22,7 @@ import { COOLING_TYPE_CONFIGS, NETWORK_FABRIC_CONFIGS, estimateNetworkSlots, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import type { TickNotification } from '../tick'; import type { ResearchBonuses } from './researchBonuses'; diff --git a/packages/game-engine/src/systems/market/apiTierSystem.ts b/packages/game-engine/src/systems/market/apiTierSystem.ts index 8a143e9..e6af19c 100644 --- a/packages/game-engine/src/systems/market/apiTierSystem.ts +++ b/packages/game-engine/src/systems/market/apiTierSystem.ts @@ -1,11 +1,11 @@ -import type { ApiTierState, ApiTierId, DeveloperEcosystem, TierServingMetrics } from '@ai-tycoon/shared'; +import type { ApiTierState, ApiTierId, DeveloperEcosystem, TierServingMetrics } from '@token-empire/shared'; import { API_TIER_ORDER, API_CONVERSION_RATES, API_TIER_CHURN_RATES, API_TOKENS_PER_DEVELOPER_PER_TICK, REJECTION_CHURN_MULTIPLIER, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; export interface ApiTickResult { apiTiers: ApiTierState; diff --git a/packages/game-engine/src/systems/market/consumerTierSystem.ts b/packages/game-engine/src/systems/market/consumerTierSystem.ts index ac6d8e3..cbc14a8 100644 --- a/packages/game-engine/src/systems/market/consumerTierSystem.ts +++ b/packages/game-engine/src/systems/market/consumerTierSystem.ts @@ -1,4 +1,4 @@ -import type { ConsumerTierState, ConsumerTierId, TierServingMetrics } from '@ai-tycoon/shared'; +import type { ConsumerTierState, ConsumerTierId, TierServingMetrics } from '@token-empire/shared'; import { CONSUMER_TIER_ORDER, CONVERSION_RATES, @@ -14,7 +14,7 @@ import { PRICE_SATISFACTION_WEIGHT, PRICE_CHURN_EXPONENT, PRICE_CHURN_MAX_MULTIPLIER, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; export interface ConsumerTickResult { consumerTiers: ConsumerTierState; diff --git a/packages/game-engine/src/systems/market/developerEcosystem.ts b/packages/game-engine/src/systems/market/developerEcosystem.ts index de8a0c8..c46f685 100644 --- a/packages/game-engine/src/systems/market/developerEcosystem.ts +++ b/packages/game-engine/src/systems/market/developerEcosystem.ts @@ -1,4 +1,4 @@ -import type { DeveloperEcosystem } from '@ai-tycoon/shared'; +import type { DeveloperEcosystem } from '@token-empire/shared'; import { BASE_DEV_GROWTH, FREE_TIER_DEV_MULTIPLIER, @@ -9,8 +9,8 @@ import { STARTUP_ADOPTION_PER_DEV, ENTERPRISE_REFERRAL_PER_STARTUP, TAM_BASE_SIZES, -} from '@ai-tycoon/shared'; -import type { Era } from '@ai-tycoon/shared'; +} from '@token-empire/shared'; +import type { Era } from '@token-empire/shared'; export function processDeveloperEcosystem( eco: DeveloperEcosystem, diff --git a/packages/game-engine/src/systems/market/enterprisePipeline.ts b/packages/game-engine/src/systems/market/enterprisePipeline.ts index 415a600..fa43ead 100644 --- a/packages/game-engine/src/systems/market/enterprisePipeline.ts +++ b/packages/game-engine/src/systems/market/enterprisePipeline.ts @@ -6,7 +6,7 @@ import type { EnterprisePipelineStage, DeveloperEcosystem, TierServingMetrics, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { BASE_LEAD_RATE, LEAD_EXPIRY_TICKS, @@ -19,7 +19,7 @@ import { ENTERPRISE_CAPABILITY_REQUIREMENTS, ENTERPRISE_TOKENS_PER_TICK, ENTERPRISE_REJECTION_SLA_MULTIPLIER, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { ENTERPRISE_NAMES } from '../../data/enterpriseNames'; let leadIdCounter = 0; diff --git a/packages/game-engine/src/systems/market/index.ts b/packages/game-engine/src/systems/market/index.ts index 71db838..0cdb23e 100644 --- a/packages/game-engine/src/systems/market/index.ts +++ b/packages/game-engine/src/systems/market/index.ts @@ -1,6 +1,6 @@ -import type { GameState, MarketState, ModelCapabilities } from '@ai-tycoon/shared'; -import { CONSUMER_TOKENS_PER_SUBSCRIBER, API_TOKENS_PER_DEVELOPER_PER_TICK, BATCH_API_DEMAND_PER_DEV, makeInitialServingMetrics } from '@ai-tycoon/shared'; -import type { TrafficPriority, TierServingMetrics } from '@ai-tycoon/shared'; +import type { GameState, MarketState, ModelCapabilities } from '@token-empire/shared'; +import { CONSUMER_TOKENS_PER_SUBSCRIBER, API_TOKENS_PER_DEVELOPER_PER_TICK, BATCH_API_DEMAND_PER_DEV, makeInitialServingMetrics } from '@token-empire/shared'; +import type { TrafficPriority, TierServingMetrics } from '@token-empire/shared'; import { computeSeasonal } from './seasonalSystem'; import { updateObsolescence } from './obsolescenceSystem'; import { buildPlayerProfile, buildCompetitorProfile, computeMarketShares, updateTAMGrowth } from './tamSystem'; diff --git a/packages/game-engine/src/systems/market/obsolescenceSystem.ts b/packages/game-engine/src/systems/market/obsolescenceSystem.ts index c56fc87..8d4e98c 100644 --- a/packages/game-engine/src/systems/market/obsolescenceSystem.ts +++ b/packages/game-engine/src/systems/market/obsolescenceSystem.ts @@ -1,10 +1,10 @@ -import type { ObsolescenceState, Era } from '@ai-tycoon/shared'; +import type { ObsolescenceState, Era } from '@token-empire/shared'; import { OBSOLESCENCE_BASELINE_GROWTH, OBSOLESCENCE_ERA_ACCELERATOR, FRESHNESS_DECAY_RATE, NEW_MODEL_BOOST_TICKS, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; export function updateObsolescence( obs: ObsolescenceState, diff --git a/packages/game-engine/src/systems/market/productLines.ts b/packages/game-engine/src/systems/market/productLines.ts index 7161d7b..4b977f5 100644 --- a/packages/game-engine/src/systems/market/productLines.ts +++ b/packages/game-engine/src/systems/market/productLines.ts @@ -1,4 +1,4 @@ -import type { CodeAssistantState, AgentsPlatformState, ModelCapabilities } from '@ai-tycoon/shared'; +import type { CodeAssistantState, AgentsPlatformState, ModelCapabilities } from '@token-empire/shared'; import { CODE_ASSISTANT_MIN_CODING_SCORE, CODE_ASSISTANT_BASE_ADOPTION_RATE, @@ -6,7 +6,7 @@ import { AGENTS_PLATFORM_MIN_AGENTS_SCORE, AGENTS_PLATFORM_BASE_ADOPTION_RATE, AGENTS_PLATFORM_CHURN_RATE, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; export interface ProductLineResult { codeAssistant: CodeAssistantState; diff --git a/packages/game-engine/src/systems/market/seasonalSystem.ts b/packages/game-engine/src/systems/market/seasonalSystem.ts index 85e764e..bd66a4f 100644 --- a/packages/game-engine/src/systems/market/seasonalSystem.ts +++ b/packages/game-engine/src/systems/market/seasonalSystem.ts @@ -1,5 +1,5 @@ -import type { SeasonalPhase } from '@ai-tycoon/shared'; -import { SEASONAL_CYCLE_TICKS, SEASONAL_MULTIPLIERS } from '@ai-tycoon/shared'; +import type { SeasonalPhase } from '@token-empire/shared'; +import { SEASONAL_CYCLE_TICKS, SEASONAL_MULTIPLIERS } from '@token-empire/shared'; export interface SeasonalResult { phase: SeasonalPhase; diff --git a/packages/game-engine/src/systems/market/servingPipeline.ts b/packages/game-engine/src/systems/market/servingPipeline.ts index 0079285..b03a3a7 100644 --- a/packages/game-engine/src/systems/market/servingPipeline.ts +++ b/packages/game-engine/src/systems/market/servingPipeline.ts @@ -5,8 +5,8 @@ import type { ServingMetrics, ModelUtilizationEntry, BatchApiState, -} from '@ai-tycoon/shared'; -import type { BaseModel, ModelsState, SizeTier } from '@ai-tycoon/shared'; +} from '@token-empire/shared'; +import type { BaseModel, ModelsState, SizeTier } from '@token-empire/shared'; import { MODEL_SIZE_THROUGHPUT_SCALER, MOE_SPEED_MULTIPLIER, @@ -18,8 +18,8 @@ import { BASE_LATENCY_MS, QUEUE_LATENCY_MS_PER_PERCENT, BATCH_API_MAX_PENDING, -} from '@ai-tycoon/shared'; -import { makeInitialServingMetrics } from '@ai-tycoon/shared'; +} from '@token-empire/shared'; +import { makeInitialServingMetrics } from '@token-empire/shared'; export interface ModelServingSlot { modelId: string; diff --git a/packages/game-engine/src/systems/market/tamSystem.ts b/packages/game-engine/src/systems/market/tamSystem.ts index 7bf45fc..8e81b14 100644 --- a/packages/game-engine/src/systems/market/tamSystem.ts +++ b/packages/game-engine/src/systems/market/tamSystem.ts @@ -6,7 +6,7 @@ import type { Era, ObsolescenceState, DeveloperEcosystem, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { TAM_BASE_SIZES, TAM_GROWTH_PER_TICK, @@ -17,7 +17,7 @@ import { NEW_MODEL_BOOST_VALUE, CONSUMER_TIER_BASE_PERCEIVED_VALUE, PERCEIVED_VALUE_REPUTATION_RANGE, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; export interface ParticipantProfile { id: string; diff --git a/packages/game-engine/src/systems/marketSystem.ts b/packages/game-engine/src/systems/marketSystem.ts index 4a6ca9d..a70cbca 100644 --- a/packages/game-engine/src/systems/marketSystem.ts +++ b/packages/game-engine/src/systems/marketSystem.ts @@ -1,4 +1,4 @@ -import type { GameState } from '@ai-tycoon/shared'; +import type { GameState } from '@token-empire/shared'; import { processMarketV2 } from './market/index'; import type { ResearchBonuses } from './researchBonuses'; diff --git a/packages/game-engine/src/systems/modelSystem.test.ts b/packages/game-engine/src/systems/modelSystem.test.ts index d25f37d..815d43b 100644 --- a/packages/game-engine/src/systems/modelSystem.test.ts +++ b/packages/game-engine/src/systems/modelSystem.test.ts @@ -10,7 +10,7 @@ import { processModels } from './modelSystem'; import { POINT_RELEASE_CAPABILITY_GAIN, VRAM_REQUIREMENTS_BY_GENERATION, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import type { ResearchBonuses } from './researchBonuses'; const rng = createSeededRNG(42); diff --git a/packages/game-engine/src/systems/modelSystem.ts b/packages/game-engine/src/systems/modelSystem.ts index 4aaa8e5..71fa072 100644 --- a/packages/game-engine/src/systems/modelSystem.ts +++ b/packages/game-engine/src/systems/modelSystem.ts @@ -2,7 +2,7 @@ import type { GameState, ModelsState, BaseModel, ModelCapabilities, SafetyProfile, TrainingPipeline, TrainingEvent, TrainingEventType, ModelVariant, VariantCreationJob, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { uuid, VRAM_REQUIREMENTS_BY_GENERATION, MOE_CAPABILITY_MULTIPLIER, MOE_SPEED_MULTIPLIER, @@ -17,7 +17,7 @@ import { POINT_RELEASE_CAPABILITY_GAIN, SIZE_TIER_LABELS, MODEL_BASE_SAFETY, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import type { ResearchBonuses } from './researchBonuses'; export interface ModelTickResult { diff --git a/packages/game-engine/src/systems/reputationSystem.test.ts b/packages/game-engine/src/systems/reputationSystem.test.ts index 81847df..d0cda41 100644 --- a/packages/game-engine/src/systems/reputationSystem.test.ts +++ b/packages/game-engine/src/systems/reputationSystem.test.ts @@ -6,7 +6,7 @@ import { LOW_SAFETY_THRESHOLD, SAFETY_RECORD_RECOVERY_RATE, SAFETY_INCIDENT_REPUTATION_HIT, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; const rng = createSeededRNG(42); beforeEach(() => rng.install()); diff --git a/packages/game-engine/src/systems/reputationSystem.ts b/packages/game-engine/src/systems/reputationSystem.ts index b553a08..30c30ea 100644 --- a/packages/game-engine/src/systems/reputationSystem.ts +++ b/packages/game-engine/src/systems/reputationSystem.ts @@ -1,4 +1,4 @@ -import type { GameState, ReputationState } from '@ai-tycoon/shared'; +import type { GameState, ReputationState } from '@token-empire/shared'; import { MAX_REPUTATION_HISTORY, SAFETY_INCIDENT_PROBABILITY_BASE, @@ -6,7 +6,7 @@ import { LOW_SAFETY_THRESHOLD, SAFETY_RECORD_RECOVERY_RATE, PUBLIC_PERCEPTION_GROWTH_RATE, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import type { ResearchBonuses } from './researchBonuses'; export interface ReputationTickResult { diff --git a/packages/game-engine/src/systems/researchSystem.ts b/packages/game-engine/src/systems/researchSystem.ts index 9692c43..fe06137 100644 --- a/packages/game-engine/src/systems/researchSystem.ts +++ b/packages/game-engine/src/systems/researchSystem.ts @@ -1,4 +1,4 @@ -import type { GameState, ResearchState, ActiveResearch, ComputeState } from '@ai-tycoon/shared'; +import type { GameState, ResearchState, ActiveResearch, ComputeState } from '@token-empire/shared'; import { TECH_TREE } from '../data/techTree'; export interface ResearchTickResult { diff --git a/packages/game-engine/src/systems/talentSystem.ts b/packages/game-engine/src/systems/talentSystem.ts index b67e34e..9090864 100644 --- a/packages/game-engine/src/systems/talentSystem.ts +++ b/packages/game-engine/src/systems/talentSystem.ts @@ -1,5 +1,5 @@ -import type { GameState, TalentState } from '@ai-tycoon/shared'; -import { ERA_BUDGET_COST_MULTIPLIER } from '@ai-tycoon/shared'; +import type { GameState, TalentState } from '@token-empire/shared'; +import { ERA_BUDGET_COST_MULTIPLIER } from '@token-empire/shared'; const SALARY_PER_HEADCOUNT_PER_TICK = 5; diff --git a/packages/game-engine/src/tick.ts b/packages/game-engine/src/tick.ts index 5948640..1430175 100644 --- a/packages/game-engine/src/tick.ts +++ b/packages/game-engine/src/tick.ts @@ -1,4 +1,4 @@ -import type { GameState, AchievementDefinition } from '@ai-tycoon/shared'; +import type { GameState, AchievementDefinition } from '@token-empire/shared'; import { processEconomy } from './systems/economySystem'; import { processInfrastructure } from './systems/infrastructureSystem'; import { computeCapacity, finalizeCompute } from './systems/computeSystem'; diff --git a/packages/game-engine/tsconfig.json b/packages/game-engine/tsconfig.json index 07c8523..2b1e09c 100644 --- a/packages/game-engine/tsconfig.json +++ b/packages/game-engine/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@ai-tycoon/tsconfig/base.json", + "extends": "@token-empire/tsconfig/base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src" diff --git a/packages/game-simulation/package.json b/packages/game-simulation/package.json index 7f0d871..60b222c 100644 --- a/packages/game-simulation/package.json +++ b/packages/game-simulation/package.json @@ -1,5 +1,5 @@ { - "name": "@ai-tycoon/game-simulation", + "name": "@token-empire/game-simulation", "private": true, "version": "0.0.1", "type": "module", @@ -19,11 +19,11 @@ "test": "vitest run" }, "dependencies": { - "@ai-tycoon/shared": "workspace:*", - "@ai-tycoon/game-engine": "workspace:*" + "@token-empire/shared": "workspace:*", + "@token-empire/game-engine": "workspace:*" }, "devDependencies": { - "@ai-tycoon/tsconfig": "workspace:*", + "@token-empire/tsconfig": "workspace:*", "@types/node": "^22.0.0", "tsx": "^4.19.4", "typescript": "^5.8.0" diff --git a/packages/game-simulation/src/actions/competitors.ts b/packages/game-simulation/src/actions/competitors.ts index 8825b6c..fb4acd2 100644 --- a/packages/game-simulation/src/actions/competitors.ts +++ b/packages/game-simulation/src/actions/competitors.ts @@ -1,4 +1,4 @@ -import type { GameState } from '@ai-tycoon/shared'; +import type { GameState } from '@token-empire/shared'; export function acquireCompetitor(state: GameState, competitorId: string): boolean { const rival = state.competitors.rivals.find(r => r.id === competitorId); diff --git a/packages/game-simulation/src/actions/data.ts b/packages/game-simulation/src/actions/data.ts index 067891c..fb1de99 100644 --- a/packages/game-simulation/src/actions/data.ts +++ b/packages/game-simulation/src/actions/data.ts @@ -1,4 +1,4 @@ -import type { GameState, OwnedDataset } from '@ai-tycoon/shared'; +import type { GameState, OwnedDataset } from '@token-empire/shared'; export function purchaseDataset(state: GameState, dataset: OwnedDataset, cost: number): boolean { if (state.economy.money < cost) return false; diff --git a/packages/game-simulation/src/actions/funding.ts b/packages/game-simulation/src/actions/funding.ts index d08356a..4bd7927 100644 --- a/packages/game-simulation/src/actions/funding.ts +++ b/packages/game-simulation/src/actions/funding.ts @@ -1,6 +1,6 @@ -import type { GameState, FundingRoundType } from '@ai-tycoon/shared'; -import { FUNDING_ROUNDS } from '@ai-tycoon/shared'; -import { canRaiseFunding, getNextFundingRound } from '@ai-tycoon/game-engine'; +import type { GameState, FundingRoundType } from '@token-empire/shared'; +import { FUNDING_ROUNDS } from '@token-empire/shared'; +import { canRaiseFunding, getNextFundingRound } from '@token-empire/game-engine'; export function raiseFunding(state: GameState, roundType: FundingRoundType): boolean { const config = FUNDING_ROUNDS[roundType]; diff --git a/packages/game-simulation/src/actions/infrastructure.ts b/packages/game-simulation/src/actions/infrastructure.ts index b4cb3c8..1a6be30 100644 --- a/packages/game-simulation/src/actions/infrastructure.ts +++ b/packages/game-simulation/src/actions/infrastructure.ts @@ -2,7 +2,7 @@ import type { GameState, Era, LocationId, DCTier, RackSkuId, Cluster, Campus, DataCenter, DeploymentCohort, CoolingType, NetworkFabric, PipelineStage, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { LOCATION_CONFIGS, DC_TIER_CONFIGS, RACK_SKU_CONFIGS, CLUSTER_COST_CONFIG, CAMPUS_TIER_COSTS, FIRST_CAMPUS_BUILD_TICKS, @@ -11,10 +11,10 @@ import { FABRIC_ORDER, NETWORK_FABRIC_CONFIGS, DC_UPGRADE_COST_FRACTION, DC_UPGRADE_INCREMENT, estimateNetworkSlots, maxComputeRacks, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { emptyDCNetworkSummary, emptyCampusNetworkSummary, emptyClusterNetworkSummary, -} from '@ai-tycoon/game-engine'; +} from '@token-empire/game-engine'; import { simId } from './ids'; const ERA_ORDER: Era[] = ['startup', 'scaleup', 'bigtech', 'agi']; diff --git a/packages/game-simulation/src/actions/market.ts b/packages/game-simulation/src/actions/market.ts index 1a94421..84f9738 100644 --- a/packages/game-simulation/src/actions/market.ts +++ b/packages/game-simulation/src/actions/market.ts @@ -1,4 +1,4 @@ -import type { GameState, ConsumerTierId, ApiTierId } from '@ai-tycoon/shared'; +import type { GameState, ConsumerTierId, ApiTierId } from '@token-empire/shared'; export function setTrainingAllocation(state: GameState, ratio: number): void { state.compute.trainingAllocation = ratio; diff --git a/packages/game-simulation/src/actions/models.ts b/packages/game-simulation/src/actions/models.ts index 563e97a..2bc054e 100644 --- a/packages/game-simulation/src/actions/models.ts +++ b/packages/game-simulation/src/actions/models.ts @@ -2,14 +2,14 @@ import type { GameState, ModelFamily, TrainingPipeline, VariantCreationJob, ModelArchitecture, DataMixAllocation, SFTSpecialization, AlignmentMethod, SizeTier, QuantizationLevel, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { MAX_CONCURRENT_TRAINING, SIZE_TIER_MAP, SIZE_TIER_LABELS, SFT_TIME_FRACTION, ALIGNMENT_TIME_FRACTION, POINT_RELEASE_TIME_FRACTION, QUANTIZATION_TICKS, OPEN_SOURCE_REPUTATION_BOOST, -} from '@ai-tycoon/shared'; -import { onModelDeployed } from '@ai-tycoon/game-engine'; +} from '@token-empire/shared'; +import { onModelDeployed } from '@token-empire/game-engine'; import { simId } from './ids'; export interface TrainingConfig { diff --git a/packages/game-simulation/src/actions/research.ts b/packages/game-simulation/src/actions/research.ts index 68a6244..f88084c 100644 --- a/packages/game-simulation/src/actions/research.ts +++ b/packages/game-simulation/src/actions/research.ts @@ -1,5 +1,5 @@ -import type { GameState, ActiveResearch } from '@ai-tycoon/shared'; -import { TECH_TREE } from '@ai-tycoon/game-engine'; +import type { GameState, ActiveResearch } from '@token-empire/shared'; +import { TECH_TREE } from '@token-empire/game-engine'; export function startResearch(state: GameState, research: ActiveResearch): boolean { const node = TECH_TREE.find(n => n.id === research.researchId); diff --git a/packages/game-simulation/src/actions/talent.ts b/packages/game-simulation/src/actions/talent.ts index 184026a..fa4ef39 100644 --- a/packages/game-simulation/src/actions/talent.ts +++ b/packages/game-simulation/src/actions/talent.ts @@ -1,4 +1,4 @@ -import type { GameState } from '@ai-tycoon/shared'; +import type { GameState } from '@token-empire/shared'; export type DepartmentId = 'research' | 'engineering' | 'operations' | 'sales'; diff --git a/packages/game-simulation/src/analysis/breakpoints.ts b/packages/game-simulation/src/analysis/breakpoints.ts index 9ca6fe8..d3d3f5a 100644 --- a/packages/game-simulation/src/analysis/breakpoints.ts +++ b/packages/game-simulation/src/analysis/breakpoints.ts @@ -1,5 +1,5 @@ import type { SimulationMetrics } from '../strategies/types'; -import type { TickNotification } from '@ai-tycoon/game-engine'; +import type { TickNotification } from '@token-empire/game-engine'; export interface RevenueBreakpoint { tick: number; diff --git a/packages/game-simulation/src/analysis/deadZones.ts b/packages/game-simulation/src/analysis/deadZones.ts index 9b0f1d3..f998b2c 100644 --- a/packages/game-simulation/src/analysis/deadZones.ts +++ b/packages/game-simulation/src/analysis/deadZones.ts @@ -1,5 +1,5 @@ -import type { GameState, RackSkuId } from '@ai-tycoon/shared'; -import { RACK_SKU_CONFIGS } from '@ai-tycoon/shared'; +import type { GameState, RackSkuId } from '@token-empire/shared'; +import { RACK_SKU_CONFIGS } from '@token-empire/shared'; import type { SimulationMetrics } from '../strategies/types'; export interface DeadZone { diff --git a/packages/game-simulation/src/analysis/eraProximity.ts b/packages/game-simulation/src/analysis/eraProximity.ts index 2857be1..20de2f3 100644 --- a/packages/game-simulation/src/analysis/eraProximity.ts +++ b/packages/game-simulation/src/analysis/eraProximity.ts @@ -1,5 +1,5 @@ import type { SimulationMetrics } from '../strategies/types'; -import { ERA_THRESHOLDS } from '@ai-tycoon/shared'; +import { ERA_THRESHOLDS } from '@token-empire/shared'; const ERA_ORDER = ['startup', 'scaleup', 'bigtech', 'agi'] as const; diff --git a/packages/game-simulation/src/analysis/featureUtilization.ts b/packages/game-simulation/src/analysis/featureUtilization.ts index f09887e..6cb33b2 100644 --- a/packages/game-simulation/src/analysis/featureUtilization.ts +++ b/packages/game-simulation/src/analysis/featureUtilization.ts @@ -1,6 +1,6 @@ -import type { GameState } from '@ai-tycoon/shared'; -import { RACK_SKU_CONFIGS, FUNDING_ROUNDS } from '@ai-tycoon/shared'; -import { TECH_TREE } from '@ai-tycoon/game-engine'; +import type { GameState } from '@token-empire/shared'; +import { RACK_SKU_CONFIGS, FUNDING_ROUNDS } from '@token-empire/shared'; +import { TECH_TREE } from '@token-empire/game-engine'; export interface FeatureUsage { name: string; diff --git a/packages/game-simulation/src/analysis/metrics.ts b/packages/game-simulation/src/analysis/metrics.ts index 3fa1e91..e15e89c 100644 --- a/packages/game-simulation/src/analysis/metrics.ts +++ b/packages/game-simulation/src/analysis/metrics.ts @@ -1,4 +1,4 @@ -import type { GameState } from '@ai-tycoon/shared'; +import type { GameState } from '@token-empire/shared'; import type { SimulationMetrics } from '../strategies/types'; export function collectMetrics(state: GameState): SimulationMetrics { diff --git a/packages/game-simulation/src/analysis/milestones.ts b/packages/game-simulation/src/analysis/milestones.ts index 093bde3..082242c 100644 --- a/packages/game-simulation/src/analysis/milestones.ts +++ b/packages/game-simulation/src/analysis/milestones.ts @@ -1,5 +1,5 @@ import type { SimulationMetrics } from '../strategies/types'; -import type { TickNotification } from '@ai-tycoon/game-engine'; +import type { TickNotification } from '@token-empire/game-engine'; export interface Milestone { name: string; diff --git a/packages/game-simulation/src/analysis/report.ts b/packages/game-simulation/src/analysis/report.ts index 70f81ab..07060ba 100644 --- a/packages/game-simulation/src/analysis/report.ts +++ b/packages/game-simulation/src/analysis/report.ts @@ -100,7 +100,7 @@ export function printConsoleReport(result: SimulationResult, config: SimulationC const perEraSummary = buildPerEraSummary(result, eraProximity); console.log(''); - console.log('=== AI Tycoon Balance Simulation ==='); + console.log('=== Token Empire Balance Simulation ==='); console.log(`Strategy: ${config.strategy.name} | Ticks: ${config.totalTicks.toLocaleString()} | Decision interval: ${config.decisionInterval}`); console.log(`Wall time: ${(result.wallTimeMs / 1000).toFixed(1)}s${config.seed !== undefined ? ` | Seed: ${config.seed}` : ''}`); console.log(''); diff --git a/packages/game-simulation/src/analysis/sanityChecks.ts b/packages/game-simulation/src/analysis/sanityChecks.ts index 4126e1b..10d5ce7 100644 --- a/packages/game-simulation/src/analysis/sanityChecks.ts +++ b/packages/game-simulation/src/analysis/sanityChecks.ts @@ -1,5 +1,5 @@ import type { SimulationMetrics } from '../strategies/types'; -import { ERA_THRESHOLDS } from '@ai-tycoon/shared'; +import { ERA_THRESHOLDS } from '@token-empire/shared'; export type SanityCheckSeverity = 'error' | 'warning'; diff --git a/packages/game-simulation/src/analysis/systemInterconnections.ts b/packages/game-simulation/src/analysis/systemInterconnections.ts index 58da56e..8437bbb 100644 --- a/packages/game-simulation/src/analysis/systemInterconnections.ts +++ b/packages/game-simulation/src/analysis/systemInterconnections.ts @@ -1,5 +1,5 @@ import type { SimulationMetrics } from '../strategies/types'; -import type { TickNotification } from '@ai-tycoon/game-engine'; +import type { TickNotification } from '@token-empire/game-engine'; export interface SystemConnection { from: string; diff --git a/packages/game-simulation/src/initialState.ts b/packages/game-simulation/src/initialState.ts index da2a826..94c24fa 100644 --- a/packages/game-simulation/src/initialState.ts +++ b/packages/game-simulation/src/initialState.ts @@ -1,12 +1,12 @@ -import type { GameState } from '@ai-tycoon/shared'; +import type { GameState } from '@token-empire/shared'; import { INITIAL_SETTINGS, SAVE_VERSION, INITIAL_ECONOMY, INITIAL_INFRASTRUCTURE, INITIAL_COMPUTE, INITIAL_RESEARCH, INITIAL_MODELS, INITIAL_MARKET, INITIAL_TALENT, INITIAL_DATA, INITIAL_REPUTATION, INITIAL_ACHIEVEMENTS, -} from '@ai-tycoon/shared'; -import { INITIAL_RIVALS } from '@ai-tycoon/game-engine'; +} from '@token-empire/shared'; +import { INITIAL_RIVALS } from '@token-empire/game-engine'; export function createInitialState(companyName = 'SimCorp'): GameState { return { diff --git a/packages/game-simulation/src/runner.ts b/packages/game-simulation/src/runner.ts index de4bde8..f2e25f9 100644 --- a/packages/game-simulation/src/runner.ts +++ b/packages/game-simulation/src/runner.ts @@ -1,6 +1,6 @@ -import type { GameState } from '@ai-tycoon/shared'; -import { processTick, setAchievementDefinitions, ACHIEVEMENT_DEFINITIONS, resetResearchBonusCache, resetFleetCache } from '@ai-tycoon/game-engine'; -import type { TickNotification } from '@ai-tycoon/game-engine'; +import type { GameState } from '@token-empire/shared'; +import { processTick, setAchievementDefinitions, ACHIEVEMENT_DEFINITIONS, resetResearchBonusCache, resetFleetCache } from '@token-empire/game-engine'; +import type { TickNotification } from '@token-empire/game-engine'; import type { Strategy, SimulationMetrics } from './strategies/types'; import { collectMetrics } from './analysis/metrics'; import { createInitialState } from './initialState'; diff --git a/packages/game-simulation/src/strategies/greedy.ts b/packages/game-simulation/src/strategies/greedy.ts index fb3c5a3..ad29215 100644 --- a/packages/game-simulation/src/strategies/greedy.ts +++ b/packages/game-simulation/src/strategies/greedy.ts @@ -1,14 +1,14 @@ -import type { GameState, Era, RackSkuId } from '@ai-tycoon/shared'; +import type { GameState, Era, RackSkuId } from '@token-empire/shared'; import { RACK_SKU_CONFIGS, DC_TIER_CONFIGS, COOLING_ORDER, PARAMETER_OPTIONS, DEFAULT_DATA_MIX, MAX_CONCURRENT_TRAINING, PRETRAINING_BASE_TICKS, CLUSTER_COST_CONFIG, LOCATION_CONFIGS, maxComputeRacks, VRAM_REQUIREMENTS_BY_GENERATION, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { canRaiseFunding, getNextFundingRound, getAvailableResearch, TECH_TREE, -} from '@ai-tycoon/game-engine'; +} from '@token-empire/game-engine'; import * as actions from '../actions'; import type { Strategy, SimulationMetrics } from './types'; diff --git a/packages/game-simulation/src/strategies/persona.ts b/packages/game-simulation/src/strategies/persona.ts index c4e4155..77ef8bf 100644 --- a/packages/game-simulation/src/strategies/persona.ts +++ b/packages/game-simulation/src/strategies/persona.ts @@ -1,14 +1,14 @@ -import type { GameState, Era, RackSkuId } from '@ai-tycoon/shared'; +import type { GameState, Era, RackSkuId } from '@token-empire/shared'; import { RACK_SKU_CONFIGS, DC_TIER_CONFIGS, COOLING_ORDER, PARAMETER_OPTIONS, DEFAULT_DATA_MIX, MAX_CONCURRENT_TRAINING, PRETRAINING_BASE_TICKS, CLUSTER_COST_CONFIG, LOCATION_CONFIGS, maxComputeRacks, VRAM_REQUIREMENTS_BY_GENERATION, -} from '@ai-tycoon/shared'; +} from '@token-empire/shared'; import { canRaiseFunding, getNextFundingRound, getAvailableResearch, TECH_TREE, -} from '@ai-tycoon/game-engine'; +} from '@token-empire/game-engine'; import * as actions from '../actions'; import type { Strategy, SimulationMetrics } from './types'; diff --git a/packages/game-simulation/src/strategies/random.ts b/packages/game-simulation/src/strategies/random.ts index e13640d..ede8817 100644 --- a/packages/game-simulation/src/strategies/random.ts +++ b/packages/game-simulation/src/strategies/random.ts @@ -1,6 +1,6 @@ -import type { GameState } from '@ai-tycoon/shared'; -import { RACK_SKU_CONFIGS, DEFAULT_DATA_MIX, PARAMETER_OPTIONS } from '@ai-tycoon/shared'; -import { canRaiseFunding, getNextFundingRound, getAvailableResearch } from '@ai-tycoon/game-engine'; +import type { GameState } from '@token-empire/shared'; +import { RACK_SKU_CONFIGS, DEFAULT_DATA_MIX, PARAMETER_OPTIONS } from '@token-empire/shared'; +import { canRaiseFunding, getNextFundingRound, getAvailableResearch } from '@token-empire/game-engine'; import * as actions from '../actions'; import type { Strategy, SimulationMetrics } from './types'; diff --git a/packages/game-simulation/src/strategies/types.ts b/packages/game-simulation/src/strategies/types.ts index d7e7a01..7ada662 100644 --- a/packages/game-simulation/src/strategies/types.ts +++ b/packages/game-simulation/src/strategies/types.ts @@ -1,4 +1,4 @@ -import type { GameState } from '@ai-tycoon/shared'; +import type { GameState } from '@token-empire/shared'; export interface SimulationMetrics { tick: number; diff --git a/packages/game-simulation/tsconfig.json b/packages/game-simulation/tsconfig.json index 07fbfa6..44cee7e 100644 --- a/packages/game-simulation/tsconfig.json +++ b/packages/game-simulation/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@ai-tycoon/tsconfig/node.json", + "extends": "@token-empire/tsconfig/node.json", "compilerOptions": { "outDir": "dist", "rootDir": "src" diff --git a/packages/shared/package.json b/packages/shared/package.json index 5df0494..198f7ce 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,5 +1,5 @@ { - "name": "@ai-tycoon/shared", + "name": "@token-empire/shared", "private": true, "version": "0.0.1", "type": "module", @@ -11,7 +11,7 @@ "test": "vitest run" }, "devDependencies": { - "@ai-tycoon/tsconfig": "workspace:*", + "@token-empire/tsconfig": "workspace:*", "typescript": "^5.8.0" } } diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json index 5664219..b660e9b 100644 --- a/packages/shared/tsconfig.json +++ b/packages/shared/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@ai-tycoon/tsconfig/base.json", + "extends": "@token-empire/tsconfig/base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src" diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json index dcf270f..d5fb8ae 100644 --- a/packages/tsconfig/package.json +++ b/packages/tsconfig/package.json @@ -1,5 +1,5 @@ { - "name": "@ai-tycoon/tsconfig", + "name": "@token-empire/tsconfig", "private": true, "files": ["base.json", "react.json", "node.json"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1498425..9a9816d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,12 +20,12 @@ importers: apps/server: dependencies: - '@ai-tycoon/shared': - specifier: workspace:* - version: link:../../packages/shared '@hono/node-server': specifier: ^1.13.8 version: 1.19.14(hono@4.12.15) + '@token-empire/shared': + specifier: workspace:* + version: link:../../packages/shared bcryptjs: specifier: ^3.0.3 version: 3.0.3 @@ -45,7 +45,7 @@ importers: specifier: ^11.1.0 version: 11.1.0 devDependencies: - '@ai-tycoon/tsconfig': + '@token-empire/tsconfig': specifier: workspace:* version: link:../../packages/tsconfig '@types/node': @@ -60,10 +60,10 @@ importers: apps/web: dependencies: - '@ai-tycoon/game-engine': + '@token-empire/game-engine': specifier: workspace:* version: link:../../packages/game-engine - '@ai-tycoon/shared': + '@token-empire/shared': specifier: workspace:* version: link:../../packages/shared lucide-react: @@ -82,7 +82,7 @@ importers: specifier: ^5.0.0 version: 5.0.12(@types/react@19.2.14)(react@19.2.5) devDependencies: - '@ai-tycoon/tsconfig': + '@token-empire/tsconfig': specifier: workspace:* version: link:../../packages/tsconfig '@types/react': @@ -112,11 +112,11 @@ importers: packages/game-engine: dependencies: - '@ai-tycoon/shared': + '@token-empire/shared': specifier: workspace:* version: link:../shared devDependencies: - '@ai-tycoon/tsconfig': + '@token-empire/tsconfig': specifier: workspace:* version: link:../tsconfig typescript: @@ -125,14 +125,14 @@ importers: packages/game-simulation: dependencies: - '@ai-tycoon/game-engine': + '@token-empire/game-engine': specifier: workspace:* version: link:../game-engine - '@ai-tycoon/shared': + '@token-empire/shared': specifier: workspace:* version: link:../shared devDependencies: - '@ai-tycoon/tsconfig': + '@token-empire/tsconfig': specifier: workspace:* version: link:../tsconfig '@types/node': @@ -147,7 +147,7 @@ importers: packages/shared: devDependencies: - '@ai-tycoon/tsconfig': + '@token-empire/tsconfig': specifier: workspace:* version: link:../tsconfig typescript: