Commit Graph
63 Commits
Author SHA1 Message Date
Stefan Lazic eaa0d2e513 Revert "Build failure fix"
This reverts commit 7f774e95bb.
2026-09-05 09:32:30 +01:00
Stefan Lazic 7e70fa0583 Revert "Fixed the Manager deployment database dependency."
This reverts commit a8cdc2671e.
2026-09-05 09:32:28 +01:00
Stefan Lazic d063918aae Revert "Build faliure fix 2"
This reverts commit 69bc0adf29.
2026-09-05 09:32:26 +01:00
Stefan Lazic 3e9fe60faf Revert "Fixed the remaining Manager runtime coupling."
This reverts commit bc45608023.
2026-09-05 09:32:23 +01:00
Stefan Lazic 65d2c7322b Revert "Request fix"
This reverts commit d9a253a974.
2026-09-05 09:32:21 +01:00
Stefan Lazic 638b851fce Revert "root-route separation."
This reverts commit 2da916a4c6.
2026-09-05 09:32:20 +01:00
Stefan Lazic c237b565bd Revert "Auth fix"
This reverts commit 1c281c9f5d.
2026-09-05 09:32:18 +01:00
Stefan Lazic 32e93c6c23 Revert "Update management-auth.ts"
This reverts commit 0dd50c0375.
2026-09-05 09:32:16 +01:00
Stefan Lazic 3cef279d2d Revert "Redirect loop fix"
This reverts commit 8fddde6d4b.
2026-09-05 09:32:14 +01:00
Stefan Lazic bcf7fa58d3 Revert "cookie handling"
This reverts commit ac9791c8ef.
2026-09-05 09:32:12 +01:00
Stefan Lazic 3de53f0a67 Revert "Update management-auth.ts"
This reverts commit a65360b82d.
2026-09-05 09:32:10 +01:00
Stefan Lazic 344c08b840 Revert "SSR Leak fix"
This reverts commit 8a2b211069.
2026-09-05 09:32:08 +01:00
Stefan Lazic 2aa8405006 Revert "PHP Rebuild"
This reverts commit 2ef3654841.
2026-09-05 09:32:05 +01:00
Stefan Lazic a59f998f2b Revert "Docker"
This reverts commit c4325018e0.
2026-09-05 09:32:03 +01:00
Stefan Lazic 39eeb937de Revert "Update 2026_09_04_000300_create_nextchair_platform_tables.php"
This reverts commit cd6abeca6e.
2026-09-05 09:32:01 +01:00
Stefan Lazic 33fb14b773 Revert "Management UI"
This reverts commit f11404c574.
2026-09-05 09:31:59 +01:00
Stefan Lazic 3e052e56b1 Revert "Login Loop"
This reverts commit 16c6c28f07.
2026-09-05 09:31:50 +01:00
Stefan Lazic fa96fe0e15 Revert "Update entrypoint.sh"
This reverts commit 5972d37425.
2026-09-05 09:31:41 +01:00
Stefan Lazic 5972d37425 Update entrypoint.sh
CI / ci (push) Canceled after 0s
2026-09-05 09:25:46 +01:00
Stefan Lazic 16c6c28f07 Login Loop
CI / ci (push) Canceled after 0s
2026-09-05 09:24:09 +01:00
Stefan Lazic f11404c574 Management UI
CI / ci (push) Canceled after 0s
2026-09-05 09:11:24 +01:00
Stefan Lazic cd6abeca6e Update 2026_09_04_000300_create_nextchair_platform_tables.php
CI / ci (push) Canceled after 0s
2026-09-05 08:55:12 +01:00
Stefan Lazic c4325018e0 Docker
CI / ci (push) Canceled after 0s
2026-09-05 08:36:54 +01:00
Stefan Lazic 2ef3654841 PHP Rebuild
CI / ci (push) Canceled after 0s
Initial PHP rebuild of the app
2026-09-05 08:21:33 +01:00
Stefan Lazic 8a2b211069 SSR Leak fix
CI / ci (push) Canceled after 0s
2026-09-04 23:02:27 +01:00
Stefan Lazic a65360b82d Update management-auth.ts
CI / ci (push) Canceled after 0s
2026-09-04 22:55:53 +01:00
Stefan Lazic ac9791c8ef cookie handling
CI / ci (push) Canceled after 0s
2026-09-04 22:53:35 +01:00
Stefan Lazic 8fddde6d4b Redirect loop fix
CI / ci (push) Canceled after 0s
The redirect loop was caused by the Manager cookie configuration:
1. secure was based on NODE_ENV=production, so HTTP deployments silently dropped the cookie.
2. Path=/manager excluded /api/manager/*, preventing authenticated Manager API requests.
2026-09-04 22:48:22 +01:00
Stefan Lazic 0dd50c0375 Update management-auth.ts
CI / ci (push) Canceled after 0s
2026-09-04 22:42:28 +01:00
Stefan Lazic 1c281c9f5d Auth fix
CI / ci (push) Canceled after 0s
Implemented
- Root cause fixed in [src/proxy.ts]: Auth.js is now initialized lazily and never invoked when MANAGER_MODE=true.
- Manager requests call handleProxyRequest directly, preserving redirects and CSP.
- Business requests continue through Auth.js with existing protected-route behavior.
- Added coverage in [proxy-manager-mode.test.ts]
2026-09-04 22:28:49 +01:00
Stefan Lazic 2da916a4c6 root-route separation.
CI / ci (push) Canceled after 0s
2026-09-04 22:11:23 +01:00
Stefan Lazic d9a253a974 Request fix
CI / ci (push) Canceled after 0s
- Auth.js handlers require NextRequest.
- The wrapper accepted plain Request.
Changed both GET and POST handlers to accept NextRequest.
2026-09-04 21:59:44 +01:00
Stefan Lazic bc45608023 Fixed the remaining Manager runtime coupling.
CI / ci (push) Canceled after 0s
1. Root cause of the database error
The Manager proxy was bypassing installation checks, but / still resolved to src/app/page.tsx, which statically imported:
- @/auth
- Prisma
- business branding
- business permissions
- primary business data
The root route now redirects to /manager inside the proxy before the business homepage is evaluated.
2. Root cause of the Auth.js error
The global business SessionProvider was mounted around Manager pages. It automatically requested:

The business homepage is not evaluated first.
5. Provider and authentication separation
Manager mode:
- Uses ManagerProviders
- Uses the signed Manager cookie session
- Does not mount SessionProvider
- Does not call /api/auth/session
- Does not import business Auth.js or Prisma
Business mode:
- Dynamically loads the existing business Providers
- Continues using Auth.js and SessionProvider
- Preserves installation, /owner, and /staff behavior
6. Database independence
Manager mode now avoids database initialization for:
- Proxy requests
- Root metadata and viewport
- Root routing
- Manager pages
- Manager APIs
- Manifest requests
- Health requests
- Business Auth.js requests
- Business cron requests
No fake DATABASE_* variables were added.
7. Tests
Added coverage for:
- Manager / routing
- Manager /manager access
- No installation-state check in Manager mode
- Prisma import protection
- Business installation checks
- /owner protection
- Business Auth.js 404 boundary
- Manager health route without Prisma
- Manager manifest without business branding
8. Validation
2026-09-04 21:57:47 +01:00
Stefan Lazic 69bc0adf29 Build faliure fix 2
CI / ci (push) Canceled after 0s
Fixed the new build failure in [src/proxy.ts]
2026-09-04 21:45:54 +01:00
Stefan Lazic a8cdc2671e Fixed the Manager deployment database dependency.
CI / ci (push) Canceled after 0s
Root cause
src/proxy.ts statically imported installation-state.ts, which statically imported Prisma. Additionally, the root layout statically imported business branding, which also loads Prisma. The pathname check was also incorrect for Manager deployments served at /.
2026-09-04 21:43:26 +01:00
Stefan Lazic 7f774e95bb Build failure fix
CI / ci (push) Canceled after 0s
2026-09-04 21:22:33 +01:00
Stefan Lazic b219fb4519 initial NextChair Manager.
CI / ci (push) Canceled after 0s
Key additions:
* Separate platform Manager stack: [stacks/manager/compose.yaml]
* Dedicated manager authentication with signed sessions.
* Business overview dashboard.
* Add Business workflow with slug suggestions and deployment progress.
* Business detail page with start, stop, restart, update, logs, Dockge, and conservative removal actions.
* Explicit management API endpoints under [src/app/api/manager]
* Shared provisioning service layer in [provisioning.service.ts]
* CLI and UI now use the same [create-business.sh] provisioning logic.
* Registry metadata, database status, container health, and media usage reporting.
* Manager-only entrypoint mode that does not require a business database.
* Updated deployment documentation with Manager setup and Caddy routing.
Validation passed:
* Infra, Caddy, Manager, and generated business Compose configurations.
* Shell syntax checks.
* Registry generation with registry image tags.
* git diff --check.
2026-09-04 20:54:58 +01:00
Stefan Lazic 764d087eac Deployment Redesign
CI / ci (push) Canceled after 0s
Implemented the deployment redesign.
- Added Dockge-first-class stacks:
  - [stacks/infra/compose.yaml]
  - [stacks/caddy/compose.yaml]
- Added reusable business template: [deploy/business-compose.yaml.template]
- Added automated provisioning: [scripts/create-business.sh]
- Added per-business database/user, secrets, media volume, private networks, and Caddy route generation.
- Removed Traefik and manual business Compose files.
- Updated environment templates, .gitignore, and deployment documentation in [README.md]
Validation completed:
- Docker Compose config passed for infra, Caddy, and generated business stacks.
- Shell syntax validation passed.
- Registry image tags containing / were tested.
- No remaining Traefik or obsolete deployment references found.
2026-09-04 20:32:06 +01:00
Stefan Lazic 5472db320e Update README.md
CI / ci (push) Canceled after 0s
2026-09-04 19:02:02 +01:00
Stefan Lazic 841ee7eb52 VPS
Example of vps deploy with infra split from business.

Keeps one mysql instance for all.
2026-08-07 19:45:56 +01:00
Stefan Lazic b41a6d0af7 Create route.ts 2026-08-07 18:06:39 +01:00
Stefan Lazic 9949e2275e Database 2
fix for vercel build
2026-08-07 17:39:31 +01:00
Stefan Lazic 51de4f4ef5 Database
Updated to just use DATABASE_* in everything other than local docker.
2026-08-07 17:30:12 +01:00
Stefan Lazic 769d3f9ebc PWA Settings
Fixed webmanifest generation and pwa icon.

Made nav bar text optional.
2026-08-07 13:38:11 +01:00
Stefan Lazic a702320d4e UI Updates
Updated some pages pages to be more consistent.
2026-08-06 19:21:31 +01:00
Stefan Lazic 90ec663e6e Staf Booking
fixed staff ability to book a customer in
2026-08-06 14:49:46 +01:00
Stefan Lazic 973f18f64c Customer Profile
Customer profile update with image upload.
2026-08-06 12:11:36 +01:00
Stefan Lazic f07c30da0d Reviews & Layout
Scaled back google reviews to just get the star rating and number of reviews as google limits the number of reviews to 5.

Also removed the reviews tab from homepage.

And updated Appointments button layout
2026-08-06 09:57:24 +01:00
Stefan Lazic 92f062a861 Layout Changes
Small tweaks to the layout
2026-08-05 22:23:14 +01:00
Stefan Lazic 3300045d9e Staff / Owner
Merged staff and owner settings
2026-08-05 16:35:52 +01:00