Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions public/llms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Runestone

Runestone is a playable statechart explainer for software engineers. It maps a
five-room 3D dungeon to an executable XState machine and displays the active
state, transitions, guards, context, and actors while the user plays.

## Primary pages

- [Runestone](https://runestone.teeldinho.com/): Product explanation, concepts,
controls, and entry to the run.
- [Source](https://github.com/Teeldinho/runestone): Implementation and project
documentation.
24 changes: 8 additions & 16 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
{
"short_name": "TanStack App",
"name": "Create TanStack App Sample",
"short_name": "Runestone",
"name": "Runestone — A Playable Statechart Dungeon",
"description": "A five-room 3D dungeon that makes statechart execution visible while you play.",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
"src": "/runestone-mark.svg",
"type": "image/svg+xml",
"sizes": "any",
"purpose": "any"
}
],
"start_url": ".",
"start_url": "/",
"display": "standalone",
"theme_color": "#020308",
"background_color": "#06080f"
Expand Down
Binary file removed public/marketing/game-running-bg.png
Binary file not shown.
Binary file added public/marketing/game-running-bg.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
Sitemap: https://runestone.teeldinho.com/sitemap.xml
6 changes: 6 additions & 0 deletions public/runestone-mark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://runestone.teeldinho.com/</loc>
</url>
</urlset>
10 changes: 1 addition & 9 deletions src/app/providers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import type { ReactNode } from "react";
import { AuthProvider } from "@/features/auth";
import { TooltipProvider } from "@/shared/ui";

import { AudioProvider } from "./AudioProvider";
import { ConvexProvider } from "./ConvexProvider";
import { GameMachineProvider } from "./GameMachineProvider";

type AppProvidersProps = {
children: ReactNode;
Expand All @@ -15,14 +13,8 @@ export function AppProviders({ children }: AppProvidersProps) {
return (
<ConvexProvider>
<AuthProvider>
<GameMachineProvider>
<AudioProvider>
<TooltipProvider>{children}</TooltipProvider>
</AudioProvider>
</GameMachineProvider>
<TooltipProvider>{children}</TooltipProvider>
</AuthProvider>
</ConvexProvider>
);
}

export { AudioProvider, ConvexProvider, GameMachineProvider };
13 changes: 13 additions & 0 deletions src/app/routes/-GameRouteContent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { AudioProvider } from "@/app/providers/AudioProvider";
import { GameMachineProvider } from "@/app/providers/GameMachineProvider";
import { GamePage } from "@/pages/game";

export function GameRouteContent() {
return (
<GameMachineProvider>
<AudioProvider>
<GamePage />
</AudioProvider>
</GameMachineProvider>
);
}
30 changes: 28 additions & 2 deletions src/app/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,36 @@ export const Route = createRootRoute({
content: "width=device-width, initial-scale=1",
},
{
title: "Runestone",
title: "Runestone — A Playable Statechart Dungeon",
},
{
name: "description",
content:
"Explore a five-room 3D dungeon where rooms are states, corridors are transitions, and locked doors are guards. Watch the live statechart update as you play.",
},
{
property: "og:title",
content: "Runestone — A Playable Statechart Dungeon",
},
{
property: "og:description",
content:
"Walk through executable logic and inspect the statechart that defines the dungeon.",
},
{
property: "og:type",
content: "website",
},
{
name: "twitter:card",
content: "summary",
},
],
links: [
{ rel: "stylesheet", href: appCss },
{ rel: "manifest", href: "/manifest.json" },
{ rel: "icon", href: "/runestone-mark.svg", type: "image/svg+xml" },
],
links: [{ rel: "stylesheet", href: appCss }],
}),
notFoundComponent: NotFoundPage,
shellComponent: RootShell,
Expand Down
12 changes: 8 additions & 4 deletions src/app/routes/_marketing.concepts.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { createFileRoute } from "@tanstack/react-router";

import { ConceptsPage } from "@/pages/concepts";
import { createFileRoute, redirect } from "@tanstack/react-router";

export const Route = createFileRoute("/_marketing/concepts")({
component: ConceptsPage,
beforeLoad: () => {
throw redirect({
to: "/",
hash: "machine",
statusCode: 301,
});
},
});
12 changes: 8 additions & 4 deletions src/app/routes/_marketing.tutorial.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { createFileRoute } from "@tanstack/react-router";

import { TutorialPage } from "@/pages/tutorial";
import { createFileRoute, redirect } from "@tanstack/react-router";

export const Route = createFileRoute("/_marketing/tutorial")({
component: TutorialPage,
beforeLoad: () => {
throw redirect({
to: "/",
hash: "controls",
statusCode: 301,
});
},
});
8 changes: 5 additions & 3 deletions src/app/routes/game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import { APP_CONFIG } from "../../../app.config";

import { requirePersistedAuthSession } from "./-requirePersistedAuthSession";

const GamePage = lazy(() =>
import("@/pages/game").then((m) => ({ default: m.GamePage })),
const GameRouteContent = lazy(() =>
import("./-GameRouteContent").then((module) => ({
default: module.GameRouteContent,
})),
);

export const Route = createFileRoute("/game")({
Expand All @@ -18,7 +20,7 @@ export const Route = createFileRoute("/game")({
function LazyGamePage() {
return (
<Suspense fallback={null}>
<GamePage />
<GameRouteContent />
</Suspense>
);
}
77 changes: 71 additions & 6 deletions src/app/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");
@import "@fontsource-variable/geist";
@import "tailwindcss";
@import "tw-animate-css";

Expand All @@ -9,7 +9,7 @@

:root {
color-scheme: dark;
font-family: "Space Grotesk", "JetBrains Mono", sans-serif;
font-family: "Geist Variable", sans-serif;
--radius: 0.5rem;
--background: #06080f;
--foreground: #f5f1e6;
Expand Down Expand Up @@ -56,6 +56,16 @@
--dungeon-doorway-gate-emissive: #2f3a45;
}

.marketing-theme {
color-scheme: dark;
--radius: 0.875rem;
--primary: var(--dungeon-gold);
--primary-foreground: var(--base-black);
--accent: var(--dungeon-rune);
--accent-foreground: var(--base-black);
--ring: var(--dungeon-rune);
}

@theme inline {
--radius-sm: max(2px, calc(var(--radius) - 4px));
--radius-md: calc(var(--radius) - 2px);
Expand Down Expand Up @@ -104,6 +114,8 @@
--color-dungeon-corridor-base: var(--dungeon-corridor-base);
--color-dungeon-doorway-gate: var(--dungeon-doorway-gate);
--color-dungeon-doorway-gate-emissive: var(--dungeon-doorway-gate-emissive);
--font-sans: "Geist Variable", sans-serif;
--font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", monospace;
}

* {
Expand All @@ -113,11 +125,64 @@
html,
body {
min-height: 100%;
overflow-x: hidden;
overflow-x: clip;
}

.observatory-backdrop {
background-color: var(--background);
background-image:
radial-gradient(
circle at 82% 8%,
color-mix(in srgb, var(--dungeon-gold) 16%, transparent),
transparent 30rem
),
radial-gradient(
circle at 8% 38%,
color-mix(in srgb, var(--dungeon-rune) 7%, transparent),
transparent 34rem
),
linear-gradient(
180deg,
color-mix(in srgb, var(--card) 38%, transparent),
transparent 26rem
);
}

.observatory-panel::after {
position: absolute;
inset: 0;
pointer-events: none;
content: "";
background: linear-gradient(
115deg,
transparent 0%,
color-mix(in srgb, var(--dungeon-rune) 7%, transparent) 48%,
transparent 70%
);
}

.observatory-active-room {
animation: observatory-trace 2.8s ease-in-out infinite;
}

@keyframes observatory-trace {
0%,
100% {
box-shadow:
inset 0.2rem 0 0 var(--dungeon-rune),
0 0 0 transparent;
}
50% {
box-shadow:
inset 0.3rem 0 0 var(--dungeon-rune),
0 0 1.5rem color-mix(in srgb, var(--dungeon-rune) 10%, transparent);
}
}

html {
scrollbar-gutter: stable;
scroll-behavior: smooth;
scroll-padding-top: 6rem;
}

body {
Expand Down Expand Up @@ -147,7 +212,7 @@ body {
}

.rune-text {
font-family: "Space Grotesk", sans-serif;
font-family: "Geist Variable", sans-serif;
letter-spacing: 0.08em;
text-transform: uppercase;
font-size: 0.65rem;
Expand All @@ -156,7 +221,7 @@ body {
}

.rune-value {
font-family: "JetBrains Mono", monospace;
font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", monospace;
font-size: 0.85rem;
color: var(--foreground);
}
Expand All @@ -167,7 +232,7 @@ body {
gap: 0.5rem;
padding: 0.375rem 0.75rem;
font-size: 0.8rem;
font-family: "Space Grotesk", sans-serif;
font-family: "Geist Variable", sans-serif;
font-weight: 500;
border-radius: var(--radius-sm);
border: 1px solid var(--panel-border);
Expand Down
16 changes: 8 additions & 8 deletions src/features/auth/config/authConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ export const AUTH_ERROR_MESSAGES = {
export const AUTH_BOOTSTRAP_TIMEOUT_MS = 10_000;

export const AUTH_COPY = {
MODAL_TITLE: "Enter the dungeon",
MODAL_TITLE: "Name this run",
MODAL_DESCRIPTION:
"Use the suggested name or edit it before saving your progress and leaderboard entry.",
MODAL_KEEP_READING_LABEL: "Keep reading",
USERNAME_LABEL: "Name",
USERNAME_PLACEHOLDER: "Your name",
USERNAME_SUBMIT_LABEL: "Enter the dungeon",
USERNAME_SUBMITTING_LABEL: "Opening the gate...",
"This name is stored in this browser and attached to completed runs on the leaderboard.",
MODAL_KEEP_READING_LABEL: "Return to the machine reference",
USERNAME_LABEL: "Run name",
USERNAME_PLACEHOLDER: "Display name",
USERNAME_SUBMIT_LABEL: "Enter Floor I",
USERNAME_SUBMITTING_LABEL: "Opening Floor I...",
USERNAME_HELP_TEXT:
"A suggested name is ready. 3-20 letters, numbers, or underscores.",
USERNAME_VALIDATION_ERROR: "Use 3-20 letters, numbers, or underscores.",
READY_STATUS_PREFIX: "Signed in as",
READY_STATUS_PREFIX: "Playing as",
} as const;

export const AUTH_ROUTE_PATHS = {
Expand Down
Loading
Loading