PHP Rebuild
CI / ci (push) Canceled after 0s

Initial PHP rebuild of the app
This commit is contained in:
Stefan Lazic committed 2026-09-05 08:21:33 +01:00
1 parent 8a2b211069
commit 2ef3654841
690 files changed
+33944 -12046

No files matched your search

-18
View File
@@ -1,18 +0,0 @@
/**
* Deliberately not the (auth)/(customer)/(staff)/(owner) shells — this
* route renders before any business exists, so there is nothing to brand
* with yet (see the brief's "Offline and Error Branding" section: use
* neutral installation wording before install, business branding after).
* A plain neutral mark, not the app's own logo/name, keeps that boundary
* honest rather than showing product branding on the one screen where it
* explicitly shouldn't appear.
*/
export default function InstallLayout({ children }: { children: React.ReactNode }) {
return (
<div className="flex min-h-screen flex-col bg-stone p-6">
<div id="main-content" className="mx-auto w-full max-w-lg flex-1 py-10">
{children}
</div>
</div>
);
}
-41
View File
@@ -1,41 +0,0 @@
import { redirect } from "next/navigation";
import { getInstallationState } from "@/lib/installation/installation-state";
import { InstallWizard } from "@/features/installation/components/install-wizard";
export const metadata = {
title: "Set Up Your Business",
};
// Must never be statically prerendered — the installation-state check on
// every request is the entire point of this page (see the brief's "do
// not rely on the form being hidden"). Without this, Next could bake a
// single build-time snapshot of `installed` into static HTML and serve
// that forever, regardless of the database's real state afterward.
export const dynamic = "force-dynamic";
export default async function InstallPage() {
const { installed } = await getInstallationState();
// Direct navigation after a completed install — src/proxy.ts already
// redirects here for most cases, but this page enforces the same rule
// itself rather than trusting the proxy alone (see the brief's "do not
// rely on the form being hidden" requirement).
if (installed) {
redirect("/");
}
const tokenConfigured = !!process.env.INSTALLATION_TOKEN;
if (!tokenConfigured) {
return (
<div className="space-y-4">
<h1 className="text-2xl font-bold">Installation is not configured</h1>
<p className="text-muted text-sm">
This deployment has no <code className="rounded bg-white px-1.5 py-0.5 text-xs">INSTALLATION_TOKEN</code>{" "}
environment variable set, so setup can&apos;t proceed. An administrator needs to set one and restart the
application before installation can begin.
</p>
</div>
);
}
return <InstallWizard />;
}