Phase 0: monorepo skeleton (hub, live-map, api, packages, infra, CI)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "next/core-web-vitals"
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
@@ -0,0 +1,10 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
transpilePackages: ['@kerbal-rt/shared-types', '@kerbal-rt/ui', '@kerbal-rt/orbital-math'],
|
||||
env: {
|
||||
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL ?? 'http://localhost:4000',
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "@kerbal-rt/hub",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"description": "Marketing/operations hub: mission calendar, crew, media, Spacenomicon",
|
||||
"scripts": {
|
||||
"dev": "next dev --port 3000",
|
||||
"build": "next build",
|
||||
"start": "next start --port 3000",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"lint": "next lint",
|
||||
"test": "echo 'no tests yet'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kerbal-rt/shared-types": "workspace:*",
|
||||
"@kerbal-rt/ui": "workspace:*",
|
||||
"next": "^14.2.13",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.5.0",
|
||||
"@types/react": "^18.3.5",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-next": "^14.2.13",
|
||||
"typescript": "^5.6.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
:root {
|
||||
--background: #0a0a0f;
|
||||
--foreground: #e6e6ee;
|
||||
--card-bg: rgba(255, 255, 255, 0.03);
|
||||
--card-border: #2a2a3a;
|
||||
--pill-neutral: #4a4a5a;
|
||||
--pill-success: #2c5;
|
||||
--pill-warn: #fa3;
|
||||
--pill-danger: #e44;
|
||||
--link: #6cf;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
--background: #fafafa;
|
||||
--foreground: #1a1a1a;
|
||||
--card-bg: rgba(0, 0, 0, 0.02);
|
||||
--card-border: #d8d8d8;
|
||||
--pill-neutral: #aaa;
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: var(--background);
|
||||
color: var(--foreground);
|
||||
font-family:
|
||||
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
line-height: 1.5;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
code {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
padding: 0.1em 0.3em;
|
||||
border-radius: 3px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import './globals.css';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
export const metadata = {
|
||||
title: 'Kerbal RT — Real-time KSP server',
|
||||
description: 'A no-warp Kerbal Space Program multiplayer server, mirrored to the web in real time.',
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import { Card, Pill } from '@kerbal-rt/ui';
|
||||
|
||||
export default function HomePage() {
|
||||
return (
|
||||
<main style={{ maxWidth: 960, margin: '0 auto', padding: '2rem 1rem' }}>
|
||||
<header style={{ display: 'flex', alignItems: 'center', gap: '0.75rem', marginBottom: '1.5rem' }}>
|
||||
<h1 style={{ fontSize: '1.75rem', margin: 0 }}>Kerbal RT</h1>
|
||||
<Pill tone="success">Phase 0 — skeleton</Pill>
|
||||
</header>
|
||||
|
||||
<Card title="Status">
|
||||
<p>Monorepo skeleton is up. The hub, live-map, and API apps all build and dev-serve.</p>
|
||||
<p>
|
||||
Edit <code>src/app/page.tsx</code> in <code>apps/hub</code> and refresh.
|
||||
</p>
|
||||
</Card>
|
||||
|
||||
<div style={{ height: '1rem' }} />
|
||||
|
||||
<Card title="Quick links">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/live-map">Live map</a> (scaffolded in the same Vite app)
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://localhost:4000/health" target="_blank" rel="noreferrer">
|
||||
API health
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com" target="_blank" rel="noreferrer">
|
||||
Repo
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</Card>
|
||||
|
||||
<div style={{ height: '1rem' }} />
|
||||
|
||||
<Card title="Phases">
|
||||
<ol>
|
||||
<li>
|
||||
<strong>Phase 0 (this):</strong> monorepo, skeletons, docker-compose, CI.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Phase 1:</strong> KSP telemetry bridge + ingest pipeline.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Phase 2:</strong> Live map 3D scene with time controls.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Phase 3:</strong> Mission calendar, media, crew, YouTube/Twitch embeds.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Phase 4:</strong> Spacenomicon tools.
|
||||
</li>
|
||||
</ol>
|
||||
</Card>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
||||
"jsx": "preserve",
|
||||
"noEmit": true,
|
||||
"incremental": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"plugins": [{ "name": "next" }]
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user