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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

The headless storefront behind [msk-scripts.de](https://www.msk-scripts.de), built on Next.js 16, React 19, TypeScript, Tailwind CSS and MariaDB.

It sells FiveM resources through the Tebex Headless API and doubles as the management platform for the Discord Ticket Bot and the Giveaway Bot: API keys, Stripe subscriptions, hosted transcripts, custom domains and fully hosted bots. It also runs the MSK image gallery and its CDN.
It used to sell FiveM resources through the Tebex Headless API; since November 2026 those scripts are free on GitHub and the paid shop is switched off. It doubles as the management platform for the Discord Ticket Bot and the Giveaway Bot: API keys, Stripe subscriptions, hosted transcripts, custom domains and fully hosted bots. It also runs the MSK image gallery and its CDN.

**This is not an open-source project.** The code is public to read, not free to use, see [License](#license).

Expand Down
6 changes: 3 additions & 3 deletions app/[lang]/(site)/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export default async function AboutPage() {
]

const lines = [
{ href: '/fivem', title: home.entry_fivem, sub: home.entry_fivem_sub },
{ href: '/discord', title: home.entry_discord, sub: home.entry_discord_sub },
{ href: '/tools', title: home.entry_tools, sub: home.entry_tools_sub },
{ href: '/fivem/free', title: home.entry_fivem, sub: home.entry_fivem_sub },
{ href: '/discord', title: home.entry_discord, sub: home.entry_discord_sub },
{ href: '/tools', title: home.entry_tools, sub: home.entry_tools_sub },
]

const links = [
Expand Down
11 changes: 4 additions & 7 deletions app/[lang]/(site)/fivem/free/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import { getRequestLang } from '@/lib/serverLang'
*
* No pictures: the entries in the content file only have banners, which are
* the identical product banners of the exclusion list (4.2).
*
* Since 05.11.2026 this is the only FiveM page: the paid scripts are free on
* GitHub, and the old catalogue redirects here.
*/

export async function generateMetadata(): Promise<Metadata> {
Expand Down Expand Up @@ -68,18 +71,12 @@ export default async function FreeScriptsPage() {
id="free-title"
crumbs={[
{ label: crumbs.breadcrumb_home, href: '/' },
{ label: crumbs.breadcrumb_fivem, href: '/fivem' },
{ label: nav.nav_fivem_free },
]}
kicker={home.free_kicker}
title={<BrandTitle template={p.title} />}
lead={home.free_scripts_subtitle}
actions={
<>
<TextLink href="/stats" tone="band">{p.servers_source}</TextLink>
<TextLink href="/fivem" tone="band">{p.paid}</TextLink>
</>
}
actions={<TextLink href="/stats" tone="band">{p.servers_source}</TextLink>}
/>

<div className="border-t border-[var(--color-border)] py-[var(--space-section)]">
Expand Down
7 changes: 2 additions & 5 deletions app/[lang]/(site)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { getRequestLang } from '@/lib/serverLang'
import { Header } from '@/components/layout/Header'
import { Footer } from '@/components/layout/Footer'
import { CartDrawer } from '@/components/cart/CartDrawer'
import { SalePriceFetcher } from '@/components/SalePriceFetcher'
import { NewsPopup } from '@/components/ui/NewsPopup'
import { JsonLd } from '@/components/JsonLd'
import { organizationJsonLd } from '@/lib/jsonLd'
import { loadNewsPopup } from '@/lib/siteSettings'
import { isBotPath } from '@/lib/routes'

/**
* The frame of the public site: header, cart drawer, news popup, footer.
* The frame of the public site: header, news popup, footer. The cart drawer
* and the Tebex sale price fetcher left with the paid scripts (05.11.2026).
*
* A route group of its own since Phase 7 of the redesign (plan 6.3). Until
* then this sat in the root layout, and the three dashboards ran inside the
Expand All @@ -36,8 +35,6 @@ export default async function SiteLayout({ children }: { children: React.ReactNo
<>
<JsonLd data={organizationJsonLd({ describe: !botLanding })} />
<Header />
<CartDrawer />
<SalePriceFetcher />
<NewsPopup settings={newsPopup} />
<main id="main" tabIndex={-1} className="flex-1">{children}</main>
<Footer />
Expand Down
18 changes: 5 additions & 13 deletions app/[lang]/(site)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { pageSeo } from '@/lib/pageSeo'
import { getRequestLang } from '@/lib/serverLang'
import { Hero } from '@/components/home/Hero'
import { ProofLine } from '@/components/home/ProofLine'
import { Catalog, cheapestScript } from '@/components/home/Catalog'
import { Bots } from '@/components/home/Bots'
import { WebTools } from '@/components/home/WebTools'
import { FreeScripts } from '@/components/home/FreeScripts'
Expand All @@ -15,10 +14,7 @@ import { webSiteJsonLd } from '@/lib/jsonLd'
import { loadHeadlineStat } from '@/lib/fivestats'
import { loadDocPageCount } from '@/lib/docsPages'
import { loadShopStats } from '@/lib/shopStats'
import { getPackages } from '@/lib/tebex'
import { formatEuro } from '@/lib/price'
import { cheapestPaidTier, formatTierPrice } from '@/lib/tiers'
import type { TebexPackage } from '@/types/tebex'

// The home page collects impressions on generic queries for
// FiveM scripts, so it carries its title itself instead of going through the
Expand All @@ -40,19 +36,21 @@ export async function generateMetadata(): Promise<Metadata> {
*
* Hero -> what MSK is, and the entry by need
* Proof -> at most three measured figures
* FiveM scripts -> the paid scripts and the subscription
* Discord bots -> both bots in a zigzag
* Web tools -> a compact row
* Free scripts -> a list, not a grid of big cards
* About -> three sentences, no photo
*
* The paid catalogue left on 05.11.2026: every FiveM script is free on
* GitHub since, and the free scripts section lists all of them.
*
* The close is the green band above the footer, which every public page has:
* Discord support and the documentation as two ways, no second call to buy.
* Gone: the release log in terminal look, "Why MSK" as a row of four icon
* cards and the second closing section (exclusion list, plan 4.2).
*/
export default async function HomePage() {
const [{ lang }, headline, stats, docPages, packages] = await Promise.all([
const [{ lang }, headline, stats, docPages] = await Promise.all([
getRequestLang(),
// Fail-soft: none of these sources may take down the home page. If one
// fails, the corresponding figure disappears; nothing is estimated.
Expand All @@ -68,23 +66,17 @@ export default async function HomePage() {
console.warn('[home] doc page count unavailable:', err)
return null
}),
getPackages().catch(err => {
console.warn('[home] Tebex unavailable, catalogue hidden:', err)
return [] as TebexPackage[]
}),
])

const cheapest = cheapestScript(packages)
const ticketFrom = formatTierPrice(cheapestPaidTier(), lang)

return (
<>
{/* The site as an entity, next to the Organization from the root layout.
Only here: the home page is the one address that stands for the site. */}
<JsonLd data={webSiteJsonLd()} />
<Hero lang={lang} fivemFrom={cheapest === null ? null : formatEuro(cheapest, lang)} botFrom={ticketFrom} />
<Hero lang={lang} botFrom={ticketFrom} />
<ProofLine lang={lang} stats={stats} servers={headline} docPages={docPages} />
<Catalog lang={lang} packages={packages} />
<Bots lang={lang} ticketFrom={ticketFrom} />
<WebTools lang={lang} />
<FreeScripts lang={lang} />
Expand Down
19 changes: 4 additions & 15 deletions app/llms.txt/route.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
import { renderLlmsTxt } from '@/lib/llms'
import { getPackages } from '@/lib/tebex'

/**
* /llms.txt, see `renderLlmsTxt`.
*
* Exists once per site: `lib/routes.ts` lists the address in
* `isExemptPath`, so `/de/llms.txt` is not rewritten onto this route
* and answers with the 404 it should.
*
* No Tebex fetch any more: the paid scripts left the file on 05.11.2026, and
* everything it lists now is fixed.
*/

// Same setting as the sitemap route. What actually governs is the Tebex fetch
// behind it: it revalidates after 60 s, and Next takes the lowest value on a
// route, so the build lists this one with one minute. A new package therefore
// shows up here as promptly as on its own page.
export const revalidate = 3600

export async function GET(): Promise<Response> {
// Fail-soft, like the sitemap: if Tebex does not answer (CI build without
// secrets, API outage), the file still lists every fixed page instead of
// taking the build or the request down.
const packages = await getPackages().catch(err => {
console.warn('[llms.txt] Tebex packages unavailable:', err)
return []
})

return new Response(renderLlmsTxt(packages), {
return new Response(renderLlmsTxt(), {
headers: {
'Content-Type': 'text/plain; charset=utf-8',
'Cache-Control': 'public, max-age=3600, s-maxage=3600',
Expand Down
3 changes: 1 addition & 2 deletions app/sitemap.xml/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { buildSitemapEntries, renderSitemapXml } from '@/lib/sitemap'

// Same revalidation as the catalogue pages, so that new packages show up in
// the sitemap promptly.
// Hourly, so that a new image category shows up in the sitemap promptly.
export const revalidate = 3600

export async function GET() {
Expand Down
16 changes: 7 additions & 9 deletions components/home/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,23 @@ function Title({ template }: { template: string }) {
* Replaces the release log in terminal look, which is on the exclusion list
* (4.2). The updates move to the product pages as a plain list (Phase 4).
*
* The prices are real data or nothing: the cheapest paid script from Tebex,
* the cheapest ticket bot plan from lib/tiers.ts. Without Tebex the FiveM line
* just shows no price.
* The prices are real data: the cheapest ticket bot plan from lib/tiers.ts.
* The FiveM scripts are free on GitHub since 05.11.2026, so that line says
* so instead of the cheapest Tebex price it used to show.
*/
export function Hero({
lang, fivemFrom, botFrom,
lang, botFrom,
}: {
lang: Lang
/** Cheapest paid FiveM script, formatted, or null without Tebex data. */
fivemFrom: string | null
/** Cheapest paid ticket bot plan per month, formatted. */
botFrom: string
}) {
const t = homeTranslations[lang]

const entries = [
{ href: '/fivem', title: t.entry_fivem, sub: t.entry_fivem_sub, price: fivemFrom ? t.entry_fivem_price.replace('{price}', fivemFrom) : null },
{ href: '/discord', title: t.entry_discord, sub: t.entry_discord_sub, price: t.entry_discord_price.replace('{price}', botFrom) },
{ href: '/tools', title: t.entry_tools, sub: t.entry_tools_sub, price: t.entry_tools_price },
{ href: '/fivem/free', title: t.entry_fivem, sub: t.entry_fivem_sub, price: t.entry_fivem_price },
{ href: '/discord', title: t.entry_discord, sub: t.entry_discord_sub, price: t.entry_discord_price.replace('{price}', botFrom) },
{ href: '/tools', title: t.entry_tools, sub: t.entry_tools_sub, price: t.entry_tools_price },
]

return (
Expand Down
1 change: 0 additions & 1 deletion components/layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export function footerColumns(lang: Lang): Array<{ title: string; links: FooterL
{
title: t.footer_col_products,
links: [
{ label: t.nav_fivem, href: '/fivem' },
{ label: t.nav_fivem_free, href: '/fivem/free' },
{ label: 'Ticket Bot', href: '/discord/ticket-bot' },
{ label: 'Giveaway Bot', href: '/discord/giveaway-bot' },
Expand Down
31 changes: 10 additions & 21 deletions components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Suspense, useEffect, useRef, useState } from 'react'
import Image from 'next/image'
import { usePathname, useSearchParams } from 'next/navigation'
import { LocaleLink as Link } from '@/components/i18n/LocaleLink'
import { List, ShoppingCart, X } from '@/components/icons'
import { List, X } from '@/components/icons'
import { LanguageDropdown } from '@/components/i18n/LanguageDropdown'
import { useLang } from '@/components/i18n/LangProvider'
import { AccountMenu, type AccountState } from '@/components/layout/AccountMenu'
Expand Down Expand Up @@ -60,8 +60,8 @@ function Brand() {
return (
<Link href="/" className="flex min-h-11 shrink-0 items-center gap-2.5 text-[var(--color-foreground)]">
<Image src="/logo.png" alt="" width={36} height={36} priority className="h-9 w-9 rounded-lg object-contain" />
{/* Below 360 px the name gives way to cart and menu; it stays the
link's name for a screen reader. */}
{/* Below 360 px the name gives way to the menu; it stays the link's
name for a screen reader. */}
<span className="sr-only font-display text-lead font-bold tracking-[-0.01em] [font-stretch:108%] min-[360px]:not-sr-only">
MSK Scripts
</span>
Expand All @@ -75,15 +75,19 @@ const actionClass =

/**
* The header (plan 5.3, sample page of Phase 0): MSK green stripe on top,
* brand, the product lines, then language, cart and account. No search, the
* brand, the product lines, then language and account. No search, the
* catalogue is far below the 20 products where one pays off (E5).
*
* No cart since 05.11.2026: the FiveM scripts are free on GitHub and nothing
* is sold through Tebex any more. The shop sign-in in the account menu stays
* until the Tebex code is removed.
*/
export function Header() {
const { lang } = useLang()
const t = layoutTranslations[lang]
const pathname = usePathname()
const { itemCount, loginAndAdd } = useCart()
const { openCart, username, clearBasket } = useCartStore()
const { loginAndAdd } = useCart()
const { username, clearBasket } = useCartStore()
const [menuOpen, setMenuOpen] = useState(false)
const [signingIn, setSigningIn] = useState(false)
const headerRef = useRef<HTMLElement>(null)
Expand All @@ -93,7 +97,6 @@ export function Header() {
// client render the defaults, or the markup would differ and React would
// drop the event handlers of the whole subtree.
const hydrated = useHydrated()
const count = hydrated ? itemCount : 0

// Menus close on every route change. Adjusted during render rather than in
// an effect, so the open menu is never painted on the new page.
Expand All @@ -118,10 +121,6 @@ export function Header() {
signOut: () => clearBasket(),
}

const cartLabel = count > 0
? `${t.action_cart}, ${count === 1 ? t.cart_items_one : t.cart_items.replace('{count}', String(count))}`
: t.action_cart

return (
<header
ref={headerRef}
Expand All @@ -139,16 +138,6 @@ export function Header() {
<div className="ml-auto flex items-center gap-[clamp(0.25rem,0.9vw,1.25rem)]">
<LanguageDropdown className="hidden sm:block" />

<button type="button" onClick={openCart} aria-label={cartLabel} className={actionClass}>
<ShoppingCart className="h-5 w-5" />
<span className="hidden min-[1440px]:inline">{t.action_cart}</span>
{count > 0 && (
<span className="rounded-full bg-[var(--color-primary)] px-[7px] text-[0.75em] font-bold leading-[1.5] text-[var(--color-primary-foreground)] tabular-nums">
{count}
</span>
)}
</button>

<AccountMenu account={account} className="hidden md:block" />

<button
Expand Down
4 changes: 2 additions & 2 deletions components/layout/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const MOBILE_MENU_ID = 'mobile-menu'

/**
* The menu below 1280 px: the three product lines as the top level with
* their pages below (plan 5.3), then account, language and appearance. Cart
* and the menu button stay in the bar.
* their pages below (plan 5.3), then account, language and appearance. The
* menu button stays in the bar.
*
* A disclosure below the bar, not a modal: the page stays where it is, the
* panel scrolls on its own, and the button that opened it closes it again.
Expand Down
2 changes: 1 addition & 1 deletion components/layout/NotFoundContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function NotFoundContent({ lang }: { lang: Lang }) {
<Link href="/">{t.not_found_home}</Link>
</Button>
<Button asChild variant="outline">
<Link href="/fivem">
<Link href="/fivem/free">
{t.not_found_fivem}
<ArrowRight className="h-4 w-4" />
</Link>
Expand Down
10 changes: 5 additions & 5 deletions components/layout/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ export function productLines(lang: Lang): ProductLine[] {
return [
{
id: 'fivem',
href: '/fivem',
// Every script is free on GitHub since 05.11.2026; the paid catalogue
// and the subscription redirect (lib/routes.ts, `retiredRedirect`).
href: '/fivem/free',
label: t.nav_fivem,
matches: ['/fivem', '/stats'],
links: [
{ href: '/fivem', label: t.nav_fivem_paid, description: t.nav_fivem_paid_desc },
{ href: '/fivem/free', label: t.nav_fivem_free, description: t.nav_fivem_free_desc },
{ href: '/fivem/all-access', label: t.nav_fivem_allaccess, description: t.nav_fivem_allaccess_desc },
{ href: '/stats', label: t.nav_fivem_stats, description: t.nav_fivem_stats_desc },
{ href: '/fivem/free', label: t.nav_fivem_free, description: t.nav_fivem_free_desc },
{ href: '/stats', label: t.nav_fivem_stats, description: t.nav_fivem_stats_desc },
],
},
{
Expand Down
Loading
Loading