From 04e58513878c093d186e7e01dc2e127b74d5bb18 Mon Sep 17 00:00:00 2001 From: syntaxbullet Date: Sat, 14 Feb 2026 11:37:40 +0100 Subject: [PATCH] refactor: rename web/ to api/ to better reflect its purpose MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The web/ folder contains the REST API, WebSocket server, and OAuth routes — not a web frontend. Renaming to api/ clarifies this distinction since the actual web frontend lives in panel/. Co-Authored-By: Claude Opus 4.6 --- Dockerfile | 2 +- {web => api}/.gitignore | 0 {web => api}/README.md | 0 {web => api}/bun-env.d.ts | 0 {web => api}/bunfig.toml | 0 {web => api}/src/routes/actions.routes.ts | 0 {web => api}/src/routes/assets.routes.ts | 0 {web => api}/src/routes/auth.routes.ts | 0 {web => api}/src/routes/classes.routes.ts | 0 {web => api}/src/routes/guild-settings.routes.ts | 0 {web => api}/src/routes/health.routes.ts | 0 {web => api}/src/routes/index.ts | 0 {web => api}/src/routes/items.routes.ts | 0 {web => api}/src/routes/lootdrops.routes.ts | 0 {web => api}/src/routes/moderation.routes.ts | 0 {web => api}/src/routes/quests.routes.ts | 0 {web => api}/src/routes/schemas.ts | 0 {web => api}/src/routes/settings.routes.ts | 0 {web => api}/src/routes/stats.helper.ts | 0 {web => api}/src/routes/stats.routes.ts | 0 {web => api}/src/routes/transactions.routes.ts | 0 {web => api}/src/routes/types.ts | 0 {web => api}/src/routes/users.routes.ts | 0 {web => api}/src/routes/utils.ts | 0 {web => api}/src/server.items.test.ts | 0 {web => api}/src/server.settings.test.ts | 0 {web => api}/src/server.test.ts | 0 {web => api}/src/server.ts | 0 {web => api}/tsconfig.json | 0 bot/index.ts | 4 ++-- tsconfig.json | 2 +- 31 files changed, 4 insertions(+), 4 deletions(-) rename {web => api}/.gitignore (100%) rename {web => api}/README.md (100%) rename {web => api}/bun-env.d.ts (100%) rename {web => api}/bunfig.toml (100%) rename {web => api}/src/routes/actions.routes.ts (100%) rename {web => api}/src/routes/assets.routes.ts (100%) rename {web => api}/src/routes/auth.routes.ts (100%) rename {web => api}/src/routes/classes.routes.ts (100%) rename {web => api}/src/routes/guild-settings.routes.ts (100%) rename {web => api}/src/routes/health.routes.ts (100%) rename {web => api}/src/routes/index.ts (100%) rename {web => api}/src/routes/items.routes.ts (100%) rename {web => api}/src/routes/lootdrops.routes.ts (100%) rename {web => api}/src/routes/moderation.routes.ts (100%) rename {web => api}/src/routes/quests.routes.ts (100%) rename {web => api}/src/routes/schemas.ts (100%) rename {web => api}/src/routes/settings.routes.ts (100%) rename {web => api}/src/routes/stats.helper.ts (100%) rename {web => api}/src/routes/stats.routes.ts (100%) rename {web => api}/src/routes/transactions.routes.ts (100%) rename {web => api}/src/routes/types.ts (100%) rename {web => api}/src/routes/users.routes.ts (100%) rename {web => api}/src/routes/utils.ts (100%) rename {web => api}/src/server.items.test.ts (100%) rename {web => api}/src/server.settings.test.ts (100%) rename {web => api}/src/server.test.ts (100%) rename {web => api}/src/server.ts (100%) rename {web => api}/tsconfig.json (100%) diff --git a/Dockerfile b/Dockerfile index 4a6d022..9dea87d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,7 +55,7 @@ WORKDIR /app # Copy only what's needed for production COPY --from=builder --chown=bun:bun /app/node_modules ./node_modules -COPY --from=builder --chown=bun:bun /app/web/src ./web/src +COPY --from=builder --chown=bun:bun /app/api/src ./api/src COPY --from=builder --chown=bun:bun /app/bot ./bot COPY --from=builder --chown=bun:bun /app/shared ./shared COPY --from=builder --chown=bun:bun /app/panel/dist ./panel/dist diff --git a/web/.gitignore b/api/.gitignore similarity index 100% rename from web/.gitignore rename to api/.gitignore diff --git a/web/README.md b/api/README.md similarity index 100% rename from web/README.md rename to api/README.md diff --git a/web/bun-env.d.ts b/api/bun-env.d.ts similarity index 100% rename from web/bun-env.d.ts rename to api/bun-env.d.ts diff --git a/web/bunfig.toml b/api/bunfig.toml similarity index 100% rename from web/bunfig.toml rename to api/bunfig.toml diff --git a/web/src/routes/actions.routes.ts b/api/src/routes/actions.routes.ts similarity index 100% rename from web/src/routes/actions.routes.ts rename to api/src/routes/actions.routes.ts diff --git a/web/src/routes/assets.routes.ts b/api/src/routes/assets.routes.ts similarity index 100% rename from web/src/routes/assets.routes.ts rename to api/src/routes/assets.routes.ts diff --git a/web/src/routes/auth.routes.ts b/api/src/routes/auth.routes.ts similarity index 100% rename from web/src/routes/auth.routes.ts rename to api/src/routes/auth.routes.ts diff --git a/web/src/routes/classes.routes.ts b/api/src/routes/classes.routes.ts similarity index 100% rename from web/src/routes/classes.routes.ts rename to api/src/routes/classes.routes.ts diff --git a/web/src/routes/guild-settings.routes.ts b/api/src/routes/guild-settings.routes.ts similarity index 100% rename from web/src/routes/guild-settings.routes.ts rename to api/src/routes/guild-settings.routes.ts diff --git a/web/src/routes/health.routes.ts b/api/src/routes/health.routes.ts similarity index 100% rename from web/src/routes/health.routes.ts rename to api/src/routes/health.routes.ts diff --git a/web/src/routes/index.ts b/api/src/routes/index.ts similarity index 100% rename from web/src/routes/index.ts rename to api/src/routes/index.ts diff --git a/web/src/routes/items.routes.ts b/api/src/routes/items.routes.ts similarity index 100% rename from web/src/routes/items.routes.ts rename to api/src/routes/items.routes.ts diff --git a/web/src/routes/lootdrops.routes.ts b/api/src/routes/lootdrops.routes.ts similarity index 100% rename from web/src/routes/lootdrops.routes.ts rename to api/src/routes/lootdrops.routes.ts diff --git a/web/src/routes/moderation.routes.ts b/api/src/routes/moderation.routes.ts similarity index 100% rename from web/src/routes/moderation.routes.ts rename to api/src/routes/moderation.routes.ts diff --git a/web/src/routes/quests.routes.ts b/api/src/routes/quests.routes.ts similarity index 100% rename from web/src/routes/quests.routes.ts rename to api/src/routes/quests.routes.ts diff --git a/web/src/routes/schemas.ts b/api/src/routes/schemas.ts similarity index 100% rename from web/src/routes/schemas.ts rename to api/src/routes/schemas.ts diff --git a/web/src/routes/settings.routes.ts b/api/src/routes/settings.routes.ts similarity index 100% rename from web/src/routes/settings.routes.ts rename to api/src/routes/settings.routes.ts diff --git a/web/src/routes/stats.helper.ts b/api/src/routes/stats.helper.ts similarity index 100% rename from web/src/routes/stats.helper.ts rename to api/src/routes/stats.helper.ts diff --git a/web/src/routes/stats.routes.ts b/api/src/routes/stats.routes.ts similarity index 100% rename from web/src/routes/stats.routes.ts rename to api/src/routes/stats.routes.ts diff --git a/web/src/routes/transactions.routes.ts b/api/src/routes/transactions.routes.ts similarity index 100% rename from web/src/routes/transactions.routes.ts rename to api/src/routes/transactions.routes.ts diff --git a/web/src/routes/types.ts b/api/src/routes/types.ts similarity index 100% rename from web/src/routes/types.ts rename to api/src/routes/types.ts diff --git a/web/src/routes/users.routes.ts b/api/src/routes/users.routes.ts similarity index 100% rename from web/src/routes/users.routes.ts rename to api/src/routes/users.routes.ts diff --git a/web/src/routes/utils.ts b/api/src/routes/utils.ts similarity index 100% rename from web/src/routes/utils.ts rename to api/src/routes/utils.ts diff --git a/web/src/server.items.test.ts b/api/src/server.items.test.ts similarity index 100% rename from web/src/server.items.test.ts rename to api/src/server.items.test.ts diff --git a/web/src/server.settings.test.ts b/api/src/server.settings.test.ts similarity index 100% rename from web/src/server.settings.test.ts rename to api/src/server.settings.test.ts diff --git a/web/src/server.test.ts b/api/src/server.test.ts similarity index 100% rename from web/src/server.test.ts rename to api/src/server.test.ts diff --git a/web/src/server.ts b/api/src/server.ts similarity index 100% rename from web/src/server.ts rename to api/src/server.ts diff --git a/web/tsconfig.json b/api/tsconfig.json similarity index 100% rename from web/tsconfig.json rename to api/tsconfig.json diff --git a/bot/index.ts b/bot/index.ts index f9be0b9..744b0b2 100644 --- a/bot/index.ts +++ b/bot/index.ts @@ -3,7 +3,7 @@ import { env } from "@shared/lib/env"; import { join } from "node:path"; import { initializeConfig } from "@shared/lib/config"; -import { startWebServerFromRoot } from "../web/src/server"; +import { startWebServerFromRoot } from "../api/src/server"; // Initialize config from database await initializeConfig(); @@ -18,7 +18,7 @@ console.log("🌐 Starting web server..."); let shuttingDown = false; -const webProjectPath = join(import.meta.dir, "../web"); +const webProjectPath = join(import.meta.dir, "../api"); const webPort = Number(process.env.WEB_PORT) || 3000; const webHost = process.env.HOST || "0.0.0.0"; diff --git a/tsconfig.json b/tsconfig.json index e4570b6..eee9923 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -50,7 +50,7 @@ }, "exclude": [ "node_modules", - "web", + "api", "dist", "drizzle" ]