diff --git a/apps/frontend/src/app/app.tsx b/apps/frontend/src/app/app.tsx
index e3d90e7..e1023c2 100644
--- a/apps/frontend/src/app/app.tsx
+++ b/apps/frontend/src/app/app.tsx
@@ -1,14 +1,16 @@
import { createEffect, createMemo } from "solid-js";
import { Router, Route, useNavigate, useSearchParams } from "@solidjs/router";
-import { games } from "@/features/games/registry";
-import { getHomeGamePath } from "@/features/games/utils";
+
+import Layout from "@/app/layout";
import AboutPage from "@/app/pages/about";
import AdminPage from "@/app/pages/admin";
import HomePage from "@/app/pages/home";
-import Layout from "@/app/layout";
import LeaderboardPage from "@/app/pages/leaderboard";
import ProfilePage from "@/app/pages/profile";
-import type { GameId } from "@/features/games/types";
+
+import { games } from "@/features/games/core/registry";
+import { getHomeGamePath } from "@/features/games/core/utils";
+import type { GameId } from "@/features/games/core/types";
import type { WordBankId } from "@/features/content/word-banks/types";
function App() {
diff --git a/apps/frontend/src/app/pages/home.tsx b/apps/frontend/src/app/pages/home.tsx
index cae0271..b17ea5e 100644
--- a/apps/frontend/src/app/pages/home.tsx
+++ b/apps/frontend/src/app/pages/home.tsx
@@ -1,10 +1,10 @@
import { createMemo } from "solid-js";
import { Dynamic } from "solid-js/web";
-import GameSelector from "@/features/games/components/game-selector";
+import { GameCards } from "@/features/games/core/components/GameCards";
import { FeedbackFeed } from "@/features/feedback/components/feedback-feed";
-import { games } from "@/features/games/registry";
-import type { GameId } from "@/features/games/types";
+import { games } from "@/features/games/core/registry";
+import type { GameId } from "@/features/games/core/types";
import type { WordBankId } from "@/features/content/word-banks/types";
type HomeProps = {
@@ -23,7 +23,7 @@ function HomePage(props: HomeProps) {
{!props.selectedGameId && (
<>
-
diff --git a/apps/frontend/src/app/pages/leaderboard.tsx b/apps/frontend/src/app/pages/leaderboard.tsx
index a9845e4..d892af7 100644
--- a/apps/frontend/src/app/pages/leaderboard.tsx
+++ b/apps/frontend/src/app/pages/leaderboard.tsx
@@ -1,16 +1,16 @@
import { For, createSignal } from "solid-js";
-import { gameRegistry } from "@/features/games/registry";
+import { gameRegistry } from "@/features/games/core/registry";
import type { LeaderboardDifficulty } from "@/features/leaderboard/types";
import { LeaderboardTable } from "@/features/leaderboard/components/leaderboard-table";
-import { getGameName } from "@/features/games/utils";
-import type { GameId } from "@/features/games/types";
+import { getGameName } from "@/features/games/core/utils";
+import type { GameId } from "@/features/games/core/types";
const difficulties: LeaderboardDifficulty[] = ["easy", "medium", "hard"];
function LeaderboardPage() {
const [gameId, setGameId] = createSignal(
- gameRegistry[0]?.id ?? "falling-words",
+ gameRegistry[0]?.id ?? "survival",
);
const [difficulty, setDifficulty] =
diff --git a/apps/frontend/src/features/commandline/registry.ts b/apps/frontend/src/features/commandline/registry.ts
index 2579e77..8b67c69 100644
--- a/apps/frontend/src/features/commandline/registry.ts
+++ b/apps/frontend/src/features/commandline/registry.ts
@@ -1,18 +1,20 @@
import { useNavigate, useLocation, useSearchParams } from "@solidjs/router";
-import { themes } from "@/features/content/themes/registry";
+
import { wordBanks } from "@/features/content/word-banks/registry";
import type { WordBankId } from "@/features/content/word-banks/types";
-import { gameRegistry } from "@/features/games/registry";
-import { getHomeGamePath } from "@/features/games/utils";
-import type { ThemeName } from "@/features/content/themes/types";
-import type {
- CommandlineItem,
- CommandlineScope,
-} from "@/features/commandline/types";
-import type { GameId } from "@/features/games/types";
+
+import { gameRegistry } from "@/features/games/core/registry";
+import { getHomeGamePath } from "@/features/games/core/utils";
+import type { GameId } from "@/features/games/core/types";
+
+import { themes } from "@/features/content/themes/registry";
import { themeManager } from "@/features/content/themes/manager";
+import type { ThemeName } from "@/features/content/themes/types";
+
import { useAuthSession } from "@/features/auth/hooks";
+import type { CommandlineItem, CommandlineScope } from "./types.ts";
+
export function createCommandlineRegistry(
setScope: (scope: CommandlineScope) => void,
): Record {
diff --git a/apps/frontend/src/features/games/components/game-input.tsx b/apps/frontend/src/features/games/components/game-input.tsx
deleted file mode 100644
index fb842d7..0000000
--- a/apps/frontend/src/features/games/components/game-input.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-export type GameInputProps = {
- ref: (el: HTMLInputElement) => void;
- value: string;
- onInput: (e: InputEvent & { currentTarget: HTMLInputElement }) => void;
- onKeyDown: (e: KeyboardEvent & { currentTarget: HTMLInputElement }) => void;
-};
-
-export function GameInput(props: GameInputProps) {
- return (
-
- );
-}
diff --git a/apps/frontend/src/features/games/components/game-selector.tsx b/apps/frontend/src/features/games/components/game-selector.tsx
deleted file mode 100644
index 43adc5d..0000000
--- a/apps/frontend/src/features/games/components/game-selector.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import { For } from "solid-js";
-import { gameRegistry } from "@/features/games/registry";
-import type { GameId } from "@/features/games/types";
-import { GameCard } from "./game-card";
-
-type GameSelectorProps = {
- activeGameId?: GameId | null;
- onSelectGame: (gameId: GameId) => void;
-};
-
-function GameSelector(props: GameSelectorProps) {
- return (
-
- );
-}
-
-export default GameSelector;
-// TODO: merge game card and game selector to one Game Cards ig
diff --git a/apps/frontend/src/features/games/components/difficulty-selector.tsx b/apps/frontend/src/features/games/core/components/DifficultySelector.tsx
similarity index 95%
rename from apps/frontend/src/features/games/components/difficulty-selector.tsx
rename to apps/frontend/src/features/games/core/components/DifficultySelector.tsx
index 2d4dc7f..57bf51d 100644
--- a/apps/frontend/src/features/games/components/difficulty-selector.tsx
+++ b/apps/frontend/src/features/games/core/components/DifficultySelector.tsx
@@ -30,5 +30,3 @@ export function DifficultySelector(
);
}
-
-//TODO: rename to mode selector instead
diff --git a/apps/frontend/src/features/games/components/game-card.tsx b/apps/frontend/src/features/games/core/components/GameCards.tsx
similarity index 58%
rename from apps/frontend/src/features/games/components/game-card.tsx
rename to apps/frontend/src/features/games/core/components/GameCards.tsx
index 0b610f5..ce59cb5 100644
--- a/apps/frontend/src/features/games/components/game-card.tsx
+++ b/apps/frontend/src/features/games/core/components/GameCards.tsx
@@ -1,5 +1,8 @@
+import { For } from "solid-js";
import { ArrowRight } from "lucide-solid";
-import type { GameId } from "@/features/games/types";
+
+import { gameRegistry } from "@/features/games/core/registry";
+import type { GameId } from "@/features/games/core/types";
type GameCardProps = {
name: string;
@@ -30,3 +33,25 @@ export function GameCard(props: GameCardProps) {
);
}
+
+type GameCardsProps = {
+ activeGameId?: GameId | null;
+ onSelectGame: (gameId: GameId) => void;
+};
+
+export function GameCards(props: GameCardsProps) {
+ return (
+