diff --git a/e2e/admin.spec.ts b/e2e/admin.spec.ts deleted file mode 100644 index 7197950d01..0000000000 --- a/e2e/admin.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { expect, test } from "@playwright/test"; - -test.describe("Admin panel", () => { - test("admin login page redirects unauthenticated users", async ({ page }) => { - await page.goto("/admin"); - await expect(page).toHaveURL(/login/); - }); - - test("admin page has login form", async ({ page }) => { - await page.goto("/admin"); - await expect(page.locator('input[name="username"]')).toBeVisible(); - await expect(page.locator('input[name="password"]')).toBeVisible(); - }); -}); diff --git a/e2e/auth.spec.ts b/e2e/auth.spec.ts deleted file mode 100644 index 7c9b00b951..0000000000 --- a/e2e/auth.spec.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { expect, test } from "@playwright/test"; - -test.describe("Authentication flows", () => { - test("login form validates required fields", async ({ page }) => { - await page.goto("/login"); - await page.click('button[type="submit"]'); - await expect(page.locator("text=required")).toBeVisible({ timeout: 5000 }); - }); - - test("login with invalid credentials shows error", async ({ page }) => { - await page.goto("/login"); - await page.fill('input[name="username"]', "nonexistent"); - await page.fill('input[name="password"]', "wrongpassword"); - await page.click('button[type="submit"]'); - await expect(page.locator("text=invalid")).toBeVisible({ timeout: 5000 }); - }); - - test("register page has password confirmation field", async ({ page }) => { - await page.goto("/register"); - await expect(page.locator('input[name="confirmPassword"]')).toBeVisible(); - }); - - test("register form validates password match", async ({ page }) => { - await page.goto("/register"); - await page.fill('input[name="password"]', "Password123!"); - await page.fill('input[name="confirmPassword"]', "DifferentPass123!"); - await page.click('button[type="submit"]'); - await expect(page.locator("text=match|komen overeen|kloppen")).toBeVisible({ - timeout: 5000, - }); - }); -}); diff --git a/e2e/example.spec.ts b/e2e/example.spec.ts deleted file mode 100644 index ca4dfcc63f..0000000000 --- a/e2e/example.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { expect, test } from "@playwright/test"; - -test("homepage has title", async ({ page }) => { - await page.goto("/"); - await expect(page).toHaveTitle(/Magic Hotel|Atom/i); -}); - -test("register page loads", async ({ page }) => { - await page.goto("/register"); - await expect(page).toHaveTitle(/registreer|register|konto/i); -}); - -test("login page loads", async ({ page }) => { - await page.goto("/login"); - await expect(page).toHaveTitle(/inloggen|login/i); -}); diff --git a/e2e/navigation.spec.ts b/e2e/navigation.spec.ts deleted file mode 100644 index 1402064a00..0000000000 --- a/e2e/navigation.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { expect, test } from "@playwright/test"; - -test.describe("Public navigation", () => { - test("homepage loads with expected elements", async ({ page }) => { - await page.goto("/"); - await expect(page.locator("nav")).toBeVisible(); - await expect(page.locator("footer")).toBeVisible(); - }); - - test("community page loads", async ({ page }) => { - await page.goto("/community"); - await expect(page).toHaveTitle(/community/i); - }); - - test("shop page loads", async ({ page }) => { - await page.goto("/shop"); - await expect(page.locator("h1, h2").first()).toBeVisible(); - }); - - test("404 page for unknown routes", async ({ page }) => { - const response = await page.goto("/this-page-does-not-exist"); - expect(response?.status()).toBe(404); - }); -}); diff --git a/lighthouserc.cjs b/lighthouserc.cjs deleted file mode 100644 index 469e8885bc..0000000000 --- a/lighthouserc.cjs +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - ci: { - collect: { - url: ["http://localhost:3000"], - numberOfRuns: 3, - }, - assert: { - preset: "lighthouse:no-pwa", - assertions: { - "categories:performance": ["error", { minScore: 0.9 }], - "categories:accessibility": ["error", { minScore: 0.9 }], - "categories:best-practices": ["error", { minScore: 0.9 }], - "categories:seo": ["error", { minScore: 0.8 }], - "first-contentful-paint": ["error", { maxNumericValue: 2000 }], - "largest-contentful-paint": ["error", { maxNumericValue: 2500 }], - "cumulative-layout-shift": ["error", { maxNumericValue: 0.1 }], - }, - }, - }, -}; diff --git a/package.json b/package.json index eb9da800fd..2a30d3f6d2 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,6 @@ "knip": "knip", "analyze": "ANALYZE=true pnpm build", "test": "vitest run", - "test:e2e": "playwright test", - "lhci:collect": "lhci collect", - "lhci:assert": "lhci assert", - "lhci:server": "lhci server", "db:migrate": "tsx scripts/apply-migrations.ts", "db:migrate:status": "tsx scripts/apply-migrations.ts --status", "jobs:worker": "tsx scripts/jobs-worker.ts", @@ -79,9 +75,7 @@ }, "devDependencies": { "@biomejs/biome": "2.5.6", - "@lhci/cli": "^0.15.1", "@next/bundle-analyzer": "^16.2.12", - "@playwright/test": "1.62.0", "@tailwindcss/forms": "^0.5.11", "@tailwindcss/postcss": "^4.3.3", "@tailwindcss/typography": "^0.5.20", diff --git a/playwright.config.ts b/playwright.config.ts deleted file mode 100644 index d6aa5f0495..0000000000 --- a/playwright.config.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { defineConfig, devices } from "@playwright/test"; - -export default defineConfig({ - testDir: "./e2e", - fullyParallel: true, - forbidOnly: !!process.env.CI, - retries: process.env.CI ? 2 : 0, - workers: process.env.CI ? 1 : undefined, - reporter: "html", - use: { - baseURL: process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000", - trace: "on-first-retry", - }, - projects: [ - { - name: "chromium", - use: { ...devices["Desktop Chrome"] }, - }, - { - name: "firefox", - use: { ...devices["Desktop Firefox"] }, - }, - { - name: "webkit", - use: { ...devices["Desktop Safari"] }, - }, - ], - webServer: { - command: "pnpm dev", - url: "http://localhost:3000", - reuseExistingServer: !process.env.CI, - }, -}); diff --git a/setup/emulator/config.ini b/setup/emulator/config.ini deleted file mode 100644 index 8730c63eaa..0000000000 --- a/setup/emulator/config.ini +++ /dev/null @@ -1,66 +0,0 @@ -# =========================================================================== -# Polaris Emulator — reference config.ini -# Copy this to /var/www/emulator/Emulator/target/config.ini and fill in the -# values marked CHANGE_ME. The emulator reads this file on startup. -# Full guide: https://github.com/duckietm/Complete-Retro-on-Ubuntu -# =========================================================================== - -# ---- Database configuration ---- -db.hostname=127.0.0.1 -db.port=3306 -db.database=habbo # DB name (shared with the CMS) -db.username=root # Username -db.password=CHANGE_ME # Password -db.params=?characterEncoding=utf8&useSSL=false&serverTimezone=Europe/Amsterdam -db.pool.minsize=25 -db.pool.maxsize=100 -db.pool.connection_timeout_ms=10000 -db.pool.idle_timeout_ms=600000 -db.pool.max_lifetime_ms=1800000 -db.pool.validation_timeout_ms=5000 -db.pool.leak_detection_ms=20000 # set to 0 to disable leak detection - -# ---- Game configuration ---- -# Host IP. Use 0.0.0.0 in most cases. Use 127.0.0.1 for LAN only. -game.host=0.0.0.0 -game.port=3000 - -# ---- RCON configuration ---- -# Leave host at 127.0.0.1 if the CMS runs on the same server as the emulator. -rcon.host=127.0.0.1 -rcon.port=3001 -rcon.allowed=127.0.0.1;127.0.0.2 - -# ---- Nitro secure runtime assets (disabled by default) ---- -nitro.secure.assets.enabled=false -nitro.secure.api.enabled=false -nitro.secure.session_ttl_sec=900 -nitro.secure.config.root= -nitro.secure.gamedata.root= -# Set a persistent secret when using Cloudflare or multiple backend requests. -nitro.secure.master_key=change-me-to-a-long-random-secret - -# ---- Login ---- -login.remember.enabled=true -login.remember.duration.days=30 -# Optional: set a persistent remember-me JWT secret here. -login.remember.jwt.secret= -login.news.limit=5 - -# ---- Secure runtime ECDH session TTL in seconds ---- -# (kept for compatibility; unused when secure assets are disabled) - -# ---- WebSockets (Nitro client) ---- -ws.enabled=true -ws.host=0.0.0.0 -ws.port=2096 -# Header used to obtain the real client IP when behind a proxy -# (usually X-Forwarded-For, or CF-Connecting-IP behind Cloudflare). -ws.ip.header=X-Forwarded-For - -# ---- Console / emulator_settings ---- -# Run these SQL statements ONCE, after importing the emulator database: -# USE habbo; -# UPDATE emulator_settings SET `value` = '0' WHERE `key` = 'console.mode'; -# UPDATE emulator_settings SET `value` = 'MY_DOMAIN.COM,*.MY_DOMAIN.COM,localhost,127.0.0.1' WHERE `key` = 'websockets.whitelist'; -# console.mode MUST be 0 and the whitelist MUST match your domain. diff --git a/setup/emulator/emulator b/setup/emulator/emulator deleted file mode 100755 index 5829085c95..0000000000 --- a/setup/emulator/emulator +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# Launcher for the Polaris emulator. -# Place at /var/www/emulator/Emulator/target/emulator and chmod +x. -# Update the JAR name to match the version built by `mvn clean package`. - -file_name_emulator=emulator.log -current_time=$(date "+%H%M_%d-%m-%Y") -file_name=$file_name_emulator.$current_time - -# Rotate the previous log -mkdir -p /var/log/emu -mv /var/log/emu/emulator.log /var/log/emu/$file_name 2>/dev/null || true - -# -Xmx4096m = 4 GB. 1 GB=1024, 2 GB=2048, 3 GB=3072, 4 GB=4096 -java -Dfile.encoding=UTF8 -Xmx4096m \ - -jar /var/www/emulator/Emulator/target/Habbo-*-jar-with-dependencies.jar \ - >/var/log/emu/emulator.log diff --git a/setup/emulator/emulator.service b/setup/emulator/emulator.service deleted file mode 100644 index 5cfe3de2ba..0000000000 --- a/setup/emulator/emulator.service +++ /dev/null @@ -1,25 +0,0 @@ -[Unit] -Description=Habbo Emulator - -# Make sure the database has started before the emulator can start -After=mariadb.service -Requires=mariadb.service - -# If you want to run as a less privileged account, change User below. -# Make sure that account has the right permissions on the working directory and target folders. -[Service] -User=root - -# Working directory where config.ini and the JAR live -WorkingDirectory=/var/www/emulator/Emulator/target - -# The launcher script we created below. It is a shell wrapper that calls the JAR. -ExecStart=/var/www/emulator/Emulator/target/emulator - -SuccessExitStatus=143 -TimeoutStopSec=10 -Restart=on-failure -RestartSec=5 - -[Install] -WantedBy=multi-user.target diff --git a/setup/nitro/client-mode.json b/setup/nitro/client-mode.json deleted file mode 100644 index 542160d283..0000000000 --- a/setup/nitro/client-mode.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "distObfuscationEnabled": false, - "secureAssetsEnabled": false, - "secureApiEnabled": false, - "apiBaseUrl": "https://MY_DOMAIN:2096", - "plainConfigBaseUrl": "https://MY_DOMAIN/configuration/", - "plainGamedataBaseUrl": "https://MY_DOMAIN/gamedata/" -} diff --git a/setup/nitro/renderer-config.json b/setup/nitro/renderer-config.json deleted file mode 100644 index fe6ef1d288..0000000000 --- a/setup/nitro/renderer-config.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "socket.url": "wss://MY_DOMAIN.COM:2096", - "crypto.ws.enabled": false, - "crypto.ws.signing.enabled": false, - "crypto.ws.signing.public_key": "", - "api.url": "https://MY_DOMAIN.COM:2096", - "asset.url": "https://MY_DOMAIN.COM/gamedata", - "image.library.url": "http://MY_DOMAIN.COM/gamedata/c_images/", - "hof.furni.url": "https://MY_DOMAIN.COM", - "images.url": "${asset.url}/images", - "gamedata.url": "${asset.url}", - "sounds.url": "${asset.url}/sounds/%sample%.mp3", - "external.texts.url": [ - "${gamedata.url}/config/ExternalTexts.json?v=1", - "${gamedata.url}/config/UITexts.json?v=1" - ], - "external.samples.url": "${gamedata.url}/sounds/sound_machine_sample_%sample%.mp3", - "furnidata.url": "${gamedata.url}/config/FurnitureData.json?v=1", - "productdata.url": "${gamedata.url}/config/ProductData.json?v=1", - "avatar.actions.url": "${gamedata.url}/config/HabboAvatarActions.json?v=1", - "avatar.figuredata.url": "${gamedata.url}/config/FigureData.json?v=1", - "avatar.figuremap.url": "${gamedata.url}/config/FigureMap.json?v=1", - "avatar.effectmap.url": "${gamedata.url}/config/EffectMap.json?v=1", - "avatar.asset.url": "${asset.url}/clothes/%libname%.nitro", - "avatar.asset.effect.url": "${asset.url}/effect/%libname%.nitro", - "furni.asset.url": "${asset.url}/furniture/%libname%.nitro", - "furni.asset.icon.url": "http://MY_DOMAIN.COM/gamedata/icons/%libname%%param%_icon.png", - "pet.asset.url": "${asset.url}/pets/%libname%.nitro", - "generic.asset.url": "${asset.url}/bundled/generic/%libname%.nitro", - "room.asset.url": "${asset.url}/room/%libname%/%libname%.json", - "badge.asset.url": "${image.library.url}album1584/%badgename%.gif", - "badge.asset.group.url": "http://MY_DOMAIN.COM/habbo-imaging/badge/%badgedata%", - "badge.asset.group.external.url": "", - "badge.asset.grouparts.url": "https://MY_DOMAIN.COM/gamedata/badgeparts/badgepart_%part%.png", - "furni.rotation.bounce.steps": 20, - "furni.rotation.bounce.height": 0.0625, - "room.color.skip.transition": false, - "enable.avatar.arrow": false, - "system.animation.fps": 60, - "system.limits.fps": false, - "system.dispatcher.log": false, - "system.packet.log": false, - "system.pong.manually": true, - "system.pong.interval.ms": 20000, - "room.color.skip.transition": true, - "user.badges.group.slot.enabled": true, - "timezone.settings": "Europe/Amsterdam", - "login.screen.enabled": true, - "login.endpoint": "${api.url}/api/auth/login", - "login.register.endpoint": "${api.url}/api/auth/register", - "login.forgot.endpoint": "${api.url}/api/auth/forgot-password", - "login.logout.endpoint": "${api.url}/api/auth/logout", - "login.health.endpoint": "${api.url}/api/auth/health", - "login.check-email.endpoint": "${api.url}/api/auth/check-email", - "login.check-username.endpoint": "${api.url}/api/auth/check-username", - "login.room_templates.endpoint": "${api.url}/api/auth/room-templates", - "login.remember.endpoint": "${api.url}/api/auth/remember", - "login.server_key.endpoint": "${api.url}/api/auth/server-key", - "login.sso-token.endpoint": "${api.url}/api/auth/sso-token", - "login.refresh.endpoint": "${api.url}/api/auth/refresh", - "badges.custom.list.endpoint": "${api.url}/api/badges/custom", - "badges.custom.create.endpoint": "${api.url}/api/badges/custom", - "badges.custom.update.endpoint": "${api.url}/api/badges/custom/%badgeId%", - "badges.custom.delete.endpoint": "${api.url}/api/badges/custom/%badgeId%", - "badges.custom.texts.endpoint": "${api.url}/api/badges/custom/texts", - "account.change-password.endpoint": "${api.url}/api/auth/change-password", - "account.change-email.endpoint": "${api.url}/api/auth/change-email", - "account.change-username.endpoint": "${api.url}/api/auth/change-username", - "login.health.method": "GET", - "login.news.url": "${asset.url}/news/news.json", - "login.turnstile.enabled": false, - "login.turnstile.sitekey": "", - "avatar.mandatory.libraries": ["bd:1", "li:0"], - "avatar.mandatory.effect.libraries": ["dance.1", "dance.2", "dance.3", "dance.4"] -} diff --git a/setup/nitro/ui-config.json b/setup/nitro/ui-config.json deleted file mode 100644 index b7e8d71048..0000000000 --- a/setup/nitro/ui-config.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "image.library.notifications.url": "${image.library.url}notifications/%image%.png", - "achievements.images.url": "${image.library.url}Quests/%image%.png", - "camera.url": "https://MY_DOMAIN.COM/camera/photo", - "thumbnails.url": "https://MY_DOMAIN.COM/camera/photo/thumb/%thumbnail%.png", - "url.prefix": "", - "habbopages.url": "/gamedata/habbopages/", - "group.homepage.url": "${url.prefix}/groups/%groupid%/id", - "guide.help.alpha.groupid": 0, - "chat.viewer.height.percentage": 0.4, - "widget.dimmer.colorwheel": false, - "avatar.wardrobe.max.slots": 10, - "user.badges.max.slots": 5, - "camera.publish.disabled": false, - "hc.disabled": false, - "badge.descriptions.enabled": true, - "motto.max.length": 38, - "bot.name.max.length": 15, - "wired.action.bot.talk.to.avatar.max.length": 64, - "wired.action.bot.talk.max.length": 64, - "wired.action.chat.max.length": 100, - "wired.action.kick.from.room.max.length": 100, - "wired.action.mute.user.max.length": 100, - "game.center.enabled": false, - "catalog.style.new": true, - "show.google.ads": false, - "loginview": { - "images": { - "background": "${asset.url}/c_images/reception/stretch_blue.png", - "background.colour": "#6eadc8", - "sun": "${asset.url}/c_images/reception/sun.png", - "drape": "${asset.url}/c_images/reception/drape.png", - "left": "${asset.url}/c_images/reception/ts.png", - "right": "${asset.url}/c_images/reception/US_right.png", - "right.repeat": "${asset.url}/c_images/reception/US_top_right.png" - } - } -}