Prevent raw template deployment #102

Open
opened 2026-06-05 07:58:53 -05:00 by erik · 0 comments
Owner

Goal

Prevent the in-repo template site from being accidentally deployed as a real production website before it has been initialized into a standalone site.

Requirements

  • Add a clear template initialization marker or equivalent signal that distinguishes raw template source from generated site code.
  • Make production startup fail with a clear message when the raw template is still uninitialized.
  • Treat local development and tests as safe defaults that do not require production identity values.
  • Have slug init stamp or replace the marker so generated sites can be deployed after configuration.
  • Include checks for obvious unsafe production defaults such as localhost site URLs or default admin identity values where appropriate.
  • Document that template/site in the Slugkit repo is development source and should not be deployed directly.

Acceptance criteria

  • Raw in-repo template/site cannot start in production with uninitialized defaults.
  • Generated sites initialized by slug init pass the initialization marker check.
  • The startup error clearly explains that users should deploy a generated site, not the raw template.
  • Local development and tests continue to work with safe defaults.
  • Docs explain the raw-template vs generated-site deployment boundary.
  • Tests cover raw-template production failure and initialized-site success.
  • Relevant lint/test checks pass.

Dependencies

  • task-d60f5efc
## Goal Prevent the in-repo template site from being accidentally deployed as a real production website before it has been initialized into a standalone site. ## Requirements - Add a clear template initialization marker or equivalent signal that distinguishes raw template source from generated site code. - Make production startup fail with a clear message when the raw template is still uninitialized. - Treat local development and tests as safe defaults that do not require production identity values. - Have `slug init` stamp or replace the marker so generated sites can be deployed after configuration. - Include checks for obvious unsafe production defaults such as localhost site URLs or default admin identity values where appropriate. - Document that `template/site` in the Slugkit repo is development source and should not be deployed directly. ## Acceptance criteria - [ ] Raw in-repo `template/site` cannot start in production with uninitialized defaults. - [ ] Generated sites initialized by `slug init` pass the initialization marker check. - [ ] The startup error clearly explains that users should deploy a generated site, not the raw template. - [ ] Local development and tests continue to work with safe defaults. - [ ] Docs explain the raw-template vs generated-site deployment boundary. - [ ] Tests cover raw-template production failure and initialized-site success. - [ ] Relevant lint/test checks pass. ## Dependencies - task-d60f5efc
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit#102
No description provided.