Compare commits

..

7 Commits

Author SHA1 Message Date
Codex Agent
a9fa1546f7 bd sync: 2026-01-23 09:20:33 2026-01-23 09:20:34 +01:00
Codex Agent
7c6eee187c bd sync: 2026-01-23 08:56:22 2026-01-23 08:56:23 +01:00
Codex Agent
fbd46b8e5c bd sync: 2026-01-21 12:55:26 2026-01-21 12:55:26 +01:00
Codex Agent
886b336a08 bd sync: 2026-01-19 18:50:20 2026-01-19 18:50:20 +01:00
Codex Agent
02237735ec bd sync: 2026-01-18 11:02:27 2026-01-18 11:02:28 +01:00
Codex Agent
5e420a0dd8 bd sync: 2026-01-15 19:54:28 2026-01-15 19:54:28 +01:00
Codex Agent
2a55ae934f bd sync: 2026-01-13 11:04:44 2026-01-13 11:04:44 +01:00
284 changed files with 33656 additions and 41647 deletions

6
.beads/.gitignore vendored
View File

@@ -11,12 +11,6 @@ daemon.log
daemon.pid
bd.sock
sync-state.json
.sync.lock
last-touched
sync_base.jsonl
.sync.lock
last-touched
sync_base.jsonl
# Local version tracking (prevents upgrade notification spam after git ops)
.local_version

View File

@@ -42,7 +42,7 @@
# This setting persists across clones (unlike database config which is gitignored).
# Can also use BEADS_SYNC_BRANCH env var for local override.
# If not set, bd sync will require you to run 'bd config set sync.branch <branch>'.
sync-branch: "beads-sync"
# sync-branch: "beads-sync"
# Multi-repo configuration (experimental - bd-307)
# Allows hydrating from multiple repositories and routing writes to the correct JSONL
@@ -59,4 +59,4 @@ sync-branch: "beads-sync"
# - linear.url
# - linear.api-key
# - github.org
# - github.repo
# - github.repo

View File

@@ -17,6 +17,7 @@
{"id":"fotospiel-app-38f","title":"Paddle catalog sync: surface last sync error/log context in admin","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-01T15:59:14.865414785+01:00","created_by":"soeren","updated_at":"2026-01-02T21:16:09.109922491+01:00","closed_at":"2026-01-02T21:16:09.109922491+01:00","close_reason":"Completed"}
{"id":"fotospiel-app-3ut","title":"SEC-API-03 Synthetic monitoring + alert config","status":"open","priority":2,"issue_type":"task","created_at":"2026-01-01T15:52:46.793875724+01:00","created_by":"soeren","updated_at":"2026-01-01T15:52:46.793875724+01:00"}
{"id":"fotospiel-app-3xa","title":"Security review: event admin code audit (policies, PKCE, file handling)","status":"open","priority":2,"issue_type":"task","created_at":"2026-01-01T16:05:20.115675149+01:00","created_by":"soeren","updated_at":"2026-01-01T16:05:20.115675149+01:00"}
{"id":"fotospiel-app-43mp","title":"Help-System für Event Admin PWA planen","notes":"Context help links wired into priority admin pages.","status":"in_progress","priority":2,"issue_type":"task","owner":"codex-agent@example.com","created_at":"2026-01-23T08:21:47.812129626+01:00","created_by":"Codex Agent","updated_at":"2026-01-23T09:19:45.828239299+01:00"}
{"id":"fotospiel-app-4ar","title":"SEC-BILL-03 Failed capture notifications + ledger hook","status":"open","priority":2,"issue_type":"task","created_at":"2026-01-01T15:54:33.266516715+01:00","created_by":"soeren","updated_at":"2026-01-01T15:54:33.266516715+01:00"}
{"id":"fotospiel-app-4en","title":"Add translations for Mobile Package Shop","description":"The new MobilePackageShopPage.tsx uses translation keys like 'shop.title', 'shop.legal.agb', etc. Ensure these are added to the management.json files for de and en.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-06T18:05:50.469751088+01:00","created_by":"soeren","updated_at":"2026-01-06T18:14:19.984343737+01:00","closed_at":"2026-01-06T18:14:19.984346372+01:00"}
{"id":"fotospiel-app-4i4","title":"Security review: map roles/data","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-01T16:02:58.370301875+01:00","created_by":"soeren","updated_at":"2026-01-01T16:03:03.997327414+01:00","closed_at":"2026-01-01T16:03:03.997327414+01:00","close_reason":"Completed in codebase (verified)"}
@@ -37,6 +38,7 @@
{"id":"fotospiel-app-5ie","title":"Help docs: Live Show how-to + recommended hardware (DE/EN)","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-05T11:12:05.973844187+01:00","created_by":"soeren","updated_at":"2026-01-05T19:42:44.39939087+01:00","closed_at":"2026-01-05T19:42:44.39939087+01:00","close_reason":"Closed","dependencies":[{"issue_id":"fotospiel-app-5ie","depends_on_id":"fotospiel-app-vro","type":"blocks","created_at":"2026-01-05T11:13:54.925412888+01:00","created_by":"soeren"},{"issue_id":"fotospiel-app-5ie","depends_on_id":"fotospiel-app-539","type":"blocks","created_at":"2026-01-05T11:14:03.257649076+01:00","created_by":"soeren"}]}
{"id":"fotospiel-app-5iy","title":"Security review: confirm env/header defaults","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-01T16:03:20.808188183+01:00","created_by":"soeren","updated_at":"2026-01-01T16:03:26.388002115+01:00","closed_at":"2026-01-01T16:03:26.388002115+01:00","close_reason":"Completed in codebase (verified)"}
{"id":"fotospiel-app-5s3","title":"Localized SEO: canonical/hreflang tags + localized navigation","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-01T16:02:03.909947355+01:00","created_by":"soeren","updated_at":"2026-01-01T16:02:09.550647107+01:00","closed_at":"2026-01-01T16:02:09.550647107+01:00","close_reason":"Completed in codebase (verified)"}
{"id":"fotospiel-app-5veo","title":"Investigate vite build timeout","status":"open","priority":2,"issue_type":"task","owner":"codex-agent@example.com","created_at":"2026-01-21T12:49:14.166622473+01:00","created_by":"Codex Agent","updated_at":"2026-01-21T12:49:14.166622473+01:00"}
{"id":"fotospiel-app-5zl","title":"Ensure checkout step 3 requires login for Paddle checkout","description":"Problem: Paddle checkout on step 3 fails when user is not logged in. Step 3 must enforce authentication before initializing Paddle checkout.\\n\\nSuggestions:\\n- Protect step 3 route/controller with auth middleware and redirect to login with intended return URL.\\n- Gate step 3 UI/CTA on auth state; show inline login prompt and disable Paddle until authenticated.\\n- Require auth in backend endpoint that creates Paddle transaction/session; return 401 and send user to login.\\n- Optionally preflight at end of step 2 to prompt login before advancing.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-04T12:31:43.215017311+01:00","created_by":"soeren","updated_at":"2026-01-04T12:42:45.088723058+01:00","closed_at":"2026-01-04T12:42:45.088723058+01:00","close_reason":"Closed"}
{"id":"fotospiel-app-64l","title":"SEC-FE-01 CSP nonce/hashing rollout","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-01T15:54:47.607047443+01:00","created_by":"soeren","updated_at":"2026-01-01T15:55:56.477104351+01:00","closed_at":"2026-01-01T15:55:56.477104351+01:00","close_reason":"Completed in codebase (verified) - duplicate of fotospiel-app-zli"}
{"id":"fotospiel-app-6dp","title":"Coupon ops enhancements (redemption service, preview endpoint, widget, export)","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-01T16:09:09.275919717+01:00","created_by":"soeren","updated_at":"2026-01-01T16:09:14.882264149+01:00","closed_at":"2026-01-01T16:09:14.882264149+01:00","close_reason":"Completed in codebase (verified)"}

View File

@@ -1 +1 @@
fotospiel-app-spq8
fotospiel-app-29r

1
.gitignore vendored
View File

@@ -12,7 +12,6 @@ fotospiel-tenant-app
/resources/js/wayfinder
/storage/*.key
/storage/pail
/C:\\wwwroot\\fotospiel-app\\storage\\app/
/vendor
/clients/photobooth-uploader/**/bin
/clients/photobooth-uploader/**/obj

View File

@@ -337,8 +337,8 @@ Tokens are design system values that can be referenced using the `$` prefix.
### Color Tokens
- `accent`: #3D5AFE
- `accentSoft`: #E8ECFF
- `accent`: #FFB6C1
- `accentSoft`: #FFE5EC
- `blue10Dark`: hsl(209, 100%, 60.6%)
- `blue10Light`: hsl(208, 100%, 47.3%)
- `blue11Dark`: hsl(210, 100%, 66.1%)
@@ -363,8 +363,8 @@ Tokens are design system values that can be referenced using the `$` prefix.
- `blue8Light`: hsl(206, 81.9%, 65.3%)
- `blue9Dark`: hsl(206, 100%, 50.0%)
- `blue9Light`: hsl(206, 100%, 50.0%)
- `border`: #F3D6C9
- `danger`: #EF4444
- `border`: #F2E4DA
- `danger`: #E04848
- `gray10Dark`: hsl(0, 0%, 49.4%)
- `gray10Light`: hsl(0, 0%, 52.3%)
- `gray11Dark`: hsl(0, 0%, 62.8%)
@@ -413,7 +413,7 @@ Tokens are design system values that can be referenced using the `$` prefix.
- `green8Light`: hsl(151, 40.2%, 54.1%)
- `green9Dark`: hsl(151, 55.0%, 41.5%)
- `green9Light`: hsl(151, 55.0%, 41.5%)
- `muted`: #FFF6F0
- `muted`: #F4ECE8
- `orange10Dark`: hsl(24, 100%, 58.5%)
- `orange10Light`: hsl(24, 100%, 46.5%)
- `orange11Dark`: hsl(24, 100%, 62.2%)
@@ -462,7 +462,7 @@ Tokens are design system values that can be referenced using the `$` prefix.
- `pink8Light`: hsl(323, 60.3%, 72.4%)
- `pink9Dark`: hsl(322, 65.0%, 54.5%)
- `pink9Light`: hsl(322, 65.0%, 54.5%)
- `primary`: #FF5C5C
- `primary`: #FF5A5F
- `purple10Dark`: hsl(273, 57.3%, 59.1%)
- `purple10Light`: hsl(272, 46.8%, 50.3%)
- `purple11Dark`: hsl(275, 80.0%, 71.0%)
@@ -511,10 +511,10 @@ Tokens are design system values that can be referenced using the `$` prefix.
- `red8Light`: hsl(359, 69.5%, 74.3%)
- `red9Dark`: hsl(358, 75.0%, 59.0%)
- `red9Light`: hsl(358, 75.0%, 59.0%)
- `success`: #22C55E
- `success`: #06D6A0
- `surface`: #ffffff
- `text`: #0B132B
- `warning`: #FBBF24
- `text`: #1F2937
- `warning`: #F5C542
- `yellow10Dark`: hsl(54, 100%, 68.0%)
- `yellow10Light`: hsl(50, 100%, 48.5%)
- `yellow11Dark`: hsl(48, 100%, 47.0%)

View File

@@ -5152,7 +5152,7 @@ var require_useMergeRefs = __commonJS({
}
return React83.useMemo(
() => (0, _mergeRefs.default)(...args),
// eslint-disable-next-line
[...args]
);
}
@@ -12243,7 +12243,7 @@ var require_useMergeRefs2 = __commonJS({
}
},
[...refs]
// eslint-disable-line react-hooks/exhaustive-deps
);
}
__name(useMergeRefs, "useMergeRefs");
@@ -12938,7 +12938,7 @@ var require_VirtualizedSectionList = __commonJS({
}
};
this._renderItem = (listItemCount) => (
// eslint-disable-next-line react/no-unstable-nested-components
(_ref2) => {
var item = _ref2.item, index5 = _ref2.index;
var info = this._subExtractor(index5);
@@ -30935,17 +30935,17 @@ function useInteractions(propsList) {
const itemDeps = propsList.map((key) => key == null ? void 0 : key.item);
const getReferenceProps = React51.useCallback(
(userProps) => mergeProps(userProps, propsList, "reference"),
// eslint-disable-next-line react-hooks/exhaustive-deps
referenceDeps
);
const getFloatingProps = React51.useCallback(
(userProps) => mergeProps(userProps, propsList, "floating"),
// eslint-disable-next-line react-hooks/exhaustive-deps
floatingDeps
);
const getItemProps = React51.useCallback(
(userProps) => mergeProps(userProps, propsList, "item"),
// eslint-disable-next-line react-hooks/exhaustive-deps
itemDeps
);
return React51.useMemo(() => ({
@@ -33866,7 +33866,7 @@ function FloatingFocusManager(props) {
queueMicrotask(() => {
const tabbableReturnElement = getFirstTabbableElement(returnElement);
if (
// eslint-disable-next-line react-hooks/exhaustive-deps
returnFocusRef.current && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && // If the focus moved somewhere else after mount, avoid returning focus
// since it likely entered a different element which should be
// respected: https://github.com/floating-ui/floating-ui/issues/2607
@@ -34615,17 +34615,17 @@ function useInteractions2(propsList) {
const itemDeps = propsList.map((key) => key == null ? void 0 : key.item);
const getReferenceProps = React60.useCallback(
(userProps) => mergeProps2(userProps, propsList, "reference"),
// eslint-disable-next-line react-hooks/exhaustive-deps
referenceDeps
);
const getFloatingProps = React60.useCallback(
(userProps) => mergeProps2(userProps, propsList, "floating"),
// eslint-disable-next-line react-hooks/exhaustive-deps
floatingDeps
);
const getItemProps = React60.useCallback(
(userProps) => mergeProps2(userProps, propsList, "item"),
// eslint-disable-next-line react-hooks/exhaustive-deps
itemDeps
);
return React60.useMemo(() => ({
@@ -39482,17 +39482,17 @@ function useInteractions3(propsList) {
const itemDeps = propsList.map((key) => key == null ? void 0 : key.item);
const getReferenceProps = React76.useCallback(
(userProps) => mergeProps3(userProps, propsList, "reference"),
// eslint-disable-next-line react-hooks/exhaustive-deps
referenceDeps
);
const getFloatingProps = React76.useCallback(
(userProps) => mergeProps3(userProps, propsList, "floating"),
// eslint-disable-next-line react-hooks/exhaustive-deps
floatingDeps
);
const getItemProps = React76.useCallback(
(userProps) => mergeProps3(userProps, propsList, "item"),
// eslint-disable-next-line react-hooks/exhaustive-deps
itemDeps
);
return React76.useMemo(() => ({

View File

@@ -4160,33 +4160,27 @@ var tokens3 = {
...tokens2,
color: {
...tokens2.color,
primary: "#4F46E5",
// Indigo 600
accent: "#F43F5E",
// Rose 500
accentSoft: "#E0E7FF",
// Indigo 100
success: "#10B981",
// Emerald 500
warning: "#F59E0B",
// Amber 500
danger: "#EF4444",
// Red 500
primary: "#FF5A5F",
accent: "#FFB6C1",
accentSoft: "#FFE5EC",
success: "#06D6A0",
warning: "#F5C542",
danger: "#E04848",
surface: "#ffffff",
muted: "#F8FAFC",
// Slate 50
border: "#E2E8F0",
// Slate 200
text: "#0F172A"
// Slate 900
muted: "#F4ECE8",
border: "#F2E4DA",
text: "#1F2937"
},
radius: {
// ... existing radius tokens ...
card: 16,
...tokens2.radius,
card: 20,
tile: 14,
pill: 999
},
size: {
...tokens2.size,
card: 20
}
// ...
};
var themes3 = {
...themes2,
@@ -4194,56 +4188,53 @@ var themes3 = {
...themes2.light,
primary: tokens3.color.primary,
accent: tokens3.color.accent,
background: "#F1F5F9",
// Slate 100
backgroundHover: "#E2E8F0",
backgroundPress: "#CBD5E1",
background: "#FFF8F5",
backgroundHover: "#FFF1EC",
backgroundPress: "#FFE7E0",
backgroundStrong: tokens3.color.surface,
backgroundTransparent: "rgba(241, 245, 249, 0)",
backgroundTransparent: "rgba(255, 248, 245, 0)",
color: tokens3.color.text,
colorHover: "#1E293B",
colorPress: "#1E293B",
colorFocus: "#1E293B",
colorHover: "#111827",
colorPress: "#0F172A",
colorFocus: "#0F172A",
borderColor: tokens3.color.border,
borderColorHover: "#CBD5E1",
borderColorPress: "#94A3B8",
shadowColor: "rgba(15, 23, 42, 0.08)",
shadowColorPress: "rgba(15, 23, 42, 0.12)",
shadowColorFocus: "rgba(15, 23, 42, 0.12)",
borderColorHover: "#EAD5C9",
borderColorPress: "#E0C9BC",
shadowColor: "rgba(31, 41, 55, 0.12)",
shadowColorPress: "rgba(31, 41, 55, 0.16)",
shadowColorFocus: "rgba(31, 41, 55, 0.18)",
surface: tokens3.color.surface,
muted: tokens3.color.muted,
blue3: tokens3.color.accentSoft,
blue6: "#6366F1",
// Indigo 500
blue6: tokens3.color.accent,
blue10: tokens3.color.primary,
blue11: "#4338CA"
// Indigo 700
blue11: "#C2413B"
},
dark: {
...themes2.dark,
primary: tokens3.color.primary,
accent: tokens3.color.accent,
background: "#0B132B",
backgroundHover: "#101A36",
backgroundPress: "#132142",
backgroundStrong: "#101A36",
backgroundTransparent: "rgba(11, 19, 43, 0)",
color: "#F8FAFF",
background: "#171219",
backgroundHover: "#1F1A23",
backgroundPress: "#26212B",
backgroundStrong: "#1F1A23",
backgroundTransparent: "rgba(23, 18, 25, 0)",
color: "#F8F6F2",
colorHover: "#FFFFFF",
colorPress: "#F2F6FF",
colorPress: "#FDF8F5",
colorFocus: "#FFFFFF",
borderColor: "#1F2A4A",
borderColorHover: "#29345A",
borderColorPress: "#313D67",
borderColor: "#2C2531",
borderColorHover: "#3A3240",
borderColorPress: "#443C4A",
shadowColor: "rgba(0, 0, 0, 0.55)",
shadowColorPress: "rgba(0, 0, 0, 0.65)",
shadowColorFocus: "rgba(0, 0, 0, 0.6)",
surface: "#0F1B36",
muted: "#121F3D",
blue3: "#1B2550",
blue6: "#3D5AFE",
blue10: "#FF5C5C",
blue11: "#FF8A8A"
surface: "#1F1A23",
muted: "#241E28",
blue3: "#2B1D23",
blue6: "#5A2D34",
blue10: "#FF7A7F",
blue11: "#FFB3B6"
}
};
var sharedWeights = {
@@ -4263,12 +4254,12 @@ var fonts2 = {
},
heading: {
...defaultConfig.fonts.heading,
family: "Archivo Black",
family: "Manrope",
weight: sharedWeights
},
display: {
...defaultConfig.fonts.heading,
family: "Archivo Black",
family: "Fraunces",
weight: sharedWeights
}
};

File diff suppressed because it is too large Load Diff

209
AGENTS.md
View File

@@ -129,7 +129,7 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for
## Foundational Context
This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions.
- php - 8.3.6
- php - 8.3.24
- filament/filament (FILAMENT) - v4
- inertiajs/inertia-laravel (INERTIA) - v2
- laravel/framework (LARAVEL) - v12
@@ -151,7 +151,7 @@ This application is a Laravel application and its main Laravel ecosystems packag
- prettier (PRETTIER) - v3
## Conventions
- You must follow all existing code conventions used in this application. When creating or editing a file, check sibling files for the correct structure, approach, and naming.
- You must follow all existing code conventions used in this application. When creating or editing a file, check sibling files for the correct structure, approach, naming.
- Use descriptive names for variables and methods. For example, `isRegisteredForDiscounts`, not `discount()`.
- Check for existing components to reuse before writing a new one.
@@ -159,7 +159,7 @@ This application is a Laravel application and its main Laravel ecosystems packag
- Do not create verification scripts or tinker when tests cover that functionality and prove it works. Unit and feature tests are more important.
## Application Structure & Architecture
- Stick to existing directory structure; don't create new base folders without approval.
- Stick to existing directory structure - don't create new base folders without approval.
- Do not change the application's dependencies without approval.
## Frontend Bundling
@@ -171,16 +171,17 @@ This application is a Laravel application and its main Laravel ecosystems packag
## Documentation Files
- You must only create documentation files if explicitly requested by the user.
=== boost rules ===
## Laravel Boost
- Laravel Boost is an MCP server that comes with powerful tools designed specifically for this application. Use them.
## Artisan
- Use the `list-artisan-commands` tool when you need to call an Artisan command to double-check the available parameters.
- Use the `list-artisan-commands` tool when you need to call an Artisan command to double check the available parameters.
## URLs
- Whenever you share a project URL with the user, you should use the `get-absolute-url` tool to ensure you're using the correct scheme, domain/IP, and port.
- Whenever you share a project URL with the user you should use the `get-absolute-url` tool to ensure you're using the correct scheme, domain / IP, and port.
## Tinker / Debugging
- You should use the `tinker` tool when you need to execute PHP to debug code or query Eloquent models directly.
@@ -191,21 +192,22 @@ This application is a Laravel application and its main Laravel ecosystems packag
- Only recent browser logs will be useful - ignore old logs.
## Searching Documentation (Critically Important)
- Boost comes with a powerful `search-docs` tool you should use before any other approaches when dealing with Laravel or Laravel ecosystem packages. This tool automatically passes a list of installed packages and their versions to the remote Boost API, so it returns only version-specific documentation for the user's circumstance. You should pass an array of packages to filter on if you know you need docs for particular packages.
- The `search-docs` tool is perfect for all Laravel-related packages, including Laravel, Inertia, Livewire, Filament, Tailwind, Pest, Nova, Nightwatch, etc.
- You must use this tool to search for Laravel ecosystem documentation before falling back to other approaches.
- Boost comes with a powerful `search-docs` tool you should use before any other approaches. This tool automatically passes a list of installed packages and their versions to the remote Boost API, so it returns only version-specific documentation specific for the user's circumstance. You should pass an array of packages to filter on if you know you need docs for particular packages.
- The 'search-docs' tool is perfect for all Laravel related packages, including Laravel, Inertia, Livewire, Filament, Tailwind, Pest, Nova, Nightwatch, etc.
- You must use this tool to search for Laravel-ecosystem documentation before falling back to other approaches.
- Search the documentation before making code changes to ensure we are taking the correct approach.
- Use multiple, broad, simple, topic-based queries to start. For example: `['rate limiting', 'routing rate limiting', 'routing']`.
- Do not add package names to queries; package information is already shared. For example, use `test resource table`, not `filament 4 test resource table`.
- Use multiple, broad, simple, topic based queries to start. For example: `['rate limiting', 'routing rate limiting', 'routing']`.
- Do not add package names to queries - package information is already shared. For example, use `test resource table`, not `filament 4 test resource table`.
### Available Search Syntax
- You can and should pass multiple queries at once. The most relevant results will be returned first.
1. Simple Word Searches with auto-stemming - query=authentication - finds 'authenticate' and 'auth'.
2. Multiple Words (AND Logic) - query=rate limit - finds knowledge containing both "rate" AND "limit".
3. Quoted Phrases (Exact Position) - query="infinite scroll" - words must be adjacent and in that order.
4. Mixed Queries - query=middleware "rate limit" - "middleware" AND exact phrase "rate limit".
5. Multiple Queries - queries=["authentication", "middleware"] - ANY of these terms.
1. Simple Word Searches with auto-stemming - query=authentication - finds 'authenticate' and 'auth'
2. Multiple Words (AND Logic) - query=rate limit - finds knowledge containing both "rate" AND "limit"
3. Quoted Phrases (Exact Position) - query="infinite scroll" - Words must be adjacent and in that order
4. Mixed Queries - query=middleware "rate limit" - "middleware" AND exact phrase "rate limit"
5. Multiple Queries - queries=["authentication", "middleware"] - ANY of these terms
=== php rules ===
@@ -216,7 +218,7 @@ This application is a Laravel application and its main Laravel ecosystems packag
### Constructors
- Use PHP 8 constructor property promotion in `__construct()`.
- <code-snippet>public function __construct(public GitHub $github) { }</code-snippet>
- Do not allow empty `__construct()` methods with zero parameters unless the constructor is private.
- Do not allow empty `__construct()` methods with zero parameters.
### Type Declarations
- Always use explicit return type declarations for methods and functions.
@@ -230,7 +232,7 @@ protected function isAccessible(User $user, ?string $path = null): bool
</code-snippet>
## Comments
- Prefer PHPDoc blocks over inline comments. Never use comments within the code itself unless there is something very complex going on.
- Prefer PHPDoc blocks over comments. Never use comments within the code itself unless there is something _very_ complex going on.
## PHPDoc Blocks
- Add useful array shape type definitions for arrays when appropriate.
@@ -238,22 +240,32 @@ protected function isAccessible(User $user, ?string $path = null): bool
## Enums
- Typically, keys in an Enum should be TitleCase. For example: `FavoritePerson`, `BestLake`, `Monthly`.
=== herd rules ===
## Laravel Herd
- The application is served by Laravel Herd and will be available at: https?://[kebab-case-project-dir].test. Use the `get-absolute-url` tool to generate URLs for the user to ensure valid URLs.
- You must not run any commands to make the site available via HTTP(s). It is _always_ available through Laravel Herd.
=== tests rules ===
## Test Enforcement
- Every change must be programmatically tested. Write a new test or update an existing test, then run the affected tests to make sure they pass.
- Run the minimum number of tests needed to ensure code quality and speed. Use `php artisan test --compact` with a specific filename or filter.
- Run the minimum number of tests needed to ensure code quality and speed. Use `php artisan test` with a specific filename or filter.
=== inertia-laravel/core rules ===
## Inertia
## Inertia Core
- Inertia.js components should be placed in the `resources/js/Pages` directory unless specified differently in the JS bundler (`vite.config.js`).
- Inertia.js components should be placed in the `resources/js/pages` directory unless specified differently in the JS bundler (vite.config.js).
- Use `Inertia::render()` for server-side routing instead of traditional Blade views.
- Use the `search-docs` tool for accurate guidance on all things Inertia.
- Use `search-docs` for accurate guidance on all things Inertia.
<code-snippet name="Inertia Render Example" lang="php">
<code-snippet lang="php" name="Inertia::render Example">
// routes/web.php example
Route::get('/users', function () {
return Inertia::render('Users/Index', [
@@ -262,26 +274,28 @@ Route::get('/users', function () {
});
</code-snippet>
=== inertia-laravel/v2 rules ===
## Inertia v2
- Make use of all Inertia features from v1 and v2. Check the documentation before making any changes to ensure we are taking the correct approach.
- Make use of all Inertia features from v1 & v2. Check the documentation before making any changes to ensure we are taking the correct approach.
### Inertia v2 New Features
- Deferred props.
- Infinite scrolling using merging props and `WhenVisible`.
- Lazy loading data on scroll.
- Polling.
- Prefetching.
- Polling
- Prefetching
- Deferred props
- Infinite scrolling using merging props and `WhenVisible`
- Lazy loading data on scroll
### Deferred Props & Empty States
- When using deferred props on the frontend, you should add a nice empty state with pulsing/animated skeleton.
- When using deferred props on the frontend, you should add a nice empty state with pulsing / animated skeleton.
### Inertia Form General Guidance
- The recommended way to build forms when using Inertia is with the `<Form>` component - a useful example is below. Use the `search-docs` tool with a query of `form component` for guidance.
- Forms can also be built using the `useForm` helper for more programmatic control, or to follow existing conventions. Use the `search-docs` tool with a query of `useForm helper` for guidance.
- `resetOnError`, `resetOnSuccess`, and `setDefaultsOnSuccess` are available on the `<Form>` component. Use the `search-docs` tool with a query of `form component resetting` for guidance.
- The recommended way to build forms when using Inertia is with the `<Form>` component - a useful example is below. Use `search-docs` with a query of `form component` for guidance.
- Forms can also be built using the `useForm` helper for more programmatic control, or to follow existing conventions. Use `search-docs` with a query of `useForm helper` for guidance.
- `resetOnError`, `resetOnSuccess`, and `setDefaultsOnSuccess` are available on the `<Form>` component. Use `search-docs` with a query of 'form component resetting' for guidance.
=== laravel/core rules ===
@@ -293,7 +307,7 @@ Route::get('/users', function () {
### Database
- Always use proper Eloquent relationship methods with return type hints. Prefer relationship methods over raw queries or manual joins.
- Use Eloquent models and relationships before suggesting raw database queries.
- Use Eloquent models and relationships before suggesting raw database queries
- Avoid `DB::`; prefer `Model::query()`. Generate code that leverages Laravel's ORM capabilities rather than bypassing them.
- Generate code that prevents N+1 query problems by using eager loading.
- Use Laravel's query builder for very complex database operations.
@@ -328,56 +342,52 @@ Route::get('/users', function () {
### Vite Error
- If you receive an "Illuminate\Foundation\ViteException: Unable to locate file in Vite manifest" error, you can run `npm run build` or ask the user to run `npm run dev` or `composer run dev`.
=== laravel/v12 rules ===
## Laravel 12
- Use the `search-docs` tool to get version-specific documentation.
- Use the `search-docs` tool to get version specific documentation.
- This project upgraded from Laravel 10 without migrating to the new streamlined Laravel file structure.
- This is **perfectly fine** and recommended by Laravel. Follow the existing structure from Laravel 10. We do not need to migrate to the new Laravel structure unless the user explicitly requests it.
- This is **perfectly fine** and recommended by Laravel. Follow the existing structure from Laravel 10. We do not to need migrate to the new Laravel structure unless the user explicitly requests that.
### Laravel 10 Structure
- Middleware typically lives in `app/Http/Middleware/` and service providers in `app/Providers/`.
- There is no `bootstrap/app.php` application configuration in a Laravel 10 structure:
- Middleware registration happens in `app/Http/Kernel.php`
- Exception handling is in `app/Exceptions/Handler.php`
- Console commands and schedule register in `app/Console/Kernel.php`
- Rate limits likely exist in `RouteServiceProvider` or `app/Http/Kernel.php`
### Database
- When modifying a column, the migration must include all of the attributes that were previously defined on the column. Otherwise, they will be dropped and lost.
- Laravel 12 allows limiting eagerly loaded records natively, without external packages: `$query->latest()->limit(10);`.
- Laravel 11 allows limiting eagerly loaded records natively, without external packages: `$query->latest()->limit(10);`.
### Models
- Casts can and likely should be set in a `casts()` method on a model rather than the `$casts` property. Follow existing conventions from other models.
=== wayfinder/core rules ===
## Laravel Wayfinder
Wayfinder generates TypeScript functions and types for Laravel controllers and routes which you can import into your client-side code. It provides type safety and automatic synchronization between backend routes and frontend code.
Wayfinder generates TypeScript functions and types for Laravel controllers and routes which you can import into your client side code. It provides type safety and automatic synchronization between backend routes and frontend code.
### Development Guidelines
- Always use the `search-docs` tool to check Wayfinder correct usage before implementing any features.
- Always prefer named imports for tree-shaking (e.g., `import { show } from '@/actions/...'`).
- Avoid default controller imports (prevents tree-shaking).
- Run `php artisan wayfinder:generate` after route changes if Vite plugin isn't installed.
- Always use `search-docs` to check wayfinder correct usage before implementing any features.
- Always Prefer named imports for tree-shaking (e.g., `import { show } from '@/actions/...'`)
- Avoid default controller imports (prevents tree-shaking)
- Run `php artisan wayfinder:generate` after route changes if Vite plugin isn't installed
### Feature Overview
- Form Support: Use `.form()` with `--with-form` flag for HTML form attributes — `<form {...store.form()}>``action="/posts" method="post"`.
- HTTP Methods: Call `.get()`, `.post()`, `.patch()`, `.put()`, `.delete()` for specific methods — `show.head(1)``{ url: "/posts/1", method: "head" }`.
- Invokable Controllers: Import and invoke directly as functions. For example, `import StorePost from '@/actions/.../StorePostController'; StorePost()`.
- Named Routes: Import from `@/routes/` for non-controller routes. For example, `import { show } from '@/routes/post'; show(1)` for route name `post.show`.
- Parameter Binding: Detects route keys (e.g., `{post:slug}`) and accepts matching object properties — `show("my-post")` or `show({ slug: "my-post" })`.
- Query Merging: Use `mergeQuery` to merge with `window.location.search`, set values to `null` to remove — `show(1, { mergeQuery: { page: 2, sort: null } })`.
- Query Parameters: Pass `{ query: {...} }` in options to append params — `show(1, { query: { page: 1 } })``"/posts/1?page=1"`.
- Route Objects: Functions return `{ url, method }` shaped objects — `show(1)``{ url: "/posts/1", method: "get" }`.
- URL Extraction: Use `.url()` to get URL string — `show.url(1)``"/posts/1"`.
- Form Support: Use `.form()` with `--with-form` flag for HTML form attributes — `<form {...store.form()}>``action="/posts" method="post"`
- HTTP Methods: Call `.get()`, `.post()`, `.patch()`, `.put()`, `.delete()` for specific methods — `show.head(1)``{ url: "/posts/1", method: "head" }`
- Invokable Controllers: Import and invoke directly as functions. For example, `import StorePost from '@/actions/.../StorePostController'; StorePost()`
- Named Routes: Import from `@/routes/` for non-controller routes. For example, `import { show } from '@/routes/post'; show(1)` for route name `post.show`
- Parameter Binding: Detects route keys (e.g., `{post:slug}`) and accepts matching object properties — `show("my-post")` or `show({ slug: "my-post" })`
- Query Merging: Use `mergeQuery` to merge with `window.location.search`, set values to `null` to remove — `show(1, { mergeQuery: { page: 2, sort: null } })`
- Query Parameters: Pass `{ query: {...} }` in options to append params — `show(1, { query: { page: 1 } })``"/posts/1?page=1"`
- Route Objects: Functions return `{ url, method }` shaped objects — `show(1)``{ url: "/posts/1", method: "get" }`
- URL Extraction: Use `.url()` to get URL string — `show.url(1)``"/posts/1"`
### Example Usage
<code-snippet name="Wayfinder Basic Usage" lang="typescript">
// Import controller methods (tree-shakable)...
// Import controller methods (tree-shakable)
import { show, store, update } from '@/actions/App/Http/Controllers/PostController'
// Get route object with URL and method...
@@ -395,6 +405,7 @@ Wayfinder generates TypeScript functions and types for Laravel controllers and r
postShow(1) // { url: "/posts/1", method: "get" }
</code-snippet>
### Wayfinder + Inertia
If your application uses the `<Form>` component from Inertia, you can use Wayfinder to generate form action and method automatically.
<code-snippet name="Wayfinder Form Component (React)" lang="typescript">
@@ -403,14 +414,14 @@ If your application uses the `<Form>` component from Inertia, you can use Wayfin
</code-snippet>
=== livewire/core rules ===
## Livewire
- Use the `search-docs` tool to find exact version-specific documentation for how to write Livewire and Livewire tests.
- Use the `php artisan make:livewire [Posts\CreatePost]` Artisan command to create new components.
## Livewire Core
- Use the `search-docs` tool to find exact version specific documentation for how to write Livewire & Livewire tests.
- Use the `php artisan make:livewire [Posts\CreatePost]` artisan command to create new components
- State should live on the server, with the UI reflecting it.
- All Livewire requests hit the Laravel backend; they're like regular HTTP requests. Always validate form data and run authorization checks in Livewire actions.
- All Livewire requests hit the Laravel backend, they're like regular HTTP requests. Always validate form data, and run authorization checks in Livewire actions.
## Livewire Best Practices
- Livewire components require a single root element.
@@ -427,14 +438,15 @@ If your application uses the `<Form>` component from Inertia, you can use Wayfin
- Prefer lifecycle hooks like `mount()`, `updatedFoo()` for initialization and reactive side effects:
<code-snippet name="Lifecycle Hook Examples" lang="php">
<code-snippet name="Lifecycle hook examples" lang="php">
public function mount(User $user) { $this->user = $user; }
public function updatedSearch() { $this->resetPage(); }
</code-snippet>
## Testing Livewire
<code-snippet name="Example Livewire Component Test" lang="php">
<code-snippet name="Example Livewire component test" lang="php">
Livewire::test(Counter::class)
->assertSet('count', 0)
->call('increment')
@@ -443,17 +455,19 @@ If your application uses the `<Form>` component from Inertia, you can use Wayfin
->assertStatus(200);
</code-snippet>
<code-snippet name="Testing Livewire Component Exists on Page" lang="php">
$this->get('/posts/create')
->assertSeeLivewire(CreatePost::class);
</code-snippet>
<code-snippet name="Testing a Livewire component exists within a page" lang="php">
$this->get('/posts/create')
->assertSeeLivewire(CreatePost::class);
</code-snippet>
=== livewire/v3 rules ===
## Livewire 3
### Key Changes From Livewire 2
- These things changed in Livewire 3, but may not have been updated in this application. Verify this application's setup to ensure you conform with application conventions.
- These things changed in Livewire 2, but may not have been updated in this application. Verify this application's setup to ensure you conform with application conventions.
- Use `wire:model.live` for real-time updates, `wire:model` is now deferred by default.
- Components now use the `App\Livewire` namespace (not `App\Http\Livewire`).
- Use `$this->dispatch()` to dispatch events (not `emit` or `dispatchBrowserEvent`).
@@ -463,13 +477,13 @@ If your application uses the `<Form>` component from Inertia, you can use Wayfin
- `wire:show`, `wire:transition`, `wire:cloak`, `wire:offline`, `wire:target` are available for use. Use the documentation to find usage examples.
### Alpine
- Alpine is now included with Livewire; don't manually include Alpine.js.
- Alpine is now included with Livewire, don't manually include Alpine.js.
- Plugins included with Alpine: persist, intersect, collapse, and focus.
### Lifecycle Hooks
- You can listen for `livewire:init` to hook into Livewire initialization, and `fail.status === 419` for the page expiring:
<code-snippet name="Livewire Init Hook Example" lang="js">
<code-snippet name="livewire:load example" lang="js">
document.addEventListener('livewire:init', function () {
Livewire.hook('request', ({ fail }) => {
if (fail && fail.status === 419) {
@@ -483,6 +497,7 @@ document.addEventListener('livewire:init', function () {
});
</code-snippet>
=== pint/core rules ===
## Laravel Pint Code Formatter
@@ -490,22 +505,24 @@ document.addEventListener('livewire:init', function () {
- You must run `vendor/bin/pint --dirty` before finalizing changes to ensure your code matches the project's expected style.
- Do not run `vendor/bin/pint --test`, simply run `vendor/bin/pint` to fix any formatting issues.
=== phpunit/core rules ===
## PHPUnit
## PHPUnit Core
- This application uses PHPUnit for testing. All tests must be written as PHPUnit classes. Use `php artisan make:test --phpunit {name}` to create a new test.
- If you see a test using "Pest", convert it to PHPUnit.
- Every time a test has been updated, run that singular test.
- When the tests relating to your feature are passing, ask the user if they would like to also run the entire test suite to make sure everything is still passing.
- Tests should test all of the happy paths, failure paths, and weird paths.
- You must not remove any tests or test files from the tests directory without approval. These are not temporary or helper files; these are core to the application.
- You must not remove any tests or test files from the tests directory without approval. These are not temporary or helper files, these are core to the application.
### Running Tests
- Run the minimal number of tests, using an appropriate filter, before finalizing.
- To run all tests: `php artisan test --compact`.
- To run all tests in a file: `php artisan test --compact tests/Feature/ExampleTest.php`.
- To filter on a particular test name: `php artisan test --compact --filter=testName` (recommended after making a change to a related file).
- To run all tests: `php artisan test`.
- To run all tests in a file: `php artisan test tests/Feature/ExampleTest.php`.
- To filter on a particular test name: `php artisan test --filter=testName` (recommended after making a change to a related file).
=== inertia-react/core rules ===
@@ -520,9 +537,10 @@ import { Link } from '@inertiajs/react'
</code-snippet>
=== inertia-react/v2/forms rules ===
## Inertia v2 + React Forms
## Inertia + React Forms
<code-snippet name="`<Form>` Component Example" lang="react">
@@ -557,37 +575,39 @@ export default () => (
</code-snippet>
=== tailwindcss/core rules ===
## Tailwind CSS
## Tailwind Core
- Use Tailwind CSS classes to style HTML; check and use existing Tailwind conventions within the project before writing your own.
- Offer to extract repeated patterns into components that match the project's conventions (i.e. Blade, JSX, Vue, etc.).
- Think through class placement, order, priority, and defaults. Remove redundant classes, add classes to parent or child carefully to limit repetition, and group elements logically.
- Use Tailwind CSS classes to style HTML, check and use existing tailwind conventions within the project before writing your own.
- Offer to extract repeated patterns into components that match the project's conventions (i.e. Blade, JSX, Vue, etc..)
- Think through class placement, order, priority, and defaults - remove redundant classes, add classes to parent or child carefully to limit repetition, group elements logically
- You can use the `search-docs` tool to get exact examples from the official documentation when needed.
### Spacing
- When listing items, use gap utilities for spacing; don't use margins.
- When listing items, use gap utilities for spacing, don't use margins.
<code-snippet name="Valid Flex Gap Spacing Example" lang="html">
<div class="flex gap-8">
<div>Superior</div>
<div>Michigan</div>
<div>Erie</div>
</div>
</code-snippet>
<code-snippet name="Valid Flex Gap Spacing Example" lang="html">
<div class="flex gap-8">
<div>Superior</div>
<div>Michigan</div>
<div>Erie</div>
</div>
</code-snippet>
### Dark Mode
- If existing pages and components support dark mode, new pages and components must support dark mode in a similar way, typically using `dark:`.
=== tailwindcss/v4 rules ===
## Tailwind CSS 4
## Tailwind 4
- Always use Tailwind CSS v4; do not use the deprecated utilities.
- Always use Tailwind CSS v4 - do not use the deprecated utilities.
- `corePlugins` is not supported in Tailwind v4.
- In Tailwind v4, configuration is CSS-first using the `@theme` directive — no separate `tailwind.config.js` file is needed.
<code-snippet name="Extending Theme in CSS" lang="css">
@theme {
--color-brand: oklch(0.72 0.11 178);
@@ -603,8 +623,9 @@ export default () => (
+ @import "tailwindcss";
</code-snippet>
### Replaced Utilities
- Tailwind v4 removed deprecated utilities. Do not use the deprecated option; use the replacement.
- Tailwind v4 removed deprecated utilities. Do not use the deprecated option - use the replacement.
- Opacity values are still numeric.
| Deprecated | Replacement |

View File

@@ -26,7 +26,7 @@ class SeedDemoSwitcherTenants extends Command
{
protected $signature = 'demo:seed-switcher {--with-photos : Download sample photos from Pexels} {--photos-per-event=18 : Target photos per event when downloading} {--cleanup : Remove demo switcher tenants/events/photos instead of seeding}';
protected $description = 'Seeds demo tenants used by the DevTenantSwitcher (endcustomer + partner profiles)';
protected $description = 'Seeds demo tenants used by the DevTenantSwitcher (endcustomer + reseller profiles)';
public function __construct(private EventStorageManager $eventStorageManager)
{
@@ -52,7 +52,7 @@ class SeedDemoSwitcherTenants extends Command
DB::transaction(function () use ($packages, $eventTypes) {
$this->seedCustomerStandardEmpty($packages, $eventTypes);
$this->seedCustomerStandardWedding($packages, $eventTypes);
$this->seedCustomerStarterWedding($packages, $eventTypes);
$this->seedResellerActive($packages, $eventTypes);
$this->seedResellerFull($packages, $eventTypes);
});
@@ -129,7 +129,7 @@ class SeedDemoSwitcherTenants extends Command
$slugs = [
'starter' => 'Starter',
'standard' => 'Standard',
's-small-reseller' => 'Partner Start',
's-small-reseller' => 'Reseller S',
];
$packages = [];
@@ -165,10 +165,10 @@ class SeedDemoSwitcherTenants extends Command
{
$tenant = $this->upsertTenant(
slug: 'demo-standard-empty',
name: 'Demo Starter (ohne Event)',
name: 'Demo Standard (ohne Event)',
contactEmail: 'standard-empty@demo.fotospiel',
attributes: [
'subscription_tier' => 'starter',
'subscription_tier' => 'standard',
'subscription_status' => 'active',
],
);
@@ -176,9 +176,9 @@ class SeedDemoSwitcherTenants extends Command
$this->upsertAdmin($tenant, 'standard-empty@demo.fotospiel');
TenantPackage::updateOrCreate(
['tenant_id' => $tenant->id, 'package_id' => $packages['starter']->id],
['tenant_id' => $tenant->id, 'package_id' => $packages['standard']->id],
[
'price' => $packages['starter']->price,
'price' => $packages['standard']->price,
'purchased_at' => Carbon::now()->subDays(1),
'expires_at' => Carbon::now()->addMonths(12),
'used_events' => 0,
@@ -186,17 +186,17 @@ class SeedDemoSwitcherTenants extends Command
]
);
$this->comment('Seeded Starter tenant without events.');
$this->comment('Seeded Standard tenant without events.');
}
private function seedCustomerStandardWedding(array $packages, array $eventTypes): void
private function seedCustomerStarterWedding(array $packages, array $eventTypes): void
{
$tenant = $this->upsertTenant(
slug: 'demo-starter-wedding',
name: 'Demo Standard Wedding',
name: 'Demo Starter Wedding',
contactEmail: 'starter-wedding@demo.fotospiel',
attributes: [
'subscription_tier' => 'standard',
'subscription_tier' => 'starter',
'subscription_status' => 'active',
],
);
@@ -209,7 +209,7 @@ class SeedDemoSwitcherTenants extends Command
'price' => $packages['standard']->price,
'purchased_at' => Carbon::now()->subDays(1),
'expires_at' => Carbon::now()->addMonths(12),
'used_events' => 1,
'used_events' => 0,
'active' => true,
]
);
@@ -232,18 +232,17 @@ class SeedDemoSwitcherTenants extends Command
private function seedResellerActive(array $packages, array $eventTypes): void
{
$eventPackage = $this->resolveIncludedPackage($packages['s-small-reseller'], $packages);
$tenant = $this->upsertTenant(
slug: 'demo-reseller-active',
name: 'Demo Partner Active',
contactEmail: 'partner-active@demo.fotospiel',
name: 'Demo Reseller Active',
contactEmail: 'reseller-active@demo.fotospiel',
attributes: [
'subscription_tier' => 'reseller',
'subscription_status' => 'active',
],
);
$this->upsertAdmin($tenant, 'partner-active@demo.fotospiel');
$this->upsertAdmin($tenant, 'reseller-active@demo.fotospiel');
TenantPackage::updateOrCreate(
['tenant_id' => $tenant->id, 'package_id' => $packages['s-small-reseller']->id],
@@ -280,7 +279,7 @@ class SeedDemoSwitcherTenants extends Command
foreach ($events as $index => $config) {
$event = $this->upsertEvent(
tenant: $tenant,
package: $eventPackage,
package: $packages['standard'],
eventType: $config['type'],
attributes: [
'name' => $config['name'],
@@ -297,18 +296,17 @@ class SeedDemoSwitcherTenants extends Command
private function seedResellerFull(array $packages, array $eventTypes): void
{
$eventPackage = $this->resolveIncludedPackage($packages['s-small-reseller'], $packages);
$tenant = $this->upsertTenant(
slug: 'demo-reseller-full',
name: 'Demo Partner Voll',
contactEmail: 'partner-full@demo.fotospiel',
name: 'Demo Reseller Voll',
contactEmail: 'reseller-full@demo.fotospiel',
attributes: [
'subscription_tier' => 'reseller',
'subscription_status' => 'active',
],
);
$this->upsertAdmin($tenant, 'partner-full@demo.fotospiel');
$this->upsertAdmin($tenant, 'reseller-full@demo.fotospiel');
TenantPackage::updateOrCreate(
['tenant_id' => $tenant->id, 'package_id' => $packages['s-small-reseller']->id],
@@ -332,7 +330,7 @@ class SeedDemoSwitcherTenants extends Command
foreach ($eventConfigs as $index => $config) {
$event = $this->upsertEvent(
tenant: $tenant,
package: $eventPackage,
package: $packages['standard'],
eventType: $config['type'],
attributes: [
'name' => $config['name'],
@@ -359,8 +357,8 @@ class SeedDemoSwitcherTenants extends Command
'settings' => [
'branding' => [
'logo_url' => null,
'primary_color' => '#FF5A5F',
'secondary_color' => '#FFF8F5',
'primary_color' => '#1D4ED8',
'secondary_color' => '#0F172A',
'font_family' => 'Inter, sans-serif',
],
'features' => [
@@ -437,19 +435,6 @@ class SeedDemoSwitcherTenants extends Command
return $event;
}
private function resolveIncludedPackage(Package $resellerPackage, array $packages): Package
{
$includedSlug = $resellerPackage->included_package_slug;
if ($includedSlug && isset($packages[$includedSlug])) {
return $packages[$includedSlug];
}
$fallback = $packages['starter'] ?? $packages['standard'] ?? null;
return $fallback ?? $resellerPackage;
}
private function fallbackEventType(): ?EventType
{
$fallback = EventType::first();

View File

@@ -143,7 +143,7 @@ class PackageResource extends Resource
->nullable()
->visible(fn ($get) => $get('type') === 'reseller'),
Toggle::make('watermark_allowed')
->label('Eigenes Wasserzeichen erlaubt')
->label('Wasserzeichen erlaubt')
->default(true),
Toggle::make('branding_allowed')
->label('Eigenes Branding erlaubt')

View File

@@ -27,7 +27,7 @@ class WatermarkSettingsPage extends Page
return __('admin.nav.branding');
}
public $asset = [];
public ?string $asset = null;
public string $position = 'bottom-right';
@@ -46,7 +46,7 @@ class WatermarkSettingsPage extends Page
$settings = WatermarkSetting::query()->first();
if ($settings) {
$this->asset = $settings->asset ? [$settings->asset] : [];
$this->asset = $settings->asset;
$this->position = $settings->position;
$this->opacity = (float) $settings->opacity;
$this->scale = (float) $settings->scale;
@@ -119,14 +119,8 @@ class WatermarkSettingsPage extends Page
{
$this->validate();
$state = $this->form->getState();
$asset = $state['asset'] ?? $this->asset;
if (is_array($asset)) {
$asset = $asset[0] ?? null;
}
$settings = WatermarkSetting::query()->firstOrNew([]);
$settings->asset = $asset;
$settings->asset = $this->asset;
$settings->position = $this->position;
$settings->opacity = $this->opacity;
$settings->scale = $this->scale;

View File

@@ -1025,10 +1025,10 @@ class EventPublicController extends BaseController
private function resolveBrandingPayload(Event $event): array
{
$defaults = [
'primary' => '#FF5A5F',
'secondary' => '#FFF8F5',
'background' => '#FFF8F5',
'surface' => '#FFF8F5',
'primary' => '#f43f5e',
'secondary' => '#fb7185',
'background' => '#ffffff',
'surface' => '#ffffff',
'font' => null,
'size' => 'm',
'logo_position' => 'left',
@@ -1298,7 +1298,7 @@ class EventPublicController extends BaseController
);
}
$diskName = 'public';
$diskName = config('filesystems.default', 'public');
try {
$storage = Storage::disk($diskName);

View File

@@ -277,13 +277,13 @@ class PackageController extends Controller
'purchased_at' => now(),
]);
} else {
// Partner / reseller Event-Kontingent package
// Reseller subscription
\App\Models\TenantPackage::create([
'tenant_id' => $tenant->id,
'package_id' => $package->id,
'price' => $package->price,
'purchased_at' => now(),
'expires_at' => null,
'expires_at' => now()->addYear(),
'active' => true,
]);
}

View File

@@ -4,7 +4,6 @@ namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Http\Requests\Photobooth\PhotoboothConnectRedeemRequest;
use App\Models\Event;
use App\Services\Photobooth\PhotoboothConnectCodeService;
use Illuminate\Http\JsonResponse;
@@ -34,8 +33,7 @@ class PhotoboothConnectController extends Controller
return response()->json([
'data' => [
'event_name' => $this->resolveEventName($event),
'upload_url' => route('api.v1.photobooth.upload'),
'upload_url' => route('api.v1.photobooth.sparkbooth.upload'),
'username' => $setting->username,
'password' => $setting->password,
'expires_at' => optional($setting->expires_at)->toIso8601String(),
@@ -44,27 +42,4 @@ class PhotoboothConnectController extends Controller
],
]);
}
private function resolveEventName(?Event $event): ?string
{
if (! $event) {
return null;
}
$name = $event->name;
if (is_string($name) && trim($name) !== '') {
return $name;
}
if (is_array($name)) {
foreach ($name as $value) {
if (is_string($value) && trim($value) !== '') {
return $value;
}
}
}
return $event->slug ?: null;
}
}

View File

@@ -19,8 +19,6 @@ use App\Models\Tenant;
use App\Models\User;
use App\Services\EventJoinTokenService;
use App\Support\ApiError;
use App\Support\TenantMemberPermissions;
use App\Support\WatermarkConfigResolver;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
@@ -85,8 +83,6 @@ class EventController extends Controller
public function store(EventStoreRequest $request): JsonResponse
{
TenantMemberPermissions::ensureTenantPermission($request, 'events:manage');
$tenant = $request->attributes->get('tenant');
if (! $tenant instanceof Tenant) {
$tenantId = $request->attributes->get('tenant_id');
@@ -103,9 +99,6 @@ class EventController extends Controller
$requestedPackageId = $isSuperAdmin ? $request->integer('package_id') : null;
unset($validated['package_id']);
$requestedServiceSlug = $request->input('service_package_slug');
$requestedServiceSlug = is_string($requestedServiceSlug) && $requestedServiceSlug !== '' ? $requestedServiceSlug : null;
unset($validated['service_package_slug']);
$tenantPackage = $tenant->tenantPackages()
->with('package')
@@ -123,18 +116,6 @@ class EventController extends Controller
$package = $this->resolveOwnerPackage();
}
$billingTenantPackage = null;
if (! $package) {
$billingTenantPackage = $requestedServiceSlug
? $tenant->getActiveResellerPackageFor($requestedServiceSlug)
: $tenant->getActiveResellerPackage();
if ($billingTenantPackage && $billingTenantPackage->package) {
$package = $billingTenantPackage->package;
$requestedServiceSlug = $requestedServiceSlug ?: $package->included_package_slug;
}
}
if (! $package && $tenantPackage) {
$package = $tenantPackage->package ?? Package::query()->find($tenantPackage->package_id);
}
@@ -145,11 +126,6 @@ class EventController extends Controller
]);
}
$billingIsReseller = $package->isReseller();
$eventServicePackage = $billingIsReseller
? $this->resolveResellerEventPackageForSlug($requestedServiceSlug ?: $package->included_package_slug)
: $package;
$requiresWaiver = $package->isEndcustomer();
$latestPurchase = $requiresWaiver ? $this->resolveLatestPackagePurchase($tenant, $package) : null;
$existingWaiver = $latestPurchase ? data_get($latestPurchase->metadata, 'consents.digital_content_waiver_at') : null;
@@ -185,8 +161,8 @@ class EventController extends Controller
unset($eventData['features']);
}
$settings['branding_allowed'] = $eventServicePackage->branding_allowed !== false;
$settings['watermark_allowed'] = $eventServicePackage->watermark_allowed !== false;
$settings['branding_allowed'] = $package->branding_allowed !== false;
$settings['watermark_allowed'] = $package->watermark_allowed !== false;
$eventData['settings'] = $settings;
@@ -214,23 +190,21 @@ class EventController extends Controller
$eventData = Arr::only($eventData, $allowed);
$event = DB::transaction(function () use ($tenant, $eventData, $eventServicePackage, $billingIsReseller, $isSuperAdmin) {
$event = DB::transaction(function () use ($tenant, $eventData, $package, $isSuperAdmin) {
$event = Event::create($eventData);
EventPackage::create([
'event_id' => $event->id,
'package_id' => $eventServicePackage->id,
'purchased_price' => $billingIsReseller ? 0 : $eventServicePackage->price,
'package_id' => $package->id,
'purchased_price' => $package->price,
'purchased_at' => now(),
'gallery_expires_at' => $eventServicePackage->gallery_days
? now()->addDays($eventServicePackage->gallery_days)
: null,
'gallery_expires_at' => $package->gallery_days ? now()->addDays($package->gallery_days) : null,
]);
if ($billingIsReseller && ! $isSuperAdmin) {
if ($package->isReseller() && ! $isSuperAdmin) {
$note = sprintf('Event #%d created (%s)', $event->id, $event->name);
if (! $tenant->consumeEventAllowanceFor($eventServicePackage->slug, 1, 'event.create', $note)) {
if (! $tenant->consumeEventAllowance(1, 'event.create', $note)) {
throw new HttpException(402, 'Insufficient package allowance.');
}
}
@@ -253,47 +227,6 @@ class EventController extends Controller
], 201);
}
private function resolveResellerDefaultEventPackage(): Package
{
return $this->resolveResellerEventPackageForSlug('standard');
}
private function resolveResellerEventPackageForSlug(?string $slug): Package
{
if (is_string($slug) && $slug !== '') {
$match = Package::query()
->where('type', 'endcustomer')
->where('slug', $slug)
->first();
if ($match) {
return $match;
}
}
$default = Package::query()
->where('type', 'endcustomer')
->where('slug', 'standard')
->first();
if ($default) {
return $default;
}
$fallback = Package::query()
->where('type', 'endcustomer')
->orderBy('price')
->first();
if (! $fallback) {
throw ValidationException::withMessages([
'package_id' => __('Aktuell ist kein Endkunden-Paket verfügbar. Bitte kontaktiere den Support.'),
]);
}
return $fallback;
}
private function resolveLatestPackagePurchase(Tenant $tenant, Package $package): ?PackagePurchase
{
return PackagePurchase::query()
@@ -387,24 +320,14 @@ class EventController extends Controller
);
}
TenantMemberPermissions::ensureEventPermission($request, $event, 'events:manage');
$validated = $request->validated();
$nameProvided = array_key_exists('name', $validated);
$validated = array_merge([
'name' => $event->name,
'event_type_id' => $event->event_type_id,
'event_date' => $event->date?->toDateString(),
'status' => $event->status,
], $validated);
if (isset($validated['event_date'])) {
$validated['date'] = $validated['event_date'];
unset($validated['event_date']);
}
if ($nameProvided && $validated['name'] !== $event->name) {
if ($validated['name'] !== $event->name) {
$validated['slug'] = $this->generateUniqueSlug($validated['name'], $tenantId, $event->id);
}
@@ -415,7 +338,6 @@ class EventController extends Controller
$package = $event->eventPackage?->package;
$brandingAllowed = optional($package)->branding_allowed !== false;
$watermarkAllowed = optional($package)->watermark_allowed !== false;
$watermarkRemovalAllowed = WatermarkConfigResolver::determineRemovalAllowed($event);
if (isset($validated['settings']) && is_array($validated['settings'])) {
$validated['settings'] = array_merge($event->settings ?? [], $validated['settings']);
@@ -425,37 +347,32 @@ class EventController extends Controller
$validated['settings']['branding_allowed'] = $brandingAllowed;
$validated['settings']['watermark_allowed'] = $watermarkAllowed;
$validated['settings']['watermark_removal_allowed'] = $watermarkRemovalAllowed;
$settings = $validated['settings'];
$branding = Arr::get($settings, 'branding', []);
$watermark = Arr::get($settings, 'watermark', []);
$existingWatermark = is_array($watermark) ? $watermark : [];
if (is_array($branding)) {
$settings['branding'] = $this->normalizeBrandingSettings($branding, $event, $brandingAllowed);
}
if (is_array($watermark)) {
$mode = $watermark['mode'] ?? 'base';
$policy = $watermarkAllowed ? 'basic' : 'none';
if (! $watermarkAllowed) {
$mode = 'base';
$mode = 'off';
} elseif (! $brandingAllowed) {
$mode = 'base';
} elseif ($mode === 'off' && ! $watermarkRemovalAllowed) {
} elseif ($mode === 'off' && $policy === 'basic') {
$mode = 'base';
}
$assetPath = $watermark['asset'] ?? null;
$assetDataUrl = $watermark['asset_data_url'] ?? null;
if (! $watermarkAllowed || $mode === 'off') {
if (! $watermarkAllowed) {
$assetPath = null;
}
if ($assetDataUrl && $mode === 'custom' && $brandingAllowed) {
if (! preg_match('/^data:image\\/(png|webp|jpe?g|svg\\+xml);base64,(.+)$/i', $assetDataUrl, $matches)) {
if (! preg_match('/^data:image\\/(png|webp|jpe?g);base64,(.+)$/i', $assetDataUrl, $matches)) {
throw ValidationException::withMessages([
'settings.watermark.asset_data_url' => __('Ungültiges Wasserzeichen-Bild.'),
]);
@@ -475,12 +392,7 @@ class EventController extends Controller
]);
}
$mime = strtolower($matches[1]);
$extension = match (true) {
str_starts_with($mime, 'jp') => 'jpg',
str_starts_with($mime, 'svg') => 'svg',
default => $mime,
};
$extension = str_starts_with(strtolower($matches[1]), 'jp') ? 'jpg' : strtolower($matches[1]);
$path = sprintf('branding/watermarks/event-%s.%s', $event->id, $extension);
Storage::disk('public')->put($path, $decoded);
$assetPath = $path;
@@ -530,68 +442,6 @@ class EventController extends Controller
]);
}
/**
* @param array<string, mixed> $branding
* @return array<string, mixed>
*/
private function normalizeBrandingSettings(array $branding, Event $event, bool $brandingAllowed): array
{
$logoDataUrl = $branding['logo_data_url'] ?? null;
if (! $brandingAllowed) {
unset($branding['logo_data_url']);
return $branding;
}
if (! is_string($logoDataUrl) || trim($logoDataUrl) === '') {
unset($branding['logo_data_url']);
return $branding;
}
if (! preg_match('/^data:image\\/(png|webp|jpe?g);base64,(.+)$/i', $logoDataUrl, $matches)) {
throw ValidationException::withMessages([
'settings.branding.logo_data_url' => __('Ungültiges Branding-Logo.'),
]);
}
$decoded = base64_decode($matches[2], true);
if ($decoded === false) {
throw ValidationException::withMessages([
'settings.branding.logo_data_url' => __('Branding-Logo konnte nicht gelesen werden.'),
]);
}
if (strlen($decoded) > 1024 * 1024) { // 1 MB
throw ValidationException::withMessages([
'settings.branding.logo_data_url' => __('Branding-Logo ist zu groß (max. 1 MB).'),
]);
}
$extension = str_starts_with(strtolower($matches[1]), 'jp') ? 'jpg' : strtolower($matches[1]);
$path = sprintf('branding/logos/event-%s.%s', $event->id, $extension);
Storage::disk('public')->put($path, $decoded);
$branding['logo_url'] = $path;
$branding['logo_mode'] = 'upload';
$branding['logo_value'] = $path;
$logo = $branding['logo'] ?? [];
if (! is_array($logo)) {
$logo = [];
}
$logo['mode'] = 'upload';
$logo['value'] = $path;
$branding['logo'] = $logo;
unset($branding['logo_data_url']);
return $branding;
}
public function destroy(Request $request, Event $event): JsonResponse
{
$tenantId = $request->attributes->get('tenant_id');
@@ -606,8 +456,6 @@ class EventController extends Controller
);
}
TenantMemberPermissions::ensureEventPermission($request, $event, 'events:manage');
$event->delete();
return response()->json([

View File

@@ -11,7 +11,6 @@ use App\Models\Event;
use App\Models\GuestNotification;
use App\Models\GuestPolicySetting;
use App\Services\GuestNotificationService;
use App\Support\TenantMemberPermissions;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
@@ -24,7 +23,6 @@ class EventGuestNotificationController extends Controller
public function index(Request $request, Event $event): JsonResponse
{
$this->assertEventTenant($request, $event);
TenantMemberPermissions::ensureEventPermission($request, $event, 'guest-notifications:manage');
$limit = max(1, min(100, (int) $request->integer('limit', 25)));
@@ -40,7 +38,6 @@ class EventGuestNotificationController extends Controller
public function store(BroadcastGuestNotificationRequest $request, Event $event): JsonResponse
{
$this->assertEventTenant($request, $event);
TenantMemberPermissions::ensureEventPermission($request, $event, 'guest-notifications:manage');
$data = $request->validated();

View File

@@ -7,7 +7,6 @@ use App\Http\Resources\Tenant\EventJoinTokenResource;
use App\Models\Event;
use App\Models\EventJoinToken;
use App\Services\EventJoinTokenService;
use App\Support\TenantMemberPermissions;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
@@ -20,7 +19,7 @@ class EventJoinTokenController extends Controller
public function index(Request $request, Event $event): AnonymousResourceCollection
{
$this->authorizeEvent($request, $event, 'join-tokens:manage');
$this->authorizeEvent($request, $event);
$tokens = $event->joinTokens()
->orderByDesc('created_at')
@@ -31,7 +30,7 @@ class EventJoinTokenController extends Controller
public function store(Request $request, Event $event): JsonResponse
{
$this->authorizeEvent($request, $event, 'join-tokens:manage');
$this->authorizeEvent($request, $event);
$validated = $this->validatePayload($request);
@@ -46,7 +45,7 @@ class EventJoinTokenController extends Controller
public function update(Request $request, Event $event, EventJoinToken $joinToken): EventJoinTokenResource
{
$this->authorizeEvent($request, $event, 'join-tokens:manage');
$this->authorizeEvent($request, $event);
if ($joinToken->event_id !== $event->id) {
abort(404);
@@ -90,7 +89,7 @@ class EventJoinTokenController extends Controller
public function destroy(Request $request, Event $event, EventJoinToken $joinToken): EventJoinTokenResource
{
$this->authorizeEvent($request, $event, 'join-tokens:manage');
$this->authorizeEvent($request, $event);
if ($joinToken->event_id !== $event->id) {
abort(404);
@@ -102,17 +101,13 @@ class EventJoinTokenController extends Controller
return new EventJoinTokenResource($token);
}
private function authorizeEvent(Request $request, Event $event, ?string $permission = null): void
private function authorizeEvent(Request $request, Event $event): void
{
$tenantId = $request->attributes->get('tenant_id');
if ($event->tenant_id !== $tenantId) {
abort(404, 'Event not found');
}
if ($permission) {
TenantMemberPermissions::ensureEventPermission($request, $event, $permission);
}
}
private function validatePayload(Request $request, bool $partial = false): array

View File

@@ -6,7 +6,6 @@ use App\Http\Controllers\Controller;
use App\Models\Event;
use App\Models\EventJoinToken;
use App\Support\JoinTokenLayoutRegistry;
use App\Support\TenantMemberPermissions;
use Dompdf\Dompdf;
use Dompdf\Options;
use Illuminate\Http\Request;
@@ -29,7 +28,6 @@ class EventJoinTokenLayoutController extends Controller
public function index(Request $request, Event $event, EventJoinToken $joinToken)
{
$this->ensureBelongsToEvent($event, $joinToken);
TenantMemberPermissions::ensureEventPermission($request, $event, 'join-tokens:manage');
$layouts = JoinTokenLayoutRegistry::toResponse(function (string $layoutId, string $format) use ($event, $joinToken) {
return route('api.v1.tenant.events.join-tokens.layouts.download', [
@@ -48,7 +46,6 @@ class EventJoinTokenLayoutController extends Controller
public function download(Request $request, Event $event, EventJoinToken $joinToken, string $layout, string $format)
{
$this->ensureBelongsToEvent($event, $joinToken);
TenantMemberPermissions::ensureEventPermission($request, $event, 'join-tokens:manage');
$layoutConfig = JoinTokenLayoutRegistry::find($layout);

View File

@@ -9,7 +9,6 @@ use App\Models\Event;
use App\Models\EventMember;
use App\Models\Tenant;
use App\Models\User;
use App\Support\TenantMemberPermissions;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -23,7 +22,6 @@ class EventMemberController extends Controller
public function index(Request $request, Event $event): JsonResponse
{
$this->assertEventTenant($request, $event);
TenantMemberPermissions::ensureEventPermission($request, $event, 'members:manage');
/** @var LengthAwarePaginator $members */
$members = $event->members()
@@ -36,7 +34,6 @@ class EventMemberController extends Controller
public function store(EventMemberInviteRequest $request, Event $event): JsonResponse
{
$this->assertEventTenant($request, $event);
TenantMemberPermissions::ensureEventPermission($request, $event, 'members:manage');
$data = $request->validated();
$tenant = $this->resolveTenantFromRequest($request);
@@ -95,7 +92,6 @@ class EventMemberController extends Controller
public function destroy(Request $request, Event $event, EventMember $member): JsonResponse
{
$this->assertEventTenant($request, $event);
TenantMemberPermissions::ensureEventPermission($request, $event, 'members:manage');
if ((int) $member->event_id !== (int) $event->id) {
throw ValidationException::withMessages([

View File

@@ -4,7 +4,6 @@ namespace App\Http\Controllers\Api\Tenant;
use App\Http\Controllers\Controller;
use App\Models\Event;
use App\Support\TenantMemberPermissions;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use SimpleSoftwareIO\QrCode\Facades\QrCode;
@@ -14,7 +13,6 @@ class LiveShowLinkController extends Controller
public function show(Request $request, Event $event): JsonResponse
{
$this->authorizeEvent($request, $event);
TenantMemberPermissions::ensureEventPermission($request, $event, 'live-show:manage');
$token = $event->ensureLiveShowToken();
@@ -26,7 +24,6 @@ class LiveShowLinkController extends Controller
public function rotate(Request $request, Event $event): JsonResponse
{
$this->authorizeEvent($request, $event);
TenantMemberPermissions::ensureEventPermission($request, $event, 'live-show:manage');
$token = $event->rotateLiveShowToken();

View File

@@ -10,7 +10,6 @@ use App\Http\Resources\Tenant\PhotoResource;
use App\Models\Event;
use App\Models\Photo;
use App\Support\ApiError;
use App\Support\TenantMemberPermissions;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
@@ -24,7 +23,6 @@ class LiveShowPhotoController extends Controller
$event = Event::where('slug', $eventSlug)
->where('tenant_id', $tenantId)
->firstOrFail();
TenantMemberPermissions::ensureEventPermission($request, $event, 'photos:moderate');
$liveStatus = $request->string('live_status', 'pending')->toString();
$perPage = (int) $request->input('per_page', 20);
@@ -53,7 +51,6 @@ class LiveShowPhotoController extends Controller
$event = Event::where('slug', $eventSlug)
->where('tenant_id', $tenantId)
->firstOrFail();
TenantMemberPermissions::ensureEventPermission($request, $event, 'photos:moderate');
if ($photo->event_id !== $event->id) {
return ApiError::response(
@@ -97,7 +94,6 @@ class LiveShowPhotoController extends Controller
$event = Event::where('slug', $eventSlug)
->where('tenant_id', $tenantId)
->firstOrFail();
TenantMemberPermissions::ensureEventPermission($request, $event, 'photos:moderate');
if ($photo->event_id !== $event->id) {
return ApiError::response(
@@ -150,7 +146,6 @@ class LiveShowPhotoController extends Controller
$event = Event::where('slug', $eventSlug)
->where('tenant_id', $tenantId)
->firstOrFail();
TenantMemberPermissions::ensureEventPermission($request, $event, 'photos:moderate');
if ($photo->event_id !== $event->id) {
return ApiError::response(
@@ -178,7 +173,6 @@ class LiveShowPhotoController extends Controller
$event = Event::where('slug', $eventSlug)
->where('tenant_id', $tenantId)
->firstOrFail();
TenantMemberPermissions::ensureEventPermission($request, $event, 'photos:moderate');
if ($photo->event_id !== $event->id) {
return ApiError::response(

View File

@@ -14,7 +14,6 @@ use App\Services\Packages\PackageUsageTracker;
use App\Services\Storage\EventStorageManager;
use App\Support\ApiError;
use App\Support\ImageHelper;
use App\Support\TenantMemberPermissions;
use App\Support\UploadStream;
use App\Support\WatermarkConfigResolver;
use Illuminate\Http\JsonResponse;
@@ -525,8 +524,15 @@ class PhotoController extends Controller
'alt_text' => ['sometimes', 'string', 'max:255'],
]);
if (isset($validated['status'])) {
TenantMemberPermissions::ensureEventPermission($request, $event, 'photos:moderate');
// Only tenant admins can moderate
if (isset($validated['status']) && ! $this->tokenHasScope($request, 'tenant-admin')) {
return ApiError::response(
'insufficient_scope',
'Insufficient Scopes',
'You are not allowed to moderate photos for this event.',
Response::HTTP_FORBIDDEN,
['required_scope' => 'tenant-admin']
);
}
$photo->update($validated);
@@ -628,7 +634,6 @@ class PhotoController extends Controller
$event = Event::where('slug', $eventSlug)
->where('tenant_id', $tenantId)
->firstOrFail();
TenantMemberPermissions::ensureEventPermission($request, $event, 'photos:moderate');
if ($photo->event_id !== $event->id) {
return ApiError::response(
@@ -652,7 +657,6 @@ class PhotoController extends Controller
$event = Event::where('slug', $eventSlug)
->where('tenant_id', $tenantId)
->firstOrFail();
TenantMemberPermissions::ensureEventPermission($request, $event, 'photos:moderate');
if ($photo->event_id !== $event->id) {
return ApiError::response(
@@ -676,7 +680,6 @@ class PhotoController extends Controller
$event = Event::where('slug', $eventSlug)
->where('tenant_id', $tenantId)
->firstOrFail();
TenantMemberPermissions::ensureEventPermission($request, $event, 'photos:moderate');
$request->validate([
'photo_ids' => 'required|array',
@@ -722,7 +725,6 @@ class PhotoController extends Controller
$event = Event::where('slug', $eventSlug)
->where('tenant_id', $tenantId)
->firstOrFail();
TenantMemberPermissions::ensureEventPermission($request, $event, 'photos:moderate');
$request->validate([
'photo_ids' => 'required|array',

View File

@@ -3,17 +3,12 @@
namespace App\Http\Controllers\Api\Tenant;
use App\Http\Controllers\Controller;
use App\Http\Requests\Photobooth\PhotoboothSendUploaderDownloadRequest;
use App\Http\Resources\Tenant\PhotoboothStatusResource;
use App\Mail\PhotoboothUploaderDownload;
use App\Models\Event;
use App\Models\PhotoboothSetting;
use App\Services\Photobooth\PhotoboothProvisioner;
use App\Support\LocaleConfig;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
use Illuminate\Validation\ValidationException;
class PhotoboothController extends Controller
{
@@ -74,39 +69,6 @@ class PhotoboothController extends Controller
]);
}
public function sendUploaderDownloadEmail(PhotoboothSendUploaderDownloadRequest $request, Event $event): JsonResponse
{
$this->assertEventBelongsToTenant($request, $event);
$user = $request->user();
if (! $user || ! $user->email) {
throw ValidationException::withMessages([
'email' => __('No email address is configured for this account.'),
]);
}
$locale = LocaleConfig::canonicalize($user->preferred_locale ?: app()->getLocale());
$eventName = $this->resolveEventName($event, $locale);
$recipientName = $user->fullName ?? $user->name ?? $user->email;
$mail = (new PhotoboothUploaderDownload(
recipientName: $recipientName,
eventName: $eventName,
links: [
'windows' => url('/downloads/PhotoboothUploader-win-x64.exe'),
'macos' => url('/downloads/PhotoboothUploader-macos-x64'),
'linux' => url('/downloads/PhotoboothUploader-linux-x64'),
],
))->locale($locale);
Mail::to($user->email)->queue($mail);
return response()->json([
'message' => __('Download links sent via email.'),
]);
}
protected function resource(Event $event): PhotoboothStatusResource
{
return PhotoboothStatusResource::make([
@@ -130,30 +92,4 @@ class PhotoboothController extends Controller
return in_array($mode, ['sparkbooth', 'ftp'], true) ? $mode : 'ftp';
}
protected function resolveEventName(Event $event, ?string $locale = null): string
{
$name = $event->name;
if (is_string($name) && trim($name) !== '') {
return $name;
}
if (is_array($name)) {
$locale = $locale ?: app()->getLocale();
$localized = $name[$locale] ?? null;
if (is_string($localized) && trim($localized) !== '') {
return $localized;
}
foreach ($name as $value) {
if (is_string($value) && trim($value) !== '') {
return $value;
}
}
}
return $event->slug ?: __('emails.photobooth_uploader.event_fallback');
}
}

View File

@@ -113,8 +113,8 @@ class SettingsController extends Controller
$defaultSettings = [
'branding' => [
'logo_url' => null,
'primary_color' => '#FF5A5F',
'secondary_color' => '#FFF8F5',
'primary_color' => '#3B82F6',
'secondary_color' => '#1F2937',
'font_family' => 'Inter, sans-serif',
],
'features' => [

View File

@@ -11,7 +11,6 @@ use App\Models\Task;
use App\Models\TaskCollection;
use App\Models\Tenant;
use App\Support\ApiError;
use App\Support\TenantMemberPermissions;
use App\Support\TenantRequestResolver;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -67,8 +66,6 @@ class TaskController extends Controller
*/
public function store(TaskStoreRequest $request): JsonResponse
{
TenantMemberPermissions::ensureTenantPermission($request, 'tasks:manage');
$tenant = $this->currentTenant($request);
$collectionId = $request->input('collection_id');
$collection = $collectionId ? $this->resolveAccessibleCollection($request, $collectionId) : null;
@@ -110,8 +107,6 @@ class TaskController extends Controller
*/
public function update(TaskUpdateRequest $request, Task $task): JsonResponse
{
TenantMemberPermissions::ensureTenantPermission($request, 'tasks:manage');
$tenant = $this->currentTenant($request);
if ($task->tenant_id !== $tenant->id) {
@@ -143,8 +138,6 @@ class TaskController extends Controller
*/
public function destroy(Request $request, Task $task): JsonResponse
{
TenantMemberPermissions::ensureTenantPermission($request, 'tasks:manage');
if ($task->tenant_id !== $this->currentTenant($request)->id) {
abort(404, 'Task nicht gefunden.');
}
@@ -161,8 +154,6 @@ class TaskController extends Controller
*/
public function assignToEvent(Request $request, Task $task, Event $event): JsonResponse
{
TenantMemberPermissions::ensureEventPermission($request, $event, 'tasks:manage');
$tenantId = $this->currentTenant($request)->id;
if (($task->tenant_id && $task->tenant_id !== $tenantId) || $event->tenant_id !== $tenantId) {
@@ -185,8 +176,6 @@ class TaskController extends Controller
*/
public function bulkAssignToEvent(Request $request, Event $event): JsonResponse
{
TenantMemberPermissions::ensureEventPermission($request, $event, 'tasks:manage');
$tenantId = $this->currentTenant($request)->id;
if ($event->tenant_id !== $tenantId) {
@@ -241,8 +230,6 @@ class TaskController extends Controller
public function bulkDetachFromEvent(Request $request, Event $event): JsonResponse
{
TenantMemberPermissions::ensureEventPermission($request, $event, 'tasks:manage');
$tenantId = $this->currentTenant($request)->id;
if ($event->tenant_id !== $tenantId) {
@@ -269,8 +256,6 @@ class TaskController extends Controller
public function reorderForEvent(Request $request, Event $event): JsonResponse
{
TenantMemberPermissions::ensureEventPermission($request, $event, 'tasks:manage');
$tenantId = $this->currentTenant($request)->id;
if ($event->tenant_id !== $tenantId) {

View File

@@ -39,9 +39,7 @@ class TenantPackageController extends Controller
$activePackage = $tenant->activeResellerPackage?->load('package');
if (! ($activePackage instanceof TenantPackage)) {
$activePackage = $packages->firstWhere('active', true);
} else {
if ($activePackage instanceof TenantPackage) {
$this->hydratePackageSnapshot($activePackage, $usageEventPackage);
}
@@ -62,7 +60,6 @@ class TenantPackageController extends Controller
$pkg?->limits ?? [],
$this->buildUsageSnapshot($eventPackage),
[
'included_package_slug' => $pkg?->included_package_slug,
'branding_allowed' => $pkg?->branding_allowed,
'watermark_allowed' => $pkg?->watermark_allowed,
'features' => $pkg?->features ?? [],

View File

@@ -47,15 +47,6 @@ class AuthenticatedSessionController extends Controller
$user = Auth::user();
if ($user && $user->email_verified_at === null) {
$intended = $request->session()->get('url.intended');
$intended = is_string($intended) ? trim($intended) : null;
if ($this->isVerificationLink($intended)) {
$request->session()->forget('url.intended');
return Inertia::location($intended);
}
return Inertia::location(route('verification.notice'));
}
@@ -125,29 +116,6 @@ class AuthenticatedSessionController extends Controller
);
}
private function isVerificationLink(?string $target): bool
{
if (! is_string($target) || trim($target) === '') {
return false;
}
$path = trim($target);
if (str_starts_with($path, '/verify-email/')) {
return true;
}
$parsed = parse_url($path);
if ($parsed === false) {
return false;
}
$path = $parsed['path'] ?? '';
return $path !== '' && str_starts_with($path, '/verify-email/');
}
private function decodeReturnTo(string $value, Request $request): ?string
{
$candidate = $this->decodeBase64Url($value) ?? $value;

View File

@@ -108,8 +108,8 @@ class CheckoutController extends Controller
'settings' => json_encode([
'branding' => [
'logo_url' => null,
'primary_color' => '#FF5A5F',
'secondary_color' => '#FFF8F5',
'primary_color' => '#3B82F6',
'secondary_color' => '#1F2937',
'font_family' => 'Inter, sans-serif',
],
'features' => [

View File

@@ -146,8 +146,8 @@ class CheckoutGoogleController extends Controller
'settings' => json_encode([
'branding' => [
'logo_url' => null,
'primary_color' => '#FF5A5F',
'secondary_color' => '#FFF8F5',
'primary_color' => '#3B82F6',
'secondary_color' => '#1F2937',
'font_family' => 'Inter, sans-serif',
],
'features' => [

View File

@@ -58,8 +58,8 @@ class TestGuestEventController extends Controller
'date' => ($validated['date'] ?? Carbon::now()->addWeeks(2)->toDateString()),
'settings' => [
'branding' => [
'primary_color' => '#FF5A5F',
'secondary_color' => '#FFF8F5',
'primary_color' => '#f43f5e',
'secondary_color' => '#fb7185',
'font_family' => 'Inter, sans-serif',
],
],

View File

@@ -28,12 +28,7 @@ class CreditCheckMiddleware
}
if ($this->requiresCredits($request) && ! $this->shouldBypassCreditCheck($request, $tenant)) {
$includedSlug = $request->input('service_package_slug');
$violation = $this->limitEvaluator->assessEventCreation(
$tenant,
is_string($includedSlug) && $includedSlug !== '' ? $includedSlug : null
);
$violation = $this->limitEvaluator->assessEventCreation($tenant);
if ($violation !== null) {
return ApiError::response(

View File

@@ -73,12 +73,7 @@ class PackageMiddleware
private function detectViolation(Request $request, Tenant $tenant): ?array
{
if ($request->routeIs('api.v1.tenant.events.store')) {
$includedSlug = $request->input('service_package_slug');
return $this->limitEvaluator->assessEventCreation(
$tenant,
is_string($includedSlug) && $includedSlug !== '' ? $includedSlug : null
);
return $this->limitEvaluator->assessEventCreation($tenant);
}
if ($request->routeIs('api.v1.tenant.events.photos.store')) {

View File

@@ -1,18 +0,0 @@
<?php
namespace App\Http\Requests\Photobooth;
use Illuminate\Foundation\Http\FormRequest;
class PhotoboothSendUploaderDownloadRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [];
}
}

View File

@@ -23,21 +23,14 @@ class EventStoreRequest extends FormRequest
public function rules(): array
{
$tenantId = request()->attributes->get('tenant_id');
$creating = $this->isMethod('post');
return [
'name' => [$creating ? 'required' : 'sometimes', 'string', 'max:255'],
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string'],
'event_date' => $creating ? ['required', 'date', 'after_or_equal:today'] : ['sometimes', 'date'],
'event_date' => ['required', 'date', 'after_or_equal:today'],
'location' => ['nullable', 'string', 'max:255'],
'event_type_id' => [$creating ? 'required' : 'sometimes', 'exists:event_types,id'],
'event_type_id' => ['required', 'exists:event_types,id'],
'package_id' => ['nullable', 'integer', 'exists:packages,id'],
'service_package_slug' => [
'nullable',
'string',
'max:64',
Rule::exists('packages', 'slug')->where('type', 'endcustomer'),
],
'max_participants' => ['nullable', 'integer', 'min:1', 'max:10000'],
'public_url' => ['nullable', 'url', 'max:500'],
'custom_domain' => ['nullable', 'string', 'max:255'],
@@ -50,12 +43,9 @@ class EventStoreRequest extends FormRequest
'features' => ['nullable', 'array'],
'features.*' => ['string'],
'settings' => ['nullable', 'array'],
'settings.location' => ['nullable', 'string', 'max:255'],
'settings.branding' => ['nullable', 'array'],
'settings.branding.*' => ['nullable'],
'settings.engagement_mode' => ['nullable', Rule::in(['tasks', 'photo_only'])],
'settings.guest_downloads_enabled' => ['nullable', 'boolean'],
'settings.guest_sharing_enabled' => ['nullable', 'boolean'],
'settings.guest_upload_visibility' => ['nullable', Rule::in(['review', 'immediate'])],
'settings.live_show' => ['nullable', 'array'],
'settings.live_show.moderation_mode' => ['nullable', Rule::in(['off', 'manual', 'trusted_only'])],

View File

@@ -2,16 +2,11 @@
namespace App\Http\Resources\Tenant;
use App\Models\WatermarkSetting;
use App\Services\Packages\PackageLimitEvaluator;
use App\Support\TenantMemberPermissions;
use App\Support\WatermarkConfigResolver;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Http\Resources\MissingValue;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\URL;
use function app;
@@ -22,14 +17,7 @@ class EventResource extends JsonResource
$tenantId = $request->attributes->get('tenant_id');
$showSensitive = $this->tenant_id === $tenantId;
$settings = is_array($this->settings) ? $this->settings : [];
$settings = $this->attachWatermarkAssetUrl($settings);
$eventPackage = null;
$memberPermissions = null;
$user = $request->user();
if ($user && $user->role === 'member') {
$memberPermissions = TenantMemberPermissions::resolveEventPermissions($request, $this->resource);
}
if ($this->relationLoaded('eventPackages')) {
$related = $this->getRelation('eventPackages');
@@ -50,8 +38,6 @@ class EventResource extends JsonResource
$limitEvaluator = app()->make(PackageLimitEvaluator::class);
}
$settings['watermark_removal_allowed'] = WatermarkConfigResolver::determineRemovalAllowed($this->resource);
return [
'id' => $this->id,
'name' => $this->name,
@@ -100,89 +86,9 @@ class EventResource extends JsonResource
? $limitEvaluator->summarizeEventPackage($eventPackage)
: null,
'addons' => $eventPackage ? $this->formatAddons($eventPackage) : [],
'member_permissions' => $memberPermissions,
];
}
/**
* @param array<string, mixed> $settings
* @return array<string, mixed>
*/
protected function attachWatermarkAssetUrl(array $settings): array
{
$watermark = Arr::get($settings, 'watermark');
$base = config('watermark.base', []);
$base = is_array($base) ? $base : [];
$baseSetting = null;
if (class_exists(WatermarkSetting::class) && Schema::hasTable('watermark_settings')) {
try {
$baseSetting = WatermarkSetting::query()->first();
} catch (\Throwable) {
$baseSetting = null;
}
}
if ($baseSetting) {
$base = array_merge($base, array_filter([
'asset' => $baseSetting->asset,
'position' => $baseSetting->position,
'opacity' => $baseSetting->opacity,
'scale' => $baseSetting->scale,
'padding' => $baseSetting->padding,
'offset_x' => $baseSetting->offset_x,
'offset_y' => $baseSetting->offset_y,
], static fn ($value) => $value !== null));
}
if (! is_array($watermark)) {
$watermark = [];
}
$mode = $watermark['mode'] ?? null;
if (! is_string($mode) || $mode === '') {
$mode = 'base';
$watermark['mode'] = $mode;
}
if ($mode !== 'off') {
foreach (['position', 'opacity', 'scale', 'padding', 'offset_x', 'offset_y'] as $key) {
if (! array_key_exists($key, $watermark) && array_key_exists($key, $base)) {
$watermark[$key] = $base[$key];
}
}
}
$asset = $watermark['asset'] ?? null;
if ((! is_string($asset) || $asset === '') && $mode !== 'off') {
$asset = $base['asset'] ?? null;
if (is_string($asset) && $asset !== '') {
$watermark['asset'] = $asset;
}
}
if (! is_string($asset) || $asset === '') {
$settings['watermark'] = $watermark;
return $settings;
}
$normalized = ltrim($asset, '/');
if (str_starts_with($normalized, 'storage/')) {
$normalized = substr($normalized, strlen('storage/'));
}
$watermark['asset_url'] = URL::temporarySignedRoute(
'api.v1.branding.asset',
now()->addSeconds(3600),
['path' => $normalized]
);
$settings['watermark'] = $watermark;
return $settings;
}
protected function formatAddons(?\App\Models\EventPackage $eventPackage): array
{
if (! $eventPackage) {

View File

@@ -47,7 +47,7 @@ class PhotoboothStatusResource extends JsonResource
'password' => $password,
'path' => $eventSetting?->path,
'ftp_url' => $isSparkbooth ? null : $this->buildFtpUrl($eventSetting, $settings, $password),
'upload_url' => $isSparkbooth ? route('api.v1.photobooth.upload') : null,
'upload_url' => $isSparkbooth ? route('api.v1.photobooth.sparkbooth.upload') : null,
'expires_at' => optional($activeExpires)->toIso8601String(),
'rate_limit_per_minute' => (int) $settings->rate_limit_per_minute,
'ftp' => [
@@ -62,7 +62,7 @@ class PhotoboothStatusResource extends JsonResource
'username' => $mode === 'sparkbooth' ? $eventSetting?->username : null,
'password' => $mode === 'sparkbooth' ? $password : null,
'expires_at' => $mode === 'sparkbooth' ? optional($eventSetting?->expires_at)->toIso8601String() : null,
'upload_url' => route('api.v1.photobooth.upload'),
'upload_url' => route('api.v1.photobooth.sparkbooth.upload'),
'response_format' => ($eventSetting?->metadata ?? [])['sparkbooth_response_format'] ?? config('photobooth.sparkbooth.response_format', 'json'),
'metrics' => $sparkMetrics,
],

View File

@@ -1,50 +0,0 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class PhotoboothUploaderDownload extends Mailable implements ShouldQueue
{
use Queueable, SerializesModels;
/**
* @param array{windows:string, macos:string, linux:string} $links
*/
public function __construct(
public string $recipientName,
public string $eventName,
public array $links,
) {}
public function envelope(): Envelope
{
return new Envelope(
subject: __('emails.photobooth_uploader.subject', [
'event' => $this->eventName,
]),
);
}
public function content(): Content
{
return new Content(
view: 'emails.photobooth-uploader-download',
with: [
'recipientName' => $this->recipientName,
'eventName' => $this->eventName,
'links' => $this->links,
],
);
}
public function attachments(): array
{
return [];
}
}

View File

@@ -19,7 +19,6 @@ class Package extends Model
'name_translations',
'slug',
'type',
'included_package_slug',
'price',
'max_photos',
'max_guests',

View File

@@ -100,14 +100,7 @@ class Tenant extends Model
public function activeResellerPackage(): HasOne
{
return $this->hasOne(TenantPackage::class)
->where('active', true)
->where(function ($query) {
$query->whereNull('expires_at')->orWhere('expires_at', '>', now());
})
->whereHas('package', fn ($query) => $query->withTrashed()->where('type', 'reseller'))
->orderBy('purchased_at')
->orderBy('id');
return $this->hasOne(TenantPackage::class)->where('active', true);
}
public function notificationLogs(): HasMany
@@ -158,13 +151,6 @@ class Tenant extends Model
return false;
}
public function hasEventAllowanceFor(?string $includedPackageSlug): bool
{
$package = $this->getActiveResellerPackageFor($includedPackageSlug);
return $package !== null && $package->canCreateEvent();
}
public function consumeEventAllowance(int $amount = 1, string $reason = 'event.create', ?string $note = null): bool
{
$package = $this->getActiveResellerPackage();
@@ -197,68 +183,13 @@ class Tenant extends Model
return false;
}
public function consumeEventAllowanceFor(?string $includedPackageSlug, int $amount = 1, string $reason = 'event.create', ?string $note = null): bool
{
$package = $this->getActiveResellerPackageFor($includedPackageSlug);
if ($package && $package->canCreateEvent()) {
$previousUsed = (int) $package->used_events;
$package->increment('used_events', $amount);
$package->refresh();
app(\App\Services\Packages\TenantUsageTracker::class)->recordEventUsage(
$package,
$previousUsed,
$amount
);
Log::info('Tenant package usage recorded', [
'tenant_id' => $this->id,
'tenant_package_id' => $package->id,
'used_events' => $package->used_events,
'amount' => $amount,
]);
return true;
}
Log::warning('Event allowance missing for tenant', [
'tenant_id' => $this->id,
'reason' => $reason,
'included_package_slug' => $includedPackageSlug,
]);
return false;
}
public function getActiveResellerPackage(): ?TenantPackage
{
return $this->activeResellerPackage()->with('package')->first();
}
public function getActiveResellerPackageFor(?string $includedPackageSlug): ?TenantPackage
{
$query = $this->tenantPackages()
->with('package')
->where('active', true)
->where(function ($query) {
$query->whereNull('expires_at')->orWhere('expires_at', '>', now());
})
return $this->activeResellerPackage()
->whereHas('package', fn ($query) => $query->withTrashed()->where('type', 'reseller'))
->orderBy('purchased_at')
->orderBy('id');
if (is_string($includedPackageSlug) && $includedPackageSlug !== '') {
$query->whereHas('package', function ($query) use ($includedPackageSlug) {
$query->where('included_package_slug', $includedPackageSlug);
if ($includedPackageSlug === 'standard') {
$query->orWhereNull('included_package_slug');
}
});
}
return $query->first();
->where('active', true)
->orderByDesc('expires_at')
->first();
}
public function activeSubscription(): Attribute

View File

@@ -66,30 +66,18 @@ class TenantPackage extends Model
return false;
}
$maxEvents = $this->package->max_events_per_year;
if ($maxEvents === null) {
return true;
}
$maxEvents = max(0, (int) $maxEvents);
$maxEvents = $this->package->max_events_per_year ?? 0;
return $this->used_events < $maxEvents;
}
public function getRemainingEventsAttribute(): ?int
public function getRemainingEventsAttribute(): int
{
if (! $this->package->isReseller()) {
return 0;
}
$max = $this->package->max_events_per_year;
if ($max === null) {
return null;
}
$max = max(0, (int) $max);
$max = $this->package->max_events_per_year ?? 0;
return max(0, $max - $this->used_events);
}
@@ -106,7 +94,9 @@ class TenantPackage extends Model
$package = $tenantPackage->package;
if ($package && $package->isReseller()) {
// Reseller packages represent prepaid Event-Kontingente and should not expire by default.
if (! $tenantPackage->expires_at) {
$tenantPackage->expires_at = now()->addYear();
}
} elseif (! $tenantPackage->expires_at) {
$tenantPackage->expires_at = now()->addYear();
}

View File

@@ -94,34 +94,18 @@ class CheckoutAssignmentService
]
);
if ($package->type === 'reseller') {
$tenantPackage = null;
if ($purchase->wasRecentlyCreated) {
$tenantPackage = TenantPackage::create([
'tenant_id' => $tenant->id,
'package_id' => $package->id,
'price' => round($price, 2),
'active' => true,
'purchased_at' => now(),
'expires_at' => null,
'used_events' => 0,
]);
}
} else {
$tenantPackage = TenantPackage::updateOrCreate(
[
'tenant_id' => $tenant->id,
'package_id' => $package->id,
],
[
'price' => round($price, 2),
'active' => true,
'purchased_at' => now(),
'expires_at' => $this->resolveExpiry($package, $tenant),
]
);
}
$tenantPackage = TenantPackage::updateOrCreate(
[
'tenant_id' => $tenant->id,
'package_id' => $package->id,
],
[
'price' => round($price, 2),
'active' => true,
'purchased_at' => now(),
'expires_at' => $this->resolveExpiry($package, $tenant),
]
);
if ($package->type !== 'reseller') {
$tenant->forceFill([
@@ -204,7 +188,11 @@ class CheckoutAssignmentService
protected function resolveExpiry(Package $package, Tenant $tenant)
{
if ($package->type === 'reseller') {
return null;
$hasActive = TenantPackage::where('tenant_id', $tenant->id)
->where('active', true)
->exists();
return $hasActive ? now()->addYear() : now()->addDays(14);
}
return now()->addYear();

View File

@@ -77,8 +77,6 @@ class HelpSyncService
foreach ($articles->groupBy(fn ($article) => $article['audience'].'::'.$article['locale']) as $key => $group) {
[$audience, $locale] = explode('::', $key);
$path = sprintf('%s/%s/%s/articles.json', $compiledPath, $audience, $locale);
$directory = sprintf('%s/%s/%s', $compiledPath, $audience, $locale);
Storage::disk($disk)->makeDirectory($directory);
Storage::disk($disk)->put($path, $group->values()->toJson(JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
Cache::forget($this->cacheKey($audience, $locale));
$written[$audience][$locale] = $group->count();

View File

@@ -11,7 +11,7 @@ class PackageLimitEvaluator
{
public function __construct(private readonly TenantUsageService $tenantUsageService) {}
public function assessEventCreation(Tenant $tenant, ?string $includedPackageSlug = null): ?array
public function assessEventCreation(Tenant $tenant): ?array
{
$hasEndcustomerPackage = $tenant->tenantPackages()
->where('active', true)
@@ -22,66 +22,17 @@ class PackageLimitEvaluator
return null;
}
if ($tenant->hasEventAllowanceFor($includedPackageSlug)) {
if ($tenant->hasEventAllowance()) {
return null;
}
$package = $tenant->getActiveResellerPackageFor($includedPackageSlug);
$package = $tenant->getActiveResellerPackage();
if (! $package) {
if ($includedPackageSlug) {
$hasAnyActive = $tenant->tenantPackages()
->where('active', true)
->where(function ($query) {
$query->whereNull('expires_at')->orWhere('expires_at', '>', now());
})
->whereHas('package', fn ($query) => $query->withTrashed()->where('type', 'reseller'))
->exists();
if ($hasAnyActive) {
return [
'code' => 'event_tier_unavailable',
'title' => __('api.packages.event_tier_unavailable.title'),
'message' => __('api.packages.event_tier_unavailable.message'),
'status' => 402,
'meta' => [
'scope' => 'events',
'requested_tier' => $includedPackageSlug,
],
];
}
}
$latestResellerPackage = $tenant->tenantPackages()
->with('package')
->whereHas('package', fn ($query) => $query->withTrashed()->where('type', 'reseller'))
->orderByDesc('purchased_at')
->orderByDesc('id')
->first();
if ($latestResellerPackage && $latestResellerPackage->package) {
$limit = $latestResellerPackage->package->max_events_per_year ?? 0;
return [
'code' => 'event_limit_exceeded',
'title' => __('api.packages.event_limit_exceeded.title'),
'message' => __('api.packages.event_limit_exceeded.message'),
'status' => 402,
'meta' => [
'scope' => 'events',
'used' => (int) $latestResellerPackage->used_events,
'limit' => $limit,
'remaining' => max(0, $limit - $latestResellerPackage->used_events),
'tenant_package_id' => $latestResellerPackage->id,
'package_id' => $latestResellerPackage->package_id,
],
];
}
return [
'code' => 'event_limit_missing',
'title' => __('api.packages.event_limit_missing.title'),
'message' => __('api.packages.event_limit_missing.message'),
'title' => 'No package assigned',
'message' => 'Assign a package or addon to create events.',
'status' => 402,
'meta' => [
'scope' => 'events',
@@ -98,8 +49,8 @@ class PackageLimitEvaluator
return [
'code' => 'event_limit_exceeded',
'title' => __('api.packages.event_limit_exceeded.title'),
'message' => __('api.packages.event_limit_exceeded.message'),
'title' => 'Event quota reached',
'message' => 'Your current package has no remaining event slots. Please upgrade or renew your subscription.',
'status' => 402,
'meta' => [
'scope' => 'events',
@@ -123,8 +74,8 @@ class PackageLimitEvaluator
if (! $event) {
return [
'code' => 'event_not_found',
'title' => __('api.packages.event_not_found.title'),
'message' => __('api.packages.event_not_found.message'),
'title' => 'Event not accessible',
'message' => 'The selected event could not be found or belongs to another tenant.',
'status' => 404,
'meta' => [
'scope' => 'photos',
@@ -136,8 +87,8 @@ class PackageLimitEvaluator
if (! $eventPackage || ! $eventPackage->package) {
return [
'code' => 'event_package_missing',
'title' => __('api.packages.event_package_missing.title'),
'message' => __('api.packages.event_package_missing.message'),
'title' => 'Event package missing',
'message' => 'No package is attached to this event. Assign a package to enable uploads.',
'status' => 409,
'meta' => [
'scope' => 'photos',
@@ -151,8 +102,8 @@ class PackageLimitEvaluator
if ($maxPhotos !== null && $eventPackage->used_photos >= $maxPhotos) {
return [
'code' => 'photo_limit_exceeded',
'title' => __('api.packages.photo_limit_exceeded.title'),
'message' => __('api.packages.photo_limit_exceeded.message'),
'title' => 'Photo upload limit reached',
'message' => 'This event has reached its photo allowance. Upgrade the event package to accept more uploads.',
'status' => 402,
'meta' => [
'scope' => 'photos',
@@ -171,8 +122,8 @@ class PackageLimitEvaluator
if ($eventPackage->used_photos >= $tenantPhotoLimit) {
return [
'code' => 'tenant_photo_limit_exceeded',
'title' => __('api.packages.tenant_photo_limit_exceeded.title'),
'message' => __('api.packages.tenant_photo_limit_exceeded.message'),
'title' => 'Tenant photo limit reached',
'message' => 'This tenant has reached its photo allowance for the event.',
'status' => 402,
'meta' => [
'scope' => 'photos',
@@ -195,8 +146,8 @@ class PackageLimitEvaluator
if ($projectedBytes >= $storageLimitBytes) {
return [
'code' => 'tenant_storage_limit_exceeded',
'title' => __('api.packages.tenant_storage_limit_exceeded.title'),
'message' => __('api.packages.tenant_storage_limit_exceeded.message'),
'title' => 'Tenant storage limit reached',
'message' => 'This tenant has reached its storage allowance.',
'status' => 402,
'meta' => [
'scope' => 'storage',

View File

@@ -4,6 +4,7 @@ namespace App\Services\Packages;
use App\Events\Packages\TenantPackageEventLimitReached;
use App\Events\Packages\TenantPackageEventThresholdReached;
use App\Models\Tenant;
use App\Models\TenantPackage;
use Illuminate\Contracts\Events\Dispatcher;
@@ -62,12 +63,6 @@ class TenantUsageTracker
}
$this->dispatcher->dispatch(new TenantPackageEventLimitReached($tenantPackage, $limit));
if ($tenantPackage->active) {
$tenantPackage->forceFill([
'active' => false,
])->save();
}
}
}
}

View File

@@ -13,8 +13,7 @@ trait PresentsPackages
$packageArray = $package->toArray();
$features = $packageArray['features'] ?? [];
$features = $this->normaliseFeatures($features);
$watermarkRemovalAllowed = in_array('no_watermark', $features, true) || in_array('watermark_removal', $features, true);
$watermarkPolicy = $watermarkRemovalAllowed ? 'none' : 'basic';
$watermarkPolicy = $package->watermark_allowed === false ? 'none' : 'basic';
$locale = app()->getLocale();
$name = $this->resolveTranslation($package->name_translations ?? null, $package->name ?? '', $locale);
@@ -44,7 +43,6 @@ trait PresentsPackages
'name' => $name,
'slug' => $package->slug,
'type' => $package->type,
'included_package_slug' => $package->included_package_slug,
'price' => $package->price,
'paddle_product_id' => $package->paddle_product_id,
'paddle_price_id' => $package->paddle_price_id,

View File

@@ -178,13 +178,10 @@ class ImageHelper
$y = max(0, min($srcH - $targetH, $y + $offsetY));
$opacity = max(0.0, min(1.0, (float) ($config['opacity'] ?? 0.25)));
if ($opacity < 1.0) {
self::applyOpacity($resized, $opacity);
}
$mergeOpacity = (int) round($opacity * 100); // imagecopymerge uses 0-100
imagealphablending($src, true);
imagecopy($src, $resized, $x, $y, 0, 0, $targetW, $targetH);
imagecopymerge($src, $resized, $x, $y, 0, 0, $targetW, $targetH, $mergeOpacity);
imagedestroy($resized);
// Overwrite original (respect mime: always JPEG for compatibility)
@@ -213,34 +210,4 @@ class ImageHelper
return $applied ? $destPath : null;
}
/**
* @param \GdImage|resource $image
*/
private static function applyOpacity($image, float $opacity): void
{
$width = imagesx($image);
$height = imagesy($image);
if ($width <= 0 || $height <= 0) {
return;
}
imagealphablending($image, false);
imagesavealpha($image, true);
for ($x = 0; $x < $width; $x++) {
for ($y = 0; $y < $height; $y++) {
$rgba = imagecolorat($image, $x, $y);
$alpha = ($rgba >> 24) & 0x7F;
$red = ($rgba >> 16) & 0xFF;
$green = ($rgba >> 8) & 0xFF;
$blue = $rgba & 0xFF;
$adjustedAlpha = (int) round(127 - (127 - $alpha) * $opacity);
$color = imagecolorallocatealpha($image, $red, $green, $blue, max(0, min(127, $adjustedAlpha)));
imagesetpixel($image, $x, $y, $color);
}
}
}
}

View File

@@ -1,174 +0,0 @@
<?php
namespace App\Support;
use App\Models\Event;
use App\Models\EventMember;
use App\Models\User;
use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Symfony\Component\HttpFoundation\Response;
class TenantMemberPermissions
{
/**
* @return array<int, string>
*/
public static function resolveEventPermissions(Request $request, Event $event): array
{
$user = $request->user();
if (! $user instanceof User) {
return [];
}
if (self::isTenantAdmin($user)) {
return ['*'];
}
$member = self::resolveEventMember($user, $event);
if (! $member) {
return [];
}
return self::normalizePermissions($member->permissions);
}
public static function ensureEventPermission(Request $request, Event $event, string $permission): void
{
if (self::allowsPermission(self::resolveEventPermissions($request, $event), $permission)) {
return;
}
throw new HttpResponseException(ApiError::response(
'insufficient_permission',
'Insufficient permission',
'You are not allowed to perform this action.',
Response::HTTP_FORBIDDEN,
['required_permission' => $permission]
));
}
public static function allowsEventPermission(Request $request, Event $event, string $permission): bool
{
return self::allowsPermission(self::resolveEventPermissions($request, $event), $permission);
}
public static function ensureTenantPermission(Request $request, string $permission): void
{
$user = $request->user();
if (! $user instanceof User) {
throw new HttpResponseException(ApiError::response(
'unauthenticated',
'Unauthenticated',
'You must be authenticated to perform this action.',
Response::HTTP_UNAUTHORIZED
));
}
if (self::isTenantAdmin($user)) {
return;
}
$permissions = self::resolveTenantMemberPermissions($user);
if (self::allowsPermission($permissions, $permission)) {
return;
}
throw new HttpResponseException(ApiError::response(
'insufficient_permission',
'Insufficient permission',
'You are not allowed to perform this action.',
Response::HTTP_FORBIDDEN,
['required_permission' => $permission]
));
}
/**
* @return array<int, string>
*/
private static function resolveTenantMemberPermissions(User $user): array
{
if (! $user->tenant_id) {
return [];
}
$memberships = EventMember::query()
->where('tenant_id', $user->tenant_id)
->whereIn('status', ['active', 'invited'])
->where(function ($query) use ($user) {
$query->where('user_id', $user->id)
->orWhere('email', $user->email);
})
->get(['permissions']);
$permissions = [];
foreach ($memberships as $member) {
$permissions = array_merge($permissions, self::normalizePermissions($member->permissions));
}
return array_values(array_unique($permissions));
}
private static function isTenantAdmin(User $user): bool
{
return in_array($user->role, ['tenant_admin', 'admin', 'super_admin', 'superadmin'], true);
}
private static function resolveEventMember(User $user, Event $event): ?EventMember
{
return EventMember::query()
->where('tenant_id', $event->tenant_id)
->where('event_id', $event->id)
->whereIn('status', ['active', 'invited'])
->where(function ($query) use ($user) {
$query->where('user_id', $user->id)
->orWhere('email', $user->email);
})
->first();
}
/**
* @param array<int, string>|string|null $permissions
* @return array<int, string>
*/
private static function normalizePermissions(mixed $permissions): array
{
if (is_array($permissions)) {
return array_values(array_filter(array_map('strval', $permissions)));
}
if (is_string($permissions) && $permissions !== '') {
return array_values(array_filter(array_map('trim', explode(',', $permissions))));
}
return [];
}
/**
* @param array<int, string> $permissions
*/
private static function allowsPermission(array $permissions, string $permission): bool
{
foreach ($permissions as $entry) {
if ($entry === '*' || $entry === $permission) {
return true;
}
if (Str::endsWith($entry, ':*')) {
$prefix = Str::beforeLast($entry, '*');
if (Str::startsWith($permission, $prefix)) {
return true;
}
}
}
return false;
}
}

View File

@@ -3,7 +3,6 @@
namespace App\Support;
use App\Models\Event;
use App\Models\Package;
use Illuminate\Support\Arr;
class WatermarkConfigResolver
@@ -30,21 +29,7 @@ class WatermarkConfigResolver
{
$event->loadMissing('eventPackage.package');
return self::determineRemovalAllowed($event) ? 'none' : 'basic';
}
public static function determineRemovalAllowed(Event $event): bool
{
$event->loadMissing('eventPackage.package', 'eventPackages.package');
$package = $event->eventPackage?->package;
if (! $package && $event->relationLoaded('eventPackages')) {
$package = $event->eventPackages->first()?->package;
}
return self::packageHasFeature($package, 'no_watermark')
|| self::packageHasFeature($package, 'watermark_removal');
return $event->eventPackage?->package?->watermark_allowed === false ? 'none' : 'basic';
}
/**
@@ -54,6 +39,13 @@ class WatermarkConfigResolver
{
$policy = self::determinePolicy($event);
if ($policy === 'none') {
return [
'type' => 'none',
'policy' => $policy,
];
}
$baseSetting = null;
if (class_exists(\App\Models\WatermarkSetting::class) && \Illuminate\Support\Facades\Schema::hasTable('watermark_settings')) {
@@ -73,15 +65,8 @@ class WatermarkConfigResolver
'offset_y' => $baseSetting?->offset_y ?? config('watermark.base.offset_y', 0),
];
$event->loadMissing('eventPackage.package', 'eventPackages.package', 'tenant');
$package = $event->eventPackage?->package;
if (! $package && $event->relationLoaded('eventPackages')) {
$package = $event->eventPackages->first()?->package;
}
$event->loadMissing('eventPackage.package', 'tenant');
$brandingAllowed = self::determineBrandingAllowed($event);
$watermarkAllowed = $package?->watermark_allowed !== false;
$removalAllowed = self::determineRemovalAllowed($event);
$eventWatermark = Arr::get($event->settings, 'watermark', []);
$tenantWatermark = Arr::get($event->tenant?->settings, 'watermark', []);
$serveOriginals = (bool) Arr::get($event->settings, 'watermark_serve_originals', false);
@@ -90,11 +75,7 @@ class WatermarkConfigResolver
? ($eventWatermark['mode'] ?? $tenantWatermark['mode'] ?? 'base')
: 'base';
if ($mode === 'custom' && (! $brandingAllowed || ! $watermarkAllowed)) {
$mode = 'base';
}
if ($mode === 'off' && ! $removalAllowed) {
if ($mode === 'off' && $policy === 'basic') {
$mode = 'base';
}
@@ -130,30 +111,4 @@ class WatermarkConfigResolver
'serve_originals' => $serveOriginals,
];
}
private static function packageHasFeature(?Package $package, string $feature): bool
{
if (! $package) {
return false;
}
$features = $package->features ?? [];
if (is_string($features)) {
$decoded = json_decode($features, true);
if (json_last_error() === JSON_ERROR_NONE) {
$features = $decoded;
}
}
if (! is_array($features)) {
return false;
}
if (array_is_list($features)) {
return in_array($feature, $features, true);
}
return isset($features[$feature]) && (bool) $features[$feature];
}
}

View File

@@ -6,85 +6,5 @@
<Application.Styles>
<FluentTheme />
<Style>
<Style.Resources>
<Color x:Key="BrandRose">#FFB6C1</Color>
<Color x:Key="BrandRoseStrong">#FF69B4</Color>
<Color x:Key="BrandRoseSoft">#FFE5EC</Color>
<Color x:Key="BrandGold">#FFD700</Color>
<Color x:Key="BrandSky">#87CEEB</Color>
<Color x:Key="BrandSkySoft">#E0F5FF</Color>
<Color x:Key="BrandNavy">#0F4C75</Color>
<Color x:Key="BrandSlate">#1F2937</Color>
<Color x:Key="BrandCream">#FFF8F5</Color>
<SolidColorBrush x:Key="TextPrimaryBrush" Color="{DynamicResource BrandSlate}" />
<SolidColorBrush x:Key="TextMutedBrush" Color="#6B7280" />
<SolidColorBrush x:Key="CardBorderBrush" Color="{DynamicResource BrandRoseSoft}" />
<SolidColorBrush x:Key="CardBackgroundBrush" Color="#FFFFFF" />
<SolidColorBrush x:Key="AccentBackgroundBrush" Color="{DynamicResource BrandSkySoft}" />
<SolidColorBrush x:Key="InputBorderBrush" Color="{DynamicResource BrandRoseSoft}" />
<SolidColorBrush x:Key="InputBackgroundBrush" Color="#FFFFFF" />
<SolidColorBrush x:Key="PrimaryButtonBrush" Color="{DynamicResource BrandRoseStrong}" />
<SolidColorBrush x:Key="PrimaryButtonTextBrush" Color="#FFFFFF" />
<SolidColorBrush x:Key="SecondaryButtonBrush" Color="{DynamicResource BrandSky}" />
<SolidColorBrush x:Key="SecondaryButtonTextBrush" Color="{DynamicResource BrandNavy}" />
<LinearGradientBrush x:Key="WindowBackgroundBrush" StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="{DynamicResource BrandCream}" Offset="0" />
<GradientStop Color="{DynamicResource BrandRoseSoft}" Offset="0.5" />
<GradientStop Color="{DynamicResource BrandSkySoft}" Offset="1" />
</LinearGradientBrush>
</Style.Resources>
</Style>
<Style Selector="Window">
<Setter Property="Background" Value="{DynamicResource WindowBackgroundBrush}" />
<Setter Property="FontFamily" Value="Inter" />
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
</Style>
<Style Selector="TextBlock.title">
<Setter Property="FontSize" Value="20" />
<Setter Property="FontWeight" Value="SemiBold" />
</Style>
<Style Selector="TextBlock.subtitle">
<Setter Property="FontSize" Value="12" />
<Setter Property="Foreground" Value="{DynamicResource TextMutedBrush}" />
</Style>
<Style Selector="Border.card">
<Setter Property="Background" Value="{DynamicResource CardBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource CardBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="12" />
</Style>
<Style Selector="Border.card.accent">
<Setter Property="Background" Value="{DynamicResource AccentBackgroundBrush}" />
</Style>
<Style Selector="TextBox">
<Setter Property="BorderBrush" Value="{DynamicResource InputBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource InputBackgroundBrush}" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="Padding" Value="10,8" />
</Style>
<Style Selector="Button">
<Setter Property="CornerRadius" Value="8" />
<Setter Property="Padding" Value="12,8" />
</Style>
<Style Selector="Button.primary">
<Setter Property="Background" Value="{DynamicResource PrimaryButtonBrush}" />
<Setter Property="Foreground" Value="{DynamicResource PrimaryButtonTextBrush}" />
</Style>
<Style Selector="Button.secondary">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonBrush}" />
<Setter Property="Foreground" Value="{DynamicResource SecondaryButtonTextBrush}" />
</Style>
</Application.Styles>
</Application>
</Application>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 B

View File

@@ -4,27 +4,13 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="520" d:DesignHeight="360"
x:Class="PhotoboothUploader.MainWindow"
Width="560" Height="420"
MinWidth="520" MinHeight="400"
Title="Die Fotospiel.App - Photobooth Uploader">
<Grid Margin="24,32,24,24" RowDefinitions="Auto,*">
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="12" VerticalAlignment="Center">
<Border Width="40" Height="40" Classes="card accent" VerticalAlignment="Center" HorizontalAlignment="Left">
<Image Source="avares://PhotoboothUploader/Assets/logo.png" Width="28" Height="28" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<StackPanel Spacing="2">
<TextBlock x:Name="TitleText"
Text="Die Fotospiel.App - Photobooth Uploader"
Classes="title"
PointerPressed="TitleText_PointerPressed" />
<TextBlock Text="Sicherer Upload der Fotobox-Fotos ins Event." Classes="subtitle" />
</StackPanel>
</StackPanel>
Width="520" Height="360"
Title="Fotospiel Photobooth Uploader">
<Grid Margin="24" ColumnDefinitions="*,8,*">
<StackPanel Grid.Column="0" Spacing="12" MaxWidth="420">
<TextBlock Text="Fotospiel Photobooth Uploader" FontSize="20" FontWeight="SemiBold" />
<Grid Grid.Row="1" ColumnDefinitions="*,16,*">
<StackPanel Grid.Column="0" Spacing="16" MaxWidth="420">
<Border Padding="14" Classes="card">
<Border Background="#1F000000" Padding="12" CornerRadius="8">
<StackPanel Spacing="6">
<TextBlock Text="Schritte" FontWeight="SemiBold" />
<TextBlock x:Name="StepCodeText" Text="1. Code eingeben" />
@@ -33,128 +19,45 @@
</StackPanel>
</Border>
<Border Padding="14" Classes="card">
<StackPanel Spacing="10">
<TextBlock Text="Verbindungscode" FontWeight="SemiBold" />
<TextBlock Text="Gib den 6-stelligen Verbindungscode ein." TextWrapping="Wrap" Classes="subtitle" />
<TextBox x:Name="CodeBox" MaxLength="6" Watermark="123456" TextChanged="CodeBox_TextChanged" />
<StackPanel Orientation="Horizontal" Spacing="8">
<Button x:Name="ConnectButton" Content="Verbinden" Click="ConnectButton_Click" Classes="primary" />
<Button x:Name="ReconnectButton" Content="Erneut verbinden" Click="ReconnectButton_Click" IsEnabled="False" Classes="secondary" />
</StackPanel>
</StackPanel>
</Border>
<TextBlock Text="Gib den 6-stelligen Verbindungscode ein." TextWrapping="Wrap" />
<TextBox x:Name="CodeBox" MaxLength="6" Watermark="123456" />
<Button x:Name="ConnectButton" Content="Verbinden" Click="ConnectButton_Click" />
<Border Padding="14" Classes="card">
<StackPanel Spacing="8">
<TextBlock Text="Upload-Ordner" FontWeight="SemiBold" />
<TextBlock x:Name="FolderText" Text="Noch nicht ausgewählt." TextWrapping="Wrap" Classes="subtitle" />
<StackPanel Orientation="Horizontal" Spacing="8">
<Button x:Name="DslrBoothPresetButton" Content="DSLrBooth" Click="DslrBoothPresetButton_Click" Classes="secondary" IsVisible="False" />
<Button x:Name="SparkboothPresetButton" Content="Sparkbooth" Click="SparkboothPresetButton_Click" Classes="secondary" IsVisible="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<Button x:Name="PickFolderButton" Content="Ordner auswählen" Click="PickFolderButton_Click" IsEnabled="False" Classes="primary" />
<Button x:Name="TestUploadButton" Content="Test-Upload senden" Click="TestUploadButton_Click" IsEnabled="False" Classes="secondary" />
</StackPanel>
</StackPanel>
</Border>
<StackPanel Spacing="6">
<TextBlock Text="Upload-Ordner" FontWeight="SemiBold" />
<TextBlock x:Name="FolderText" Text="Noch nicht ausgewählt." TextWrapping="Wrap" />
<Button x:Name="PickFolderButton" Content="Ordner auswählen" Click="PickFolderButton_Click" IsEnabled="False" />
</StackPanel>
<ToggleSwitch x:Name="QuietToggle" Content="Ruhiger Modus (nur Fehler anzeigen)" />
<Border x:Name="AdvancedPanel" Padding="12" Classes="card accent" IsVisible="False">
<StackPanel Spacing="6">
<TextBlock Text="Erweiterte Einstellungen" FontWeight="SemiBold" />
<ToggleSwitch x:Name="SettingsUnlockToggle" Content="Einstellungen entsperren" Checked="SettingsUnlockToggle_Changed" Unchecked="SettingsUnlockToggle_Changed" />
<TextBlock Text="Profile" />
<ComboBox x:Name="ProfilesBox" />
<StackPanel Orientation="Horizontal" Spacing="8">
<Button x:Name="LoadProfileButton" Content="Profil laden" Click="LoadProfileButton_Click" Classes="secondary" />
<Button x:Name="SaveProfileButton" Content="Profil speichern" Click="SaveProfileButton_Click" Classes="secondary" />
</StackPanel>
<TextBlock Text="Basis-URL" />
<TextBox x:Name="BaseUrlBox" Watermark="https://fotospiel.app" />
<TextBlock Text="Max. parallele Uploads" />
<TextBox x:Name="MaxUploadsBox" Watermark="2" />
<TextBlock Text="Upload-Tempo" />
<ComboBox x:Name="UploadTempoBox" SelectedIndex="1">
<ComboBoxItem Content="Schnell (ohne Pause)" />
<ComboBoxItem Content="Normal" />
<ComboBoxItem Content="Sanft (schont Netzwerk)" />
</ComboBox>
<TextBlock Text="Nur diese Dateien (optional)" />
<TextBox x:Name="IncludePatternsBox" Watermark="*.jpg;*.jpeg;*.png" />
<TextBlock Text="Dateien ausschliessen (optional)" />
<TextBox x:Name="ExcludePatternsBox" Watermark="*_preview*;*.tmp" />
<TextBlock Text="Antwort-Format (optional)" />
<ComboBox x:Name="ResponseFormatBox" SelectedIndex="0">
<ComboBoxItem Content="Auto" />
<ComboBoxItem Content="JSON" />
<ComboBoxItem Content="XML" />
</ComboBox>
<TextBlock Text="Manuelle Zugangsdaten (optional)" FontWeight="SemiBold" Margin="0,8,0,0" />
<TextBlock Text="Diese Felder ueberschreiben den Verbindungscode." Classes="subtitle" TextWrapping="Wrap" />
<TextBlock Text="Upload-URL" />
<TextBox x:Name="ManualUploadUrlBox" Watermark="https://fotospiel.app/api/v1/photobooth/upload" />
<TextBlock Text="Benutzername" />
<TextBox x:Name="ManualUsernameBox" />
<TextBlock Text="Passwort" />
<TextBox x:Name="ManualPasswordBox" PasswordChar="•" />
<Button x:Name="TestConnectionButton" Content="Verbindung testen" Click="TestConnectionButton_Click" Classes="secondary" />
<Button x:Name="SaveAdvancedButton" Content="Speichern" Click="SaveAdvancedButton_Click" Classes="primary" />
</StackPanel>
</Border>
</StackPanel>
<StackPanel Grid.Column="2" Spacing="16" MaxWidth="380" Margin="0,6,0,0">
<Border Padding="14" Classes="card accent">
<StackPanel Grid.Column="2" Spacing="12" MaxWidth="380">
<Border Background="#1F000000" Padding="12" CornerRadius="8">
<StackPanel Spacing="6">
<TextBlock Text="Status" FontWeight="SemiBold" />
<TextBlock x:Name="StatusText" Text="Nicht verbunden." TextWrapping="Wrap" />
<TextBlock x:Name="LastUploadText" Text="Letzter Upload: —" />
<TextBlock x:Name="QueueStatusText" Text="Warteschlange: 0 · Läuft: 0 · Fehlgeschlagen: 0" />
<TextBlock x:Name="LiveStatusText" Text="Live: —" />
</StackPanel>
</Border>
<Border Padding="14" Classes="card">
<StackPanel Spacing="6">
<TextBlock Text="Details" FontWeight="SemiBold" />
<TextBlock x:Name="EventNameText" Text="Event: —" TextWrapping="Wrap" />
<TextBlock x:Name="BaseUrlText" Text="Basis-URL: —" TextWrapping="Wrap" />
<TextBlock x:Name="VersionText" Text="App-Version: —" />
<TextBlock x:Name="ConnectExpiryText" Text="Verbindungscode: —" TextWrapping="Wrap" />
<TextBlock x:Name="FolderHealthText" Text="Ordner: —" TextWrapping="Wrap" />
<TextBlock x:Name="DiskFreeText" Text="Freier Speicher: —" TextWrapping="Wrap" />
<TextBlock x:Name="LastSeenText" Text="Letzte Datei: —" TextWrapping="Wrap" />
<TextBlock x:Name="LastErrorText" Text="Letzter Fehler: —" TextWrapping="Wrap" />
<Button x:Name="LogCopyButton" Content="Log kopieren" Click="LogCopyButton_Click" Classes="secondary" />
</StackPanel>
</Border>
<Border Padding="14" Classes="card">
<StackPanel Spacing="8">
<TextBlock Text="Letzte Uploads" FontWeight="SemiBold" />
<ItemsControl x:Name="RecentUploadsList" ItemsSource="{Binding RecentUploads}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Background="#14FFFFFF" Padding="10" CornerRadius="8" Margin="0,0,0,8">
<Grid ColumnDefinitions="*,Auto" RowDefinitions="Auto,Auto">
<TextBlock Grid.Column="0" Grid.Row="0" Text="{Binding FileName}" />
<TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding StatusLabel}" />
<TextBlock Grid.Column="0" Grid.Row="1" Text="{Binding UpdatedLabel}" Opacity="0.7" FontSize="11" />
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<StackPanel Orientation="Horizontal" Spacing="8">
<Button x:Name="RetryFailedButton" Content="Fehlgeschlagene erneut senden" Click="RetryFailedButton_Click" IsEnabled="False" Classes="secondary" />
<Button x:Name="ClearFailedButton" Content="Fehlerliste leeren" Click="ClearFailedButton_Click" IsEnabled="False" Classes="secondary" />
</StackPanel>
</StackPanel>
</Border>
<StackPanel Spacing="6">
<TextBlock Text="Letzte Uploads" FontWeight="SemiBold" />
<ItemsControl x:Name="RecentUploadsList" ItemsSource="{Binding RecentUploads}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Background="#14000000" Padding="8" CornerRadius="6" Margin="0,0,0,6">
<Grid ColumnDefinitions="*,Auto" RowDefinitions="Auto,Auto">
<TextBlock Grid.Column="0" Grid.Row="0" Text="{Binding FileName}" />
<TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding StatusLabel}" />
<TextBlock Grid.Column="0" Grid.Row="1" Text="{Binding UpdatedLabel}" Opacity="0.7" FontSize="11" />
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Button x:Name="RetryFailedButton" Content="Fehlgeschlagene erneut senden" Click="RetryFailedButton_Click" IsEnabled="False" />
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</Window>

View File

@@ -13,9 +13,6 @@ public sealed class PhotoboothConnectResponse
public sealed class PhotoboothConnectPayload
{
[JsonPropertyName("event_name")]
public string? EventName { get; set; }
[JsonPropertyName("upload_url")]
public string? UploadUrl { get; set; }

View File

@@ -1,26 +0,0 @@
using System;
namespace PhotoboothUploader.Models;
public sealed class PhotoboothProfile
{
public string? Label { get; set; }
public string? EventName { get; set; }
public string? BaseUrl { get; set; }
public string? UploadUrl { get; set; }
public string? Username { get; set; }
public string? Password { get; set; }
public string? ResponseFormat { get; set; }
public string? WatchFolder { get; set; }
public string? IncludePatterns { get; set; }
public string? ExcludePatterns { get; set; }
public int MaxConcurrentUploads { get; set; } = 2;
public int UploadDelayMs { get; set; } = 500;
public string DisplayName
=> !string.IsNullOrWhiteSpace(Label)
? Label
: !string.IsNullOrWhiteSpace(EventName)
? EventName
: UploadUrl ?? BaseUrl ?? "Profil";
}

View File

@@ -1,29 +1,11 @@
using System;
using System.Collections.Generic;
namespace PhotoboothUploader.Models;
public sealed class PhotoboothSettings
{
public string? BaseUrl { get; set; }
public string? EventName { get; set; }
public string? UploadUrl { get; set; }
public string? Username { get; set; }
public string? Password { get; set; }
public string? ResponseFormat { get; set; }
public string? WatchFolder { get; set; }
public string? IncludePatterns { get; set; }
public string? ExcludePatterns { get; set; }
public List<string> PendingUploads { get; set; } = new();
public Dictionary<string, string> UploadedFiles { get; set; } = new(StringComparer.OrdinalIgnoreCase);
public List<PhotoboothProfile> Profiles { get; set; } = new();
public string? ConnectExpiresAt { get; set; }
public string? LastSeenFile { get; set; }
public string? LastSeenAt { get; set; }
public string? LastError { get; set; }
public string? LastErrorAt { get; set; }
public int MaxConcurrentUploads { get; set; } = 2;
public int UploadDelayMs { get; set; } = 500;
public double WindowWidth { get; set; }
public double WindowHeight { get; set; }
}

View File

@@ -4,7 +4,6 @@
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Assets\app.ico</ApplicationIcon>
<AvaloniaUseCompiledBindingsByDefault>false</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>
@@ -19,10 +18,4 @@
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Include="Assets\app.ico" />
<AvaloniaResource Include="Assets\logo.png" />
<AvaloniaResource Include="Assets\sample-upload.png" />
</ItemGroup>
</Project>

View File

@@ -1,7 +1,5 @@
using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Http.Json;
using System.Text.Json;
using System.Threading;
@@ -12,111 +10,41 @@ namespace PhotoboothUploader.Services;
public sealed class PhotoboothConnectClient
{
private const int MaxRetries = 2;
private static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(10);
private readonly HttpClient _httpClient;
private readonly JsonSerializerOptions _jsonOptions = new()
{
PropertyNameCaseInsensitive = true,
};
public PhotoboothConnectClient(string baseUrl, string userAgent)
public PhotoboothConnectClient(string baseUrl)
{
_httpClient = new HttpClient
{
BaseAddress = new Uri(baseUrl),
Timeout = DefaultTimeout,
};
_httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
_httpClient.DefaultRequestHeaders.UserAgent.ParseAdd(userAgent);
}
public async Task<PhotoboothConnectResponse> RedeemAsync(string code, CancellationToken cancellationToken = default)
{
var request = new { code };
var response = await _httpClient.PostAsJsonAsync("/api/v1/photobooth/connect", new { code }, cancellationToken);
var payload = await response.Content.ReadFromJsonAsync<PhotoboothConnectResponse>(_jsonOptions, cancellationToken);
for (var attempt = 0; attempt <= MaxRetries; attempt++)
if (payload is null)
{
try
return new PhotoboothConnectResponse
{
using var response = await _httpClient.PostAsJsonAsync("/api/v1/photobooth/connect", request, cancellationToken);
var payload = await ReadPayloadAsync(response, cancellationToken);
if (response.IsSuccessStatusCode)
{
return payload ?? Fail(response.ReasonPhrase ?? "Verbindung fehlgeschlagen.");
}
if (response.StatusCode is HttpStatusCode.UnprocessableEntity or HttpStatusCode.Conflict or HttpStatusCode.Unauthorized)
{
return payload ?? Fail(response.ReasonPhrase ?? "Verbindung fehlgeschlagen.");
}
if (attempt < MaxRetries && IsTransientStatus(response.StatusCode))
{
await Task.Delay(GetRetryDelay(attempt), cancellationToken);
continue;
}
return payload ?? Fail(response.ReasonPhrase ?? "Verbindung fehlgeschlagen.");
}
catch (TaskCanceledException) when (!cancellationToken.IsCancellationRequested)
{
if (attempt < MaxRetries)
{
await Task.Delay(GetRetryDelay(attempt), cancellationToken);
continue;
}
return Fail("Zeitüberschreitung bei der Verbindung.");
}
catch (HttpRequestException)
{
if (attempt < MaxRetries)
{
await Task.Delay(GetRetryDelay(attempt), cancellationToken);
continue;
}
return Fail("Netzwerkfehler. Bitte Verbindung prüfen.");
}
catch (JsonException)
{
return Fail("Serverantwort konnte nicht gelesen werden.");
}
Message = response.ReasonPhrase ?? "Verbindung fehlgeschlagen.",
};
}
return Fail("Verbindung fehlgeschlagen.");
}
private async Task<PhotoboothConnectResponse?> ReadPayloadAsync(HttpResponseMessage response, CancellationToken cancellationToken)
{
if (response.Content.Headers.ContentLength == 0)
if (!response.IsSuccessStatusCode)
{
return null;
return new PhotoboothConnectResponse
{
Message = payload.Message ?? "Verbindung fehlgeschlagen.",
};
}
return await response.Content.ReadFromJsonAsync<PhotoboothConnectResponse>(_jsonOptions, cancellationToken);
}
private static bool IsTransientStatus(HttpStatusCode statusCode)
{
return statusCode is HttpStatusCode.RequestTimeout or HttpStatusCode.TooManyRequests
or HttpStatusCode.BadGateway or HttpStatusCode.ServiceUnavailable or HttpStatusCode.GatewayTimeout
or HttpStatusCode.InternalServerError;
}
private static TimeSpan GetRetryDelay(int attempt)
{
return TimeSpan.FromMilliseconds(500 * (attempt + 1));
}
private static PhotoboothConnectResponse Fail(string message)
{
return new PhotoboothConnectResponse
{
Message = message,
};
return payload;
}
}

View File

@@ -14,7 +14,6 @@ public sealed class SettingsStore
};
public string SettingsPath { get; }
public string LogPath { get; }
public SettingsStore()
{
@@ -25,7 +24,6 @@ public sealed class SettingsStore
Directory.CreateDirectory(basePath);
SettingsPath = Path.Combine(basePath, "settings.json");
LogPath = Path.Combine(basePath, "uploader.log");
}
public PhotoboothSettings Load()

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
@@ -13,38 +12,21 @@ namespace PhotoboothUploader.Services;
public sealed class UploadService
{
private static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(20);
private static readonly TimeSpan RetryBaseDelay = TimeSpan.FromSeconds(2);
private const int MaxRetries = 2;
private readonly Channel<string> _queue = Channel.CreateUnbounded<string>();
private readonly ConcurrentDictionary<string, byte> _pending = new(StringComparer.OrdinalIgnoreCase);
private string _userAgent = "FotospielPhotoboothUploader";
private CancellationTokenSource? _cts;
private readonly List<Task> _workers = new();
public void Configure(string userAgent)
{
if (!string.IsNullOrWhiteSpace(userAgent))
{
_userAgent = userAgent;
}
}
public void Start(
PhotoboothSettings settings,
Action<string> onQueued,
Action<string> onUploading,
Action<string> onSuccess,
Action<string, string> onFailure)
Action<string> onFailure)
{
Stop();
_cts = new CancellationTokenSource();
var workerCount = GetWorkerCount(settings);
for (var i = 0; i < workerCount; i++)
{
_workers.Add(Task.Run(() => WorkerAsync(settings, onQueued, onUploading, onSuccess, onFailure, _cts.Token)));
}
_ = Task.Run(() => WorkerAsync(settings, onQueued, onUploading, onSuccess, onFailure, _cts.Token));
}
public void Stop()
@@ -52,7 +34,6 @@ public sealed class UploadService
_cts?.Cancel();
_cts = null;
_pending.Clear();
_workers.Clear();
}
public void Enqueue(string path, Action<string> onQueued)
@@ -71,7 +52,7 @@ public sealed class UploadService
Action<string> onQueued,
Action<string> onUploading,
Action<string> onSuccess,
Action<string, string> onFailure,
Action<string> onFailure,
CancellationToken token)
{
if (string.IsNullOrWhiteSpace(settings.UploadUrl))
@@ -80,9 +61,6 @@ public sealed class UploadService
}
using var client = new HttpClient();
client.Timeout = DefaultTimeout;
client.DefaultRequestHeaders.UserAgent.ParseAdd(_userAgent);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
while (await _queue.Reader.WaitToReadAsync(token))
{
@@ -91,72 +69,58 @@ public sealed class UploadService
try
{
onUploading(path);
var error = await UploadWithRetryAsync(client, settings, path, token);
if (error is null)
{
onSuccess(path);
}
else
{
onFailure(path, error);
}
await WaitForFileReadyAsync(path, token);
await UploadAsync(client, settings, path, token);
onSuccess(path);
}
catch (OperationCanceledException)
{
return;
}
catch
{
onFailure(path);
}
finally
{
_pending.TryRemove(path, out _);
if (settings.UploadDelayMs > 0)
{
await Task.Delay(settings.UploadDelayMs, token);
}
}
}
}
}
private static async Task<string?> UploadWithRetryAsync(
HttpClient client,
PhotoboothSettings settings,
string path,
CancellationToken token)
private static async Task WaitForFileReadyAsync(string path, CancellationToken token)
{
for (var attempt = 0; attempt <= MaxRetries; attempt++)
var lastSize = -1L;
for (var attempts = 0; attempts < 10; attempts++)
{
var attemptError = await UploadOnceAsync(client, settings, path, token);
if (attemptError.Success)
token.ThrowIfCancellationRequested();
if (!File.Exists(path))
{
return null;
await Task.Delay(500, token);
continue;
}
if (!attemptError.Retryable || attempt >= MaxRetries)
var info = new FileInfo(path);
var size = info.Length;
if (size > 0 && size == lastSize)
{
return attemptError.Error ?? "Upload fehlgeschlagen.";
return;
}
await Task.Delay(GetRetryDelay(attempt), token);
lastSize = size;
await Task.Delay(700, token);
}
return "Upload fehlgeschlagen.";
}
private static async Task<UploadAttempt> UploadOnceAsync(
HttpClient client,
PhotoboothSettings settings,
string path,
CancellationToken token)
private static async Task UploadAsync(HttpClient client, PhotoboothSettings settings, string path, CancellationToken token)
{
var readyError = await WaitForFileReadyAsync(path, token);
if (readyError is not null)
{
return UploadAttempt.Fail(readyError, retryable: false);
}
if (!File.Exists(path))
{
return UploadAttempt.Fail("Datei nicht gefunden.", retryable: false);
return;
}
using var content = new MultipartFormDataContent();
@@ -181,61 +145,8 @@ public sealed class UploadService
fileContent.Headers.ContentType = new MediaTypeHeaderValue(ResolveContentType(path));
content.Add(fileContent, "media", Path.GetFileName(path));
try
{
var response = await client.PostAsync(settings.UploadUrl, content, token);
if (response.IsSuccessStatusCode)
{
return UploadAttempt.Ok();
}
var body = await ReadResponseBodyAsync(response, token);
var status = $"{(int)response.StatusCode} {response.ReasonPhrase}".Trim();
var message = string.IsNullOrWhiteSpace(body) ? status : $"{status} {body}";
return UploadAttempt.Fail(message, IsRetryableStatus(response.StatusCode));
}
catch (TaskCanceledException) when (!token.IsCancellationRequested)
{
return UploadAttempt.Fail("Zeitüberschreitung beim Upload.", retryable: true);
}
catch (HttpRequestException)
{
return UploadAttempt.Fail("Netzwerkfehler beim Upload.", retryable: true);
}
catch (IOException)
{
return UploadAttempt.Fail("Datei konnte nicht gelesen werden.", retryable: false);
}
}
private static async Task<string?> WaitForFileReadyAsync(string path, CancellationToken token)
{
var lastSize = -1L;
for (var attempts = 0; attempts < 10; attempts++)
{
token.ThrowIfCancellationRequested();
if (!File.Exists(path))
{
await Task.Delay(500, token);
continue;
}
var info = new FileInfo(path);
var size = info.Length;
if (size > 0 && size == lastSize)
{
return null;
}
lastSize = size;
await Task.Delay(700, token);
}
return "Datei ist noch in Bearbeitung.";
var response = await client.PostAsync(settings.UploadUrl, content, token);
response.EnsureSuccessStatusCode();
}
private static string ResolveContentType(string path)
@@ -247,51 +158,4 @@ public sealed class UploadService
_ => "image/jpeg",
};
}
private static bool IsRetryableStatus(System.Net.HttpStatusCode statusCode)
{
var numeric = (int)statusCode;
return numeric >= 500 || statusCode is System.Net.HttpStatusCode.RequestTimeout or System.Net.HttpStatusCode.TooManyRequests;
}
private static TimeSpan GetRetryDelay(int attempt)
{
var jitter = TimeSpan.FromMilliseconds(Random.Shared.Next(100, 350));
return TimeSpan.FromMilliseconds(RetryBaseDelay.TotalMilliseconds * Math.Pow(2, attempt)) + jitter;
}
private static async Task<string?> ReadResponseBodyAsync(HttpResponseMessage response, CancellationToken token)
{
if (response.Content is null)
{
return null;
}
var body = await response.Content.ReadAsStringAsync(token);
if (string.IsNullOrWhiteSpace(body))
{
return null;
}
body = body.Trim();
return body.Length > 200 ? body[..200] + "…" : body;
}
private static int GetWorkerCount(PhotoboothSettings settings)
{
var count = settings.MaxConcurrentUploads;
if (count < 1)
{
return 1;
}
return count > 5 ? 5 : count;
}
private readonly record struct UploadAttempt(bool Success, bool Retryable, string? Error)
{
public static UploadAttempt Ok() => new(true, false, null);
public static UploadAttempt Fail(string error, bool retryable) => new(false, retryable, error);
}
}

View File

@@ -24,8 +24,7 @@
"simplesoftwareio/simple-qrcode": "^4.2",
"spatie/laravel-translatable": "^6.11",
"staudenmeir/belongs-to-through": "^2.17",
"stripe/stripe-php": "*",
"symfony/yaml": "^7.0"
"stripe/stripe-php": "*"
},
"require-dev": {
"fakerphp/faker": "^1.23",

914
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -28,8 +28,8 @@ class TenantFactory extends Factory
'settings' => json_encode([
'branding' => [
'logo_url' => null,
'primary_color' => '#FF5A5F',
'secondary_color' => '#FFF8F5',
'primary_color' => '#3B82F6',
'secondary_color' => '#1F2937',
'font_family' => 'Inter, sans-serif',
],
'features' => [

View File

@@ -1,34 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('packages', function (Blueprint $table) {
if (! Schema::hasColumn('packages', 'included_package_slug')) {
$table->string('included_package_slug')->nullable()->after('type');
$table->index(['type', 'included_package_slug']);
}
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('packages', function (Blueprint $table) {
if (Schema::hasColumn('packages', 'included_package_slug')) {
$table->dropIndex(['type', 'included_package_slug']);
$table->dropColumn('included_package_slug');
}
});
}
};

View File

@@ -46,9 +46,9 @@ class DemoEventSeeder extends Seeder
'collection_slugs' => ['wedding-classics-2025'],
'task_slug_prefix' => 'wedding-',
'branding' => [
'primary_color' => '#FF5A5F',
'secondary_color' => '#FFF8F5',
'background_color' => '#FFF8F5',
'primary_color' => '#f43f5e',
'secondary_color' => '#fb7185',
'background_color' => '#fff7f4',
'font_family' => 'Playfair Display, serif',
],
],

View File

@@ -76,8 +76,8 @@ class DemoTenantSeeder extends Seeder
'contact_email' => $user->email,
'branding' => [
'logo_url' => null,
'primary_color' => '#FF5A5F',
'secondary_color' => '#FFF8F5',
'primary_color' => '#f43f5e',
'secondary_color' => '#1f2937',
],
],
]

View File

@@ -2,9 +2,9 @@
namespace Database\Seeders;
use App\Enums\PackageType;
use App\Models\Package;
use Illuminate\Database\Seeder;
use App\Models\Package;
use App\Enums\PackageType;
class PackageSeeder extends Seeder
{
@@ -14,7 +14,7 @@ class PackageSeeder extends Seeder
public function run(): void
{
$packages = [
[
'slug' => 'starter',
'name' => 'Starter',
@@ -28,13 +28,12 @@ class PackageSeeder extends Seeder
'max_guests' => 100,
'gallery_days' => 180,
'max_tasks' => 30,
'max_events_per_year' => 1,
'watermark_allowed' => false,
'watermark_allowed' => true,
'branding_allowed' => false,
'features' => ['basic_uploads', 'limited_sharing', 'custom_tasks'],
'paddle_product_id' => 'pro_01k8jcxx2g1vj9snqbga4283ej',
'paddle_price_id' => 'pri_01k8jcxx8qktxvqzzv0nkjjj27',
'description' => <<<'TEXT'
'description' => <<<TEXT
Ideal für Geburtstage, Gartenpartys oder Polterabende! {{max_guests}} Gäste teilen ihre besten Schnappschüsse, lösen {{max_tasks}} Fotoaufgaben und haben {{gallery_duration}} Zugriff auf die Online-Galerie. {{max_photos}} Bilder sind inklusive genug Platz für jede Menge Lieblingsmomente.
TEXT,
'description_translations' => [
@@ -62,12 +61,12 @@ TEXT,
'max_guests' => 250,
'gallery_days' => 365,
'max_tasks' => 100,
'watermark_allowed' => true,
'watermark_allowed' => false,
'branding_allowed' => true,
'features' => ['basic_uploads', 'unlimited_sharing', 'custom_branding', 'custom_tasks', 'live_slideshow', 'no_watermark'],
'features' => ['basic_uploads', 'unlimited_sharing', 'custom_branding', 'custom_tasks', 'live_slideshow'],
'paddle_product_id' => 'pro_01k8jcxwjv4ne8vf9pvd9bye3j',
'paddle_price_id' => 'pri_01k8jcxws51pze5xc3vj2ea0yc',
'description' => <<<'TEXT'
'description' => <<<TEXT
Das Rundum-Sorglos-Paket für Hochzeiten, Firmenfeiern oder Jubiläen. {{max_photos}} Bilder, {{max_guests}} Gäste und {{max_tasks}} Fotoaufgaben dazu eine Galerie, die {{gallery_duration}} online bleibt. Eigenes Logo oder Wasserzeichen inklusive.
TEXT,
'description_translations' => [
@@ -95,17 +94,17 @@ TEXT,
'max_guests' => null,
'gallery_days' => 730,
'max_tasks' => 200,
'watermark_allowed' => true,
'watermark_allowed' => false,
'branding_allowed' => true,
'features' => ['basic_uploads', 'unlimited_sharing', 'custom_branding', 'custom_tasks', 'live_slideshow', 'advanced_analytics', 'priority_support'],
'paddle_product_id' => 'pro_01k8jcxvwp38gay6jj2akjg76s',
'paddle_price_id' => 'pri_01k8jcxw5sap4r306wcvc0ephy',
'description' => <<<'TEXT'
Das volle Erlebnis für alle, die keine Kompromisse machen wollen. {{max_photos}} Bilder, unbegrenzt viele Gäste, {{gallery_duration}} Galerie-Zugang und {{max_tasks}} Aufgaben dazu eigenes Wasserzeichen, Live-Slideshow und Premium-Support.
'description' => <<<TEXT
Das volle Erlebnis für alle, die keine Kompromisse machen wollen. {{max_photos}} Bilder, unbegrenzt viele Gäste, {{gallery_duration}} Galerie-Zugang und {{max_tasks}} Aufgaben dazu kein Wasserzeichen, Live-Slideshow und Premium-Support.
TEXT,
'description_translations' => [
'de' => 'Das volle Erlebnis für alle, die keine Kompromisse machen wollen. {{max_photos}} Bilder, unbegrenzt viele Gäste, {{gallery_duration}} Galerie-Zugang und {{max_tasks}} Aufgaben dazu eigenes Wasserzeichen, Live-Slideshow und Premium-Support.',
'en' => 'The full experience for anyone who refuses to compromise. {{max_photos}} photos, unlimited guests, {{gallery_duration}} of gallery access and {{max_tasks}} challenges—custom watermark, live slideshow and premium support included.',
'de' => 'Das volle Erlebnis für alle, die keine Kompromisse machen wollen. {{max_photos}} Bilder, unbegrenzt viele Gäste, {{gallery_duration}} Galerie-Zugang und {{max_tasks}} Aufgaben dazu kein Wasserzeichen, Live-Slideshow und Premium-Support.',
'en' => 'The full experience for anyone who refuses to compromise. {{max_photos}} photos, unlimited guests, {{gallery_duration}} of gallery access and {{max_tasks}} challenges—no watermark, live slideshow and premium support included.',
],
'description_table' => [
['title' => 'Fotos', 'value' => '{{max_photos}}'],
@@ -117,149 +116,111 @@ TEXT,
],
[
'slug' => 's-small-reseller',
'name' => 'Partner Start',
'name' => 'Reseller S',
'name_translations' => [
'de' => 'Partner Start',
'en' => 'Partner Start',
'de' => 'Reseller S',
'en' => 'Reseller S',
],
'type' => PackageType::RESELLER,
'included_package_slug' => 'starter',
'price' => 149.00,
'max_photos' => null,
'max_photos' => 1000,
'max_guests' => null,
'gallery_days' => null,
'gallery_days' => 30,
'max_tasks' => null,
'watermark_allowed' => true,
'branding_allowed' => true,
'max_events_per_year' => 5,
'expires_after' => null,
'expires_after' => now()->copy()->addYear(),
'features' => ['reseller_dashboard', 'custom_branding', 'priority_support'],
'paddle_product_id' => 'pro_01k8jcxvax48mhmwsfydw8ha9y',
'paddle_price_id' => 'pri_01k8jcxvhe0bfasg9gg1rw70sy',
'description' => <<<'TEXT'
Event-Kontingent r Partner / Agenturen: {{max_events_per_year}} Events auf StarterNiveau. Empfohlen innerhalb von 24 Monaten zu nutzen.
'description' => <<<TEXT
Das perfekte Paket für Fotografen oder Planer, die erste Erfahrungen mit Fotospiel sammeln wollen. Enthalten sind {{max_events_per_year}} Events pro Jahr mit Standard-Leistung Branding-Optionen inklusive.
TEXT,
'description_translations' => [
'de' => 'Event-Kontingent für Partner / Agenturen: {{max_events_per_year}} Events auf StarterNiveau. Empfohlen innerhalb von 24 Monaten zu nutzen.',
'en' => 'Event-Kontingent for Partner / Agencies: {{max_events_per_year}} events at Starter level. Recommended to use within 24 months.',
'de' => 'Das perfekte Paket für Fotografen oder Planer, die erste Erfahrungen mit Fotospiel sammeln wollen. Enthalten sind {{max_events_per_year}} Events pro Jahr mit Standard-Leistung Branding-Optionen inklusive.',
'en' => 'Perfect for photographers or planners getting started with Fotospiel. Includes {{max_events_per_year}} events per year with the standard feature set—branding options included.',
],
'description_table' => [
['title' => 'Events', 'value' => '{{max_events_per_year}} Events'],
['title' => 'Inklusive Event-Level', 'value' => 'Starter'],
['title' => 'Empfehlung', 'value' => 'Empfohlen innerhalb von 24 Monaten zu nutzen.'],
['title' => 'Events/Jahr', 'value' => '{{max_events_per_year}} Events'],
['title' => 'Galerie', 'value' => '{{gallery_duration}}'],
['title' => 'Branding', 'value' => 'Logo & Farben pro Event'],
],
],
[
'slug' => 'm-medium-reseller',
'name' => 'Partner Standard',
'name' => 'Reseller M',
'name_translations' => [
'de' => 'Partner Standard',
'en' => 'Partner Standard',
'de' => 'Reseller M',
'en' => 'Reseller M',
],
'type' => PackageType::RESELLER,
'included_package_slug' => 'standard',
'price' => 349.00,
'max_photos' => null,
'max_photos' => 1500,
'max_guests' => null,
'gallery_days' => null,
'gallery_days' => 60,
'max_tasks' => null,
'watermark_allowed' => true,
'branding_allowed' => true,
'max_events_per_year' => 15,
'expires_after' => null,
'expires_after' => now()->copy()->addYear(),
'features' => ['reseller_dashboard', 'custom_branding', 'priority_support', 'advanced_reporting'],
'paddle_product_id' => 'pro_01k8jcxtrxw7jsew52jnax901q',
'paddle_price_id' => 'pri_01k8jcxv06nsgy8ym8mnfrfm5v',
'description' => <<<'TEXT'
Event-Kontingent für Partner / Agenturen: {{max_events_per_year}} Events auf StandardNiveau. Empfohlen innerhalb von 24 Monaten zu nutzen.
'description' => <<<TEXT
Wenn du regelmäßig Hochzeiten, Firmenfeste oder private Events betreust, ist dieses Paket ideal. {{max_events_per_year}} Events pro Jahr mit Branding-Optionen, verlängerter Galerie-Laufzeit und Reporting inklusive.
TEXT,
'description_translations' => [
'de' => 'Event-Kontingent für Partner / Agenturen: {{max_events_per_year}} Events auf StandardNiveau. Empfohlen innerhalb von 24 Monaten zu nutzen.',
'en' => 'Event-Kontingent for Partner / Agencies: {{max_events_per_year}} events at Standard level. Recommended to use within 24 months.',
'de' => 'Wenn du regelmäßig Hochzeiten, Firmenfeste oder private Events betreust, ist dieses Paket ideal. {{max_events_per_year}} Events pro Jahr mit Branding-Optionen, verlängerter Galerie-Laufzeit und Reporting inklusive.',
'en' => 'Designed for professionals who regularly support weddings, corporate events or private parties. {{max_events_per_year}} events per year with branding options, extended gallery runtime and reporting included.',
],
'description_table' => [
['title' => 'Events', 'value' => '{{max_events_per_year}} Events'],
['title' => 'Inklusive Event-Level', 'value' => 'Standard'],
['title' => 'Empfehlung', 'value' => 'Empfohlen innerhalb von 24 Monaten zu nutzen.'],
['title' => 'Events/Jahr', 'value' => '{{max_events_per_year}} Events'],
['title' => 'Galerie', 'value' => '{{gallery_duration}}'],
['title' => 'Reporting', 'value' => 'Erweiterte Auswertungen'],
],
],
[
'slug' => 'l-large-reseller',
'name' => 'Partner Premium',
'name' => 'Reseller L',
'name_translations' => [
'de' => 'Partner Premium',
'en' => 'Partner Premium',
'de' => 'Reseller L',
'en' => 'Reseller L',
],
'type' => PackageType::RESELLER,
'included_package_slug' => 'pro',
'price' => 1999.00,
'max_photos' => null,
'price' => 699.00,
'max_photos' => 3000,
'max_guests' => null,
'gallery_days' => null,
'gallery_days' => 90,
'max_tasks' => null,
'watermark_allowed' => true,
'watermark_allowed' => false,
'branding_allowed' => true,
'max_events_per_year' => 35,
'expires_after' => null,
'max_events_per_year' => 40,
'expires_after' => now()->copy()->addYear(),
'features' => ['reseller_dashboard', 'custom_branding', 'priority_support', 'advanced_reporting', 'live_slideshow'],
'paddle_product_id' => 'pro_01k8jcxt7gc6g6ddavmq65txzz',
'paddle_price_id' => 'pri_01k8jcxtfa07gvq43kpvpe0t8z',
'description' => <<<'TEXT'
Event-Kontingent r Partner / Agenturen: {{max_events_per_year}} Events auf PremiumNiveau. Empfohlen innerhalb von 24 Monaten zu nutzen.
'description' => <<<TEXT
Ideal für Agenturen, Fotografen oder Eventdienstleister mit vielen Veranstaltungen im Jahr. {{max_events_per_year}} Events inklusive, White-Label-Branding und alle Premium-Funktionen sorgen für maximale Flexibilität.
TEXT,
'description_translations' => [
'de' => 'Event-Kontingent für Partner / Agenturen: {{max_events_per_year}} Events auf PremiumNiveau. Empfohlen innerhalb von 24 Monaten zu nutzen.',
'en' => 'Event-Kontingent for Partner / Agencies: {{max_events_per_year}} events at Premium level. Recommended to use within 24 months.',
'de' => 'Ideal für Agenturen, Fotografen oder Eventdienstleister mit vielen Veranstaltungen im Jahr. {{max_events_per_year}} Events inklusive, White-Label-Branding und alle Premium-Funktionen sorgen für maximale Flexibilität.',
'en' => 'Ideal for agencies, photographers or event providers with a packed calendar. {{max_events_per_year}} events included, white-label branding and all premium features for maximum flexibility.',
],
'description_table' => [
['title' => 'Events', 'value' => '{{max_events_per_year}} Events'],
['title' => 'Inklusive Event-Level', 'value' => 'Premium'],
['title' => 'Empfehlung', 'value' => 'Empfohlen innerhalb von 24 Monaten zu nutzen.'],
],
],
[
'slug' => 'partner-premium-5',
'name' => 'Partner Premium-Kontingent (5 Events)',
'name_translations' => [
'de' => 'Partner Premium-Kontingent (5 Events)',
'en' => 'Partner Premium kontingent (5 events)',
],
'type' => PackageType::RESELLER,
'included_package_slug' => 'pro',
'price' => 549.00,
'max_photos' => null,
'max_guests' => null,
'gallery_days' => null,
'max_tasks' => null,
'watermark_allowed' => true,
'branding_allowed' => true,
'max_events_per_year' => 5,
'expires_after' => null,
'features' => ['reseller_dashboard', 'custom_branding', 'priority_support'],
'paddle_product_id' => 'pro_01kf16ttp0fph79j59x0z1cdqc',
'paddle_price_id' => 'pri_01kf16v0v2z4hse5cxq5wnah4b',
'description' => <<<'TEXT'
Premium Event-Kontingent für Partner / Agenturen: {{max_events_per_year}} Events auf PremiumNiveau. Empfohlen innerhalb von 24 Monaten zu nutzen.
TEXT,
'description_translations' => [
'de' => 'Premium Event-Kontingent für Partner / Agenturen: {{max_events_per_year}} Events auf PremiumNiveau. Empfohlen innerhalb von 24 Monaten zu nutzen.',
'en' => 'Premium Event-Kontingent for Partner / Agencies: {{max_events_per_year}} events at Premium level. Recommended to use within 24 months.',
],
'description_table' => [
['title' => 'Events', 'value' => '{{max_events_per_year}} Events'],
['title' => 'Inklusive Event-Level', 'value' => 'Premium'],
['title' => 'Empfehlung', 'value' => 'Empfohlen innerhalb von 24 Monaten zu nutzen.'],
['title' => 'Events/Jahr', 'value' => '{{max_events_per_year}} Events'],
['title' => 'Branding', 'value' => 'White-Label & eigene Domains'],
['title' => 'Extras', 'value' => 'Live-Slideshow & Premium-Features'],
],
],
[
'slug' => 'studio-annual',
'name' => 'Partner Jahreskontingent (24 Events)',
'name' => 'Studio Jahrespaket',
'name_translations' => [
'de' => 'Partner Jahreskontingent (24 Events)',
'en' => 'Partner annual kontingent (24 events)',
'de' => 'Studio Jahrespaket',
'en' => 'Studio Annual',
],
'type' => PackageType::RESELLER,
'included_package_slug' => 'standard',
'price' => 1299.00,
'max_photos' => null,
'max_guests' => null,
@@ -269,20 +230,42 @@ TEXT,
'branding_allowed' => false,
'max_events_per_year' => 24,
'expires_after' => null,
'features' => ['reseller_dashboard', 'custom_branding', 'priority_support', 'advanced_reporting'],
'features' => ['basic_uploads', 'unlimited_sharing', 'custom_branding'],
'paddle_product_id' => 'pro_01k8jct3gz9ks5mg6z61q6nrxb',
'paddle_price_id' => 'pri_01k8jcxsa8axwpjnybhjbcrb06',
'description' => <<<'TEXT'
Event-Kontingent für Partner / Agenturen: {{max_events_per_year}} Events auf StandardNiveau. Empfohlen innerhalb von 24 Monaten zu nutzen.
'description' => null,
'description_translations' => null,
'description_table' => [],
],
[
'slug' => 'enterprise-unlimited',
'name' => 'Enterprise / Unlimited',
'name_translations' => [
'de' => 'Enterprise / Unlimited',
'en' => 'Enterprise / Unlimited',
],
'type' => PackageType::RESELLER,
'price' => 1999.00,
'max_photos' => null,
'max_guests' => null,
'gallery_days' => null,
'max_tasks' => null,
'watermark_allowed' => false,
'branding_allowed' => true,
'max_events_per_year' => null,
'expires_after' => now()->copy()->addYear(),
'features' => ['reseller_dashboard', 'custom_branding', 'priority_support', 'advanced_reporting', 'live_slideshow', 'unlimited_sharing'],
'description' => <<<TEXT
Das Rundum-Paket für Unternehmen und Agenturen, die maximale Flexibilität brauchen. {{max_events_per_year}} Events, volles White-Label-Branding, eigene Subdomain oder App-Branding alles individuell anpassbar, inklusive persönlicher Betreuung.
TEXT,
'description_translations' => [
'de' => 'Event-Kontingent für Partner / Agenturen: {{max_events_per_year}} Events auf StandardNiveau. Empfohlen innerhalb von 24 Monaten zu nutzen.',
'en' => 'Event-Kontingent for Partner / Agencies: {{max_events_per_year}} events at Standard level. Recommended to use within 24 months.',
'de' => 'Das Rundum-Paket für Unternehmen und Agenturen, die maximale Flexibilität brauchen. {{max_events_per_year}} Events, volles White-Label-Branding, eigene Subdomain oder App-Branding alles individuell anpassbar, inklusive persönlicher Betreuung.',
'en' => 'The all-round package for enterprises and agencies needing maximum flexibility. {{max_events_per_year}} events, full white-label branding, your own subdomain or app branding—fully customisable with dedicated support.',
],
'description_table' => [
['title' => 'Events', 'value' => '{{max_events_per_year}} Events'],
['title' => 'Inklusive Event-Level', 'value' => 'Standard'],
['title' => 'Empfehlung', 'value' => 'Empfohlen innerhalb von 24 Monaten zu nutzen.'],
['title' => 'Events/Jahr', 'value' => '{{max_events_per_year}} Events'],
['title' => 'Branding', 'value' => 'Eigene Subdomain oder App'],
['title' => 'Support', 'value' => 'Persönliche Betreuung'],
],
],
];
@@ -296,7 +279,5 @@ TEXT,
])
);
}
Package::where('slug', 'enterprise-unlimited')->delete();
}
}

View File

@@ -106,24 +106,6 @@ services:
condition: service_healthy
restart: "no"
photobooth-uploader-build:
image: mcr.microsoft.com/dotnet/sdk:10.0
working_dir: /var/www/html
command:
- bash
- -lc
- /var/www/html/scripts/build-photobooth-uploader.sh
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
NUGET_PACKAGES: /root/.nuget/packages
volumes:
- app-code:/var/www/html
- nuget-cache:/root/.nuget/packages
depends_on:
app:
condition: service_healthy
restart: "no"
help-sync:
image: ${APP_IMAGE_REPO:-fotospiel-app}:${APP_IMAGE_TAG:-latest}
env_file:
@@ -358,7 +340,6 @@ volumes:
external: true
name: fotospiel-${APP_ENV:-prod}-storage
app-bootstrap-cache:
nuget-cache:
photobooth-import:
photobooth-ftp-auth:
mysql-data:

View File

@@ -53,23 +53,6 @@ refresh_config_cache() {
php artisan view:clear >/dev/null 2>&1 || true
}
ensure_help_cache() {
cd "$APP_TARGET"
if [[ "${HELP_SYNC_ON_BOOT:-auto}" == "0" ]]; then
return
fi
if [[ "${HELP_SYNC_ON_BOOT:-auto}" == "1" ]]; then
php artisan help:sync >/dev/null 2>&1 || true
return
fi
if ! compgen -G "$APP_TARGET/storage/app/help/*/*/articles.json" > /dev/null; then
php artisan help:sync >/dev/null 2>&1 || true
fi
}
wait_for_service() {
local name="$1" host="$2" port="$3" timeout="$4"
local start
@@ -137,7 +120,6 @@ ensure_helper_scripts
prepare_storage
refresh_config_cache
wait_for_dependencies
ensure_help_cache
cd "$APP_TARGET"
exec "$@"

View File

@@ -15,21 +15,11 @@ server {
try_files $uri $uri/ /index.php?$query_string;
}
location ^~ /api/ {
try_files $uri /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass app:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTP_X_FORWARDED_PROTO $http_x_forwarded_proto;
fastcgi_param HTTP_X_FORWARDED_HOST $http_x_forwarded_host;
fastcgi_param HTTP_X_FORWARDED_FOR $proxy_add_x_forwarded_for;
fastcgi_param HTTP_HOST $host;
fastcgi_param HTTP_X_FORWARDED_PORT $server_port;
fastcgi_param HTTPS $http_x_forwarded_proto;
fastcgi_buffer_size 32k;
fastcgi_buffers 8 16k;
}

View File

@@ -84,7 +84,7 @@ php artisan photobooth:ingest --event=123 --max-files=20
Use this when Sparkbooth runs in “Custom Upload” mode instead of FTP.
- Endpoint: `POST /api/v1/photobooth/upload`
- Endpoint: `POST /api/v1/photobooth/sparkbooth/upload`
- Auth: per-event username/password (set in Event Admin → Fotobox-Uploads; switch mode to “Sparkbooth”).
- Body (multipart/form-data): `media` (file or base64), `username`, `password`, optionally `name`, `email`, `message`.
- Response:
@@ -99,7 +99,7 @@ Use this when Sparkbooth runs in “Custom Upload” mode instead of FTP.
Example cURL (JSON response):
```bash
curl -X POST https://app.example.com/api/v1/photobooth/upload \
curl -X POST https://app.example.com/api/v1/photobooth/sparkbooth/upload \
-F "media=@/path/to/photo.jpg" \
-F "username=PB123" \
-F "password=SECRET" \
@@ -109,7 +109,7 @@ curl -X POST https://app.example.com/api/v1/photobooth/upload \
Example cURL (request XML response):
```bash
curl -X POST https://app.example.com/api/v1/photobooth/upload \
curl -X POST https://app.example.com/api/v1/photobooth/sparkbooth/upload \
-F "media=@/path/to/photo.jpg" \
-F "username=PB123" \
-F "password=SECRET" \

View File

@@ -65,25 +65,6 @@ return [
'benefit4' => 'Unterstuetzung, wenn du sie brauchst',
'footer' => 'Brauchst du Hilfe? Antworte einfach auf diese E-Mail.',
],
'photobooth_uploader' => [
'subject' => 'Fotospiel Uploader App fuer :event',
'preheader' => 'Download-Links fuer die Fotospiel Photobooth Uploader App.',
'hero_title' => 'Hallo :name,',
'hero_subtitle' => 'Deine Uploader App fuer :event ist bereit.',
'body' => 'Hier findest du die Download-Links fuer die Fotospiel Photobooth Uploader App. Installiere die passende Version auf dem Photobooth-PC, bevor dein Event startet.',
'downloads_title' => 'Download-Links',
'downloads' => [
'windows' => 'Windows (x64)',
'macos' => 'macOS (x64)',
'linux' => 'Linux (x64)',
],
'cta_windows' => 'Download fuer Windows',
'cta_macos' => 'Download fuer macOS',
'cta_linux' => 'Download fuer Linux',
'credentials_hint' => 'Die Zugangsdaten bleiben im Admin-Dashboard. Erstelle einen Verbindungscode, sobald du die App koppeln moechtest.',
'footer' => 'Fragen? Antworte einfach auf diese E-Mail.',
'event_fallback' => 'dein Event',
],
'package_limits' => [
'package_fallback' => 'Paket',
'team_fallback' => 'dein Team',

View File

@@ -65,25 +65,6 @@ return [
'benefit4' => 'Friendly support whenever you need help',
'footer' => 'Need help? Reply to this email.',
],
'photobooth_uploader' => [
'subject' => 'Fotospiel Uploader App for :event',
'preheader' => 'Download links for the Fotospiel Photobooth Uploader.',
'hero_title' => 'Hi :name,',
'hero_subtitle' => 'Your uploader app for :event is ready.',
'body' => 'Here are the download links for the Fotospiel Photobooth Uploader. Install the right version on the photobooth PC before your event starts.',
'downloads_title' => 'Download links',
'downloads' => [
'windows' => 'Windows (x64)',
'macos' => 'macOS (x64)',
'linux' => 'Linux (x64)',
],
'cta_windows' => 'Download for Windows',
'cta_macos' => 'Download for macOS',
'cta_linux' => 'Download for Linux',
'credentials_hint' => 'Connection credentials stay in the admin dashboard. Generate a connect code when you are ready to pair the app.',
'footer' => 'Questions? Reply to this email and we will help.',
'event_fallback' => 'your event',
],
'package_limits' => [
'package_fallback' => 'package',
'team_fallback' => 'your team',

7598
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -22,24 +22,24 @@
"@eslint/js": "^9.19.0",
"@laravel/vite-plugin-wayfinder": "^0.1.7",
"@playwright/test": "^1.57.0",
"@tamagui/cli": "^1.144.2",
"@tamagui/cli": "^1.142.0",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.1",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/fabric": "^5.3.11",
"@types/node": "^22.19.7",
"baseline-browser-mapping": "^2.9.15",
"@types/fabric": "^5.3.10",
"@types/node": "^22.19.2",
"baseline-browser-mapping": "^2.9.6",
"dotenv": "^16.6.1",
"eslint": "^9.39.2",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"i18next-scanner": "^4.6.0",
"jsdom": "^25.0.1",
"playwright": "^1.55.1",
"prettier": "^3.8.0",
"shadcn": "^3.7.0",
"typescript-eslint": "^8.53.0",
"prettier": "^3.7.4",
"shadcn": "^3.5.2",
"typescript-eslint": "^8.49.0",
"vite-plugin-pwa": "^1.2.0",
"vitest": "^2.1.9"
},
@@ -47,7 +47,7 @@
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/utilities": "^3.2.2",
"@headlessui/react": "^2.2.9",
"@inertiajs/react": "^2.3.10",
"@inertiajs/react": "^2.2.21",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-checkbox": "^1.3.3",
@@ -66,24 +66,24 @@
"@radix-ui/react-toggle-group": "^1.1.11",
"@radix-ui/react-tooltip": "^1.2.8",
"@react-spring/web": "^10.0.3",
"@sentry/react": "^10.34.0",
"@sentry/react": "^10.32.0",
"@sentry/tracing": "^7.120.4",
"@sentry/vite-plugin": "^4.6.2",
"@stripe/stripe-js": "^8.6.1",
"@tailwindcss/vite": "^4.1.18",
"@tamagui/button": "~1.144.2",
"@tamagui/config": "~1.144.2",
"@tamagui/font": "~1.144.2",
"@tamagui/group": "~1.144.2",
"@tamagui/list-item": "~1.144.2",
"@tamagui/radio-group": "~1.144.2",
"@tamagui/stacks": "~1.144.2",
"@tamagui/switch": "~1.144.2",
"@tamagui/text": "~1.144.2",
"@tamagui/themes": "~1.144.2",
"@tamagui/vite-plugin": "~1.144.2",
"@tanstack/react-query": "^5.90.19",
"@types/react": "^19.2.8",
"@sentry/vite-plugin": "^4.6.1",
"@stripe/stripe-js": "^8.5.3",
"@tailwindcss/vite": "^4.1.17",
"@tamagui/button": "~1.139.2",
"@tamagui/config": "~1.139.2",
"@tamagui/font": "~1.139.3",
"@tamagui/group": "~1.139.2",
"@tamagui/list-item": "~1.139.2",
"@tamagui/radio-group": "~1.139.2",
"@tamagui/stacks": "~1.139.2",
"@tamagui/switch": "~1.139.2",
"@tamagui/text": "~1.139.2",
"@tamagui/themes": "~1.139.2",
"@tamagui/vite-plugin": "~1.139.2",
"@tanstack/react-query": "^5.90.12",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@use-gesture/react": "^10.3.1",
"@vitejs/plugin-react": "^4.7.0",
@@ -94,29 +94,29 @@
"embla-carousel": "^8.6.0",
"embla-carousel-autoplay": "^8.6.0",
"embla-carousel-react": "^8.6.0",
"fabric": "^6.9.1",
"framer-motion": "^12.26.2",
"fabric": "^6.9.0",
"framer-motion": "^12.23.26",
"globals": "^15.15.0",
"html5-qrcode": "^2.3.8",
"i18next": "^25.7.4",
"i18next": "^25.7.2",
"i18next-browser-languagedetector": "^8.2.0",
"i18next-http-backend": "^3.0.2",
"laravel-vite-plugin": "^2.0.1",
"lucide-react": "^0.475.0",
"pdf-lib": "^1.17.1",
"react": "^19.2.3",
"react": "^19.2.1",
"react-colorful": "^5.6.1",
"react-dom": "^19.2.3",
"react-dom": "^19.2.1",
"react-hot-toast": "^2.6.0",
"react-i18next": "^16.5.3",
"react-router-dom": "^7.12.0",
"react-i18next": "^16.4.1",
"react-router-dom": "^7.10.1",
"swiper": "^12.0.3",
"tailwind-merge": "^3.4.0",
"tailwindcss": "^4.0.0",
"tailwindcss-animate": "^1.0.7",
"tamagui": "^1.144.2",
"tamagui": "^1.139.3",
"typescript": "^5.9.3",
"vite": "^7.3.1"
"vite": "^7.2.7"
},
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "4.9.5",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,106 +1,490 @@
/* Auto-generated by fonts:sync-google */
@font-face {
font-family: 'Manifest Font';
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/manifest-font/regular.woff2') format('woff2');
src: url('/fonts/google/roboto/Roboto-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Plus Jakarta Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/plus-jakarta-sans/PlusJakartaSans-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Plus Jakarta Sans';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/plus-jakarta-sans/PlusJakartaSans-400-italic.ttf') format('truetype');
}
@font-face {
font-family: 'Plus Jakarta Sans';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('/fonts/google/plus-jakarta-sans/PlusJakartaSans-500-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Plus Jakarta Sans';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url('/fonts/google/plus-jakarta-sans/PlusJakartaSans-500-italic.ttf') format('truetype');
}
@font-face {
font-family: 'Plus Jakarta Sans';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('/fonts/google/plus-jakarta-sans/PlusJakartaSans-600-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Plus Jakarta Sans';
font-style: italic;
font-weight: 600;
font-display: swap;
src: url('/fonts/google/plus-jakarta-sans/PlusJakartaSans-600-italic.ttf') format('truetype');
}
@font-face {
font-family: 'Plus Jakarta Sans';
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/plus-jakarta-sans/PlusJakartaSans-700-normal.ttf') format('truetype');
src: url('/fonts/google/roboto/Roboto-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Plus Jakarta Sans';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/plus-jakarta-sans/PlusJakartaSans-700-italic.ttf') format('truetype');
}
@font-face {
font-family: 'Space Grotesk';
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/space-grotesk/SpaceGrotesk-400-normal.ttf') format('truetype');
src: url('/fonts/google/open-sans/OpenSans-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('/fonts/google/space-grotesk/SpaceGrotesk-500-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('/fonts/google/space-grotesk/SpaceGrotesk-600-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Space Grotesk';
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/space-grotesk/SpaceGrotesk-700-normal.ttf') format('truetype');
src: url('/fonts/google/open-sans/OpenSans-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Noto Sans JP';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/noto-sans-jp/NotoSansJp-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Noto Sans JP';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/noto-sans-jp/NotoSansJp-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/lato/Lato-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/lato/Lato-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Montserrat';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/montserrat/Montserrat-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Montserrat';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/montserrat/Montserrat-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/inter/Inter-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/inter/Inter-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/poppins/Poppins-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/poppins/Poppins-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/material-icons/MaterialIcons-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Roboto Condensed';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/roboto-condensed/RobotoCondensed-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Roboto Condensed';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/roboto-condensed/RobotoCondensed-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/roboto-mono/RobotoMono-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/roboto-mono/RobotoMono-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Arimo';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/arimo/Arimo-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Arimo';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/arimo/Arimo-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Oswald';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/oswald/Oswald-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Oswald';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/oswald/Oswald-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/noto-sans/NotoSans-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/noto-sans/NotoSans-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/raleway/Raleway-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/raleway/Raleway-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Nunito Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/nunito-sans/NunitoSans-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Nunito Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/nunito-sans/NunitoSans-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Nunito';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/nunito/Nunito-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Nunito';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/nunito/Nunito-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Playfair Display';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/playfair-display/PlayfairDisplay-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Playfair Display';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/playfair-display/PlayfairDisplay-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Ubuntu';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/ubuntu/Ubuntu-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Ubuntu';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/ubuntu/Ubuntu-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Rubik';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/rubik/Rubik-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Rubik';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/rubik/Rubik-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Noto Sans KR';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/noto-sans-kr/NotoSansKr-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Noto Sans KR';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/noto-sans-kr/NotoSansKr-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Roboto Slab';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/roboto-slab/RobotoSlab-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Roboto Slab';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/roboto-slab/RobotoSlab-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/dm-sans/DmSans-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'DM Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/dm-sans/DmSans-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Kanit';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/kanit/Kanit-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Kanit';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/kanit/Kanit-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Merriweather';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/merriweather/Merriweather-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Merriweather';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/merriweather/Merriweather-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/work-sans/WorkSans-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/work-sans/WorkSans-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'PT Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/pt-sans/PtSans-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'PT Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/pt-sans/PtSans-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Material Symbols Outlined';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/material-symbols-outlined/MaterialSymbolsOutlined-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Material Symbols Outlined';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/material-symbols-outlined/MaterialSymbolsOutlined-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Lora';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/lora/Lora-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Lora';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/lora/Lora-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Quicksand';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/quicksand/Quicksand-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Quicksand';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/quicksand/Quicksand-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Mulish';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/mulish/Mulish-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Mulish';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/mulish/Mulish-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Noto Sans TC';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/noto-sans-tc/NotoSansTc-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Noto Sans TC';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/noto-sans-tc/NotoSansTc-700-normal.ttf') format('truetype');
}
@font-face {
@@ -136,9 +520,337 @@
}
@font-face {
font-family: 'Archivo Black';
font-family: 'Figtree';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/archivo-black/ArchivoBlack-400-normal.ttf') format('truetype');
src: url('/fonts/google/figtree/Figtree-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Figtree';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/figtree/Figtree-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Inconsolata';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/inconsolata/Inconsolata-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Inconsolata';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/inconsolata/Inconsolata-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'IBM Plex Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/ibm-plex-sans/IbmPlexSans-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'IBM Plex Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/ibm-plex-sans/IbmPlexSans-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Fira Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/fira-sans/FiraSans-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Fira Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/fira-sans/FiraSans-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Barlow';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/barlow/Barlow-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Barlow';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/barlow/Barlow-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Outfit';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/outfit/Outfit-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Outfit';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/outfit/Outfit-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Source Sans 3';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/source-sans-3/SourceSans3-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Source Sans 3';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/source-sans-3/SourceSans3-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Bebas Neue';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/bebas-neue/BebasNeue-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Titillium Web';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/titillium-web/TitilliumWeb-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Titillium Web';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/titillium-web/TitilliumWeb-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Karla';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/karla/Karla-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Karla';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/karla/Karla-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Material Icons Outlined';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/material-icons-outlined/MaterialIconsOutlined-400-normal.otf') format('opentype');
}
@font-face {
font-family: 'PT Serif';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/pt-serif/PtSerif-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'PT Serif';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/pt-serif/PtSerif-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Noto Serif';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/noto-serif/NotoSerif-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Noto Serif';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/noto-serif/NotoSerif-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Jost';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/jost/Jost-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Jost';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/jost/Jost-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Prompt';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/prompt/Prompt-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Prompt';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/prompt/Prompt-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Heebo';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/heebo/Heebo-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Heebo';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/heebo/Heebo-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Saira';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/saira/Saira-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Saira';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/saira/Saira-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Archivo';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/archivo/Archivo-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Archivo';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/archivo/Archivo-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Fraunces';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/fraunces/Fraunces-400-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Fraunces';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('/fonts/google/fraunces/Fraunces-400-italic.ttf') format('truetype');
}
@font-face {
font-family: 'Fraunces';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('/fonts/google/fraunces/Fraunces-500-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Fraunces';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url('/fonts/google/fraunces/Fraunces-500-italic.ttf') format('truetype');
}
@font-face {
font-family: 'Fraunces';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('/fonts/google/fraunces/Fraunces-600-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Fraunces';
font-style: italic;
font-weight: 600;
font-display: swap;
src: url('/fonts/google/fraunces/Fraunces-600-italic.ttf') format('truetype');
}
@font-face {
font-family: 'Fraunces';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/fraunces/Fraunces-700-normal.ttf') format('truetype');
}
@font-face {
font-family: 'Fraunces';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url('/fonts/google/fraunces/Fraunces-700-italic.ttf') format('truetype');
}

View File

@@ -1,149 +1 @@
{
"generated_at": "2026-01-15T21:06:13+01:00",
"source": "google-webfonts",
"count": 5,
"fonts": [
{
"family": "Manifest Font",
"category": "sans-serif",
"variants": [
{
"variant": "regular",
"weight": 400,
"style": "normal",
"url": "/fonts/google/manifest-font/regular.woff2"
}
]
},
{
"family": "Plus Jakarta Sans",
"slug": "plus-jakarta-sans",
"category": "sans-serif",
"variants": [
{
"variant": "regular",
"weight": 400,
"style": "normal",
"url": "/fonts/google/plus-jakarta-sans/PlusJakartaSans-400-normal.ttf"
},
{
"variant": "italic",
"weight": 400,
"style": "italic",
"url": "/fonts/google/plus-jakarta-sans/PlusJakartaSans-400-italic.ttf"
},
{
"variant": 500,
"weight": 500,
"style": "normal",
"url": "/fonts/google/plus-jakarta-sans/PlusJakartaSans-500-normal.ttf"
},
{
"variant": "500italic",
"weight": 500,
"style": "italic",
"url": "/fonts/google/plus-jakarta-sans/PlusJakartaSans-500-italic.ttf"
},
{
"variant": 600,
"weight": 600,
"style": "normal",
"url": "/fonts/google/plus-jakarta-sans/PlusJakartaSans-600-normal.ttf"
},
{
"variant": "600italic",
"weight": 600,
"style": "italic",
"url": "/fonts/google/plus-jakarta-sans/PlusJakartaSans-600-italic.ttf"
},
{
"variant": 700,
"weight": 700,
"style": "normal",
"url": "/fonts/google/plus-jakarta-sans/PlusJakartaSans-700-normal.ttf"
},
{
"variant": "700italic",
"weight": 700,
"style": "italic",
"url": "/fonts/google/plus-jakarta-sans/PlusJakartaSans-700-italic.ttf"
}
]
},
{
"family": "Space Grotesk",
"slug": "space-grotesk",
"category": "sans-serif",
"variants": [
{
"variant": "regular",
"weight": 400,
"style": "normal",
"url": "/fonts/google/space-grotesk/SpaceGrotesk-400-normal.ttf"
},
{
"variant": 500,
"weight": 500,
"style": "normal",
"url": "/fonts/google/space-grotesk/SpaceGrotesk-500-normal.ttf"
},
{
"variant": 600,
"weight": 600,
"style": "normal",
"url": "/fonts/google/space-grotesk/SpaceGrotesk-600-normal.ttf"
},
{
"variant": 700,
"weight": 700,
"style": "normal",
"url": "/fonts/google/space-grotesk/SpaceGrotesk-700-normal.ttf"
}
]
},
{
"family": "Manrope",
"slug": "manrope",
"category": "sans-serif",
"variants": [
{
"variant": "regular",
"weight": 400,
"style": "normal",
"url": "/fonts/google/manrope/Manrope-400-normal.ttf"
},
{
"variant": 500,
"weight": 500,
"style": "normal",
"url": "/fonts/google/manrope/Manrope-500-normal.ttf"
},
{
"variant": 600,
"weight": 600,
"style": "normal",
"url": "/fonts/google/manrope/Manrope-600-normal.ttf"
},
{
"variant": 700,
"weight": 700,
"style": "normal",
"url": "/fonts/google/manrope/Manrope-700-normal.ttf"
}
]
},
{
"family": "Archivo Black",
"slug": "archivo-black",
"category": "sans-serif",
"variants": [
{
"variant": "regular",
"weight": 400,
"style": "normal",
"url": "/fonts/google/archivo-black/ArchivoBlack-400-normal.ttf"
}
]
}
]
}
{"fonts":[{"family":"Manifest Font","category":"sans-serif","variants":[{"variant":"regular","weight":400,"style":"normal","url":"\/fonts\/google\/manifest-font\/regular.woff2"}]}]}

Some files were not shown because too many files have changed in this diff Show More