Commit Graph

1818 Commits

Author SHA1 Message Date
fuomag9
b17ae54fbd Squashed commit of the following:
commit b5a751005850115c84fd8fddb83f32a52835a422
Author: fuomag9 <1580624+fuomag9@users.noreply.github.com>
Date:   Sat Nov 8 13:54:22 2025 +0100

    Update ProxyHostsClient.tsx

commit c93b3898c31b9c206fba74605dad5a578e326ce4
Author: fuomag9 <1580624+fuomag9@users.noreply.github.com>
Date:   Sat Nov 8 13:43:00 2025 +0100

    test-protected-paths
2025-11-08 13:55:23 +01:00
fuomag9
dc8e5e262f fixed Proxy Hosts Not Working After Docker Restart 2025-11-08 12:05:03 +01:00
fuomag9
6fb16c3cd7 Fixed Too Many history.replaceState() Calls 2025-11-08 11:25:52 +01:00
fuomag9
ee8813ac95 The certificates page has been completely redesigned 2025-11-08 11:11:36 +01:00
fuomag9
3be4e1bf7d Rewritten to use drizzle instead of prisma
commit c0894548dac5133bd89da5b68684443748fa2559
Author: fuomag9 <1580624+fuomag9@users.noreply.github.com>
Date:   Fri Nov 7 18:38:30 2025 +0100

    Update config.ts

commit 5a4f1159d2123ada0f698a10011c24720bf6ea6f
Author: fuomag9 <1580624+fuomag9@users.noreply.github.com>
Date:   Fri Nov 7 15:58:13 2025 +0100

    first drizzle rewrite
2025-11-07 19:26:32 +01:00
fuomag9
20a72008ac Merge branch 'develop' of github.com:fuomag9/nginx-proxy-manager into develop 2025-11-07 11:52:18 +01:00
fuomag9
102bd04d4c Fix auto certificate not showing in GUI when editing proxy host
When editing a proxy host with certificate_id set to null (auto), the
dropdown would not show "Managed by Caddy (Auto)" as selected and it
would revert to another certificate. There were two issues:

1. Form submission: Empty string from dropdown was treated as falsy,
   returning undefined instead of null (means "don't change")

2. Database update: The ?? operator treated null as falsy and fell back
   to existing value instead of saving null

Changes:
- app/(dashboard)/proxy-hosts/actions.ts: Check formData.has() and
  explicitly convert empty string to null for auto mode
- src/lib/models/proxy-hosts.ts: Use !== undefined instead of ?? to
  allow null values to be saved
- app/(dashboard)/proxy-hosts/ProxyHostsClient.tsx: Add Certificate
  column to table showing "Managed by Caddy (Auto)" for auto certs

Applied same fixes to access_list_id for consistency.

Now when users select "Managed by Caddy (Auto)", it correctly sets
certificate_id to null, displays properly on subsequent edits, and
shows in the table view.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 11:51:41 +01:00
fuomag9
459e171360 Fix auto certificate not showing in GUI when editing proxy host
When editing a proxy host with certificate_id set to null (auto), the
dropdown would not show "Managed by Caddy (Auto)" as selected. The issue
was that empty string from the dropdown was treated as falsy, returning
undefined instead of null, which means "don't change" in the update logic.

Changes:
- Check if certificate_id field exists with formData.has()
- Explicitly convert empty string to null for auto mode
- Apply same fix to access_list_id for consistency

Now when users select "Managed by Caddy (Auto)", it correctly sets
certificate_id to null and displays properly on subsequent edits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 11:14:46 +01:00
fuomag9
f079860007 Fix Authentik forward auth by converting to proper reverse_proxy JSON config
The forward_auth directive only exists in Caddyfile syntax, not JSON config.
This fix converts Authentik authentication to use the underlying reverse_proxy
handler with proper configuration:

- Replace forward_auth handler with reverse_proxy
- Convert "private_ranges" keyword to actual CIDR blocks for JSON config
- Parse upstream URL to extract host:port for dial field (removing http://)
- Add handle_response block to copy Authentik headers on 2xx status
- Preserve X-Forwarded-Method and X-Forwarded-Uri headers

Fixes error: "unknown module: http.handlers.forward_auth"
Fixes error: "invalid IP address: 'private_ranges'"
Fixes error: "lookup /hostname: no such host" (dial with URL scheme)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 11:08:09 +01:00
fuomag9
e57d3c3da0 fix build 2025-11-07 09:37:50 +01:00
fuomag9
664d420ec2 updated src/lib/caddy.ts (lines 410-475) to generate the proper reverse_proxy handler configuration that mimics what forward_auth does 2025-11-07 00:19:28 +01:00
fuomag9
8df7aa332d remove arm64 build 2025-11-06 23:15:07 +01:00
fuomag9
56cd0861b5 Merge pull request #16 from fuomag9/claude/setup-prisma-github-actions-011CUsKz8eCpsYeJ6NLzPVqT
Fix Prisma client generation in Docker build following best practices
2025-11-06 22:25:45 +01:00
Claude
ad07fd4c13 Fix Prisma client generation in Docker build following best practices
Following the Prisma guide for GitHub Actions and CI/CD, this commit addresses
the Prisma client generation issues in the Docker build process:

Changes:
1. **package.json**:
   - Removed silent failure fallback in postinstall hook
   - Removed redundant prisma generate from build script
   - Now fails fast if Prisma generation has issues

2. **docker/web/Dockerfile**:
   - Added DATABASE_URL environment variable in deps stage
   - Explicitly run prisma generate after npm install to ensure client is created
   - Generate Prisma client again in builder stage for build context
   - Removed --skip-generate flag from prisma db push
   - Added clear comments explaining each Prisma-related step

These changes ensure:
- Prisma client is generated with correct engines for debian-openssl-3.0.x
- Build fails early if there are Prisma configuration issues
- DATABASE_URL is set before running any Prisma commands
- Proper multi-stage Docker build with Prisma support
2025-11-06 21:17:23 +00:00
fuomag9
11c1ce9362 Merge pull request #15 from fuomag9/claude/fix-prisma-schema-errors-011CUs7qLSUg89WLj1ZHdJdf
Fix Prisma engine download failures by pre-generating client in deps …
2025-11-06 21:48:12 +01:00
Claude
5ef6798a31 Fix Prisma engine generation by copying schema before npm install
The previous attempt failed because Prisma CLI couldn't parse the binaryTarget
configuration due to an incorrect environment variable I set. This commit:

- Removes the non-existent PRISMA_CLI_BINARY_TARGETS environment variable
- Copies the Prisma schema BEFORE running npm ci, allowing the postinstall
  script to properly generate the Prisma client with engines
- Adds openssl and ca-certificates to deps stage for engine downloads
- Simplifies the builder stage to rely on pre-generated engines from deps

This ensures Prisma engines are downloaded during npm installation via the
postinstall hook, making them available for subsequent build steps.
2025-11-06 20:42:44 +00:00
Claude
db686f9d7d Fix Prisma engine download failures by pre-generating client in deps stage
The build was failing with Prisma schema validation errors because Prisma
couldn't download engine binaries from binaries.prisma.sh (403 Forbidden).
This resulted in cryptic parsing errors during 'prisma generate'.

Changes:
- Add openssl and ca-certificates to deps stage for engine downloads
- Set PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING to bypass checksum validation
- Pre-generate Prisma client with engines in deps stage
- Copy pre-generated client to builder stage to avoid re-downloading
- Set PRISMA_SKIP_POSTINSTALL_GENERATE in builder to prevent regeneration

This ensures engines are bundled during the deps stage and reused in
subsequent stages, eliminating network dependency during the build phase.
2025-11-06 18:39:39 +00:00
fuomag9
a8a0ca924b Merge pull request #14 from fuomag9/claude/fix-prisma-schema-errors-011CUqJ2BtyqkKHkrEkrHkmS
Fix Prisma schema validation errors by installing OpenSSL in builder …
2025-11-05 20:47:48 +01:00
Claude
b557d0486c Fix Prisma schema validation errors by installing OpenSSL in builder stage
The build was failing during 'prisma generate' with numerous validation
errors because Prisma's query engine requires OpenSSL to function properly.
The builder stage was missing the openssl package, causing the engine to
fail to load and produce cryptic parsing errors.

This adds openssl installation to the builder stage, matching what was
already present in the runner stage.
2025-11-05 19:30:21 +00:00
fuomag9
f61f0c3d52 Merge pull request #13 from fuomag9/claude/fix-prisma-permission-errors-011CUqCvQfgTJWvYnFa24A1w
Fix Prisma client permission errors by cleaning old client before reg…
2025-11-05 19:57:05 +01:00
Claude
54d9fb5e63 Fix Prisma client permission errors by cleaning old client before regeneration
- Remove /app/node_modules/.prisma/client before generating
- Prevents EACCES errors when Prisma tries to unlink existing files
- Cleanup runs as root before switching to nextjs user
2025-11-05 18:22:24 +00:00
fuomag9
71f4193410 Update entrypoint.sh 2025-11-05 00:29:26 +01:00
fuomag9
114bf1b980 Merge pull request #7 from fuomag9/dependabot/github_actions/docker/build-push-action-6
ci(deps): bump docker/build-push-action from 5 to 6
2025-11-04 23:38:37 +01:00
fuomag9
baa741d7b0 Merge pull request #8 from fuomag9/dependabot/docker/docker/web/node-25-slim
docker: bump node from 20-slim to 25-slim in /docker/web
2025-11-04 23:38:22 +01:00
fuomag9
e7c516ae71 Merge pull request #9 from fuomag9/dependabot/github_actions/actions/checkout-5
ci(deps): bump actions/checkout from 4 to 5
2025-11-04 23:38:10 +01:00
fuomag9
af9145673b Merge pull request #10 from fuomag9/dependabot/github_actions/actions/stale-10
ci(deps): bump actions/stale from 9 to 10
2025-11-04 23:37:55 +01:00
fuomag9
d07ea08529 Merge pull request #12 from fuomag9/dependabot/npm_and_yarn/production-dependencies-ab61d3bc24
deps(deps): bump the production-dependencies group with 3 updates
2025-11-04 23:37:42 +01:00
fuomag9
5091e111b7 Merge pull request #11 from fuomag9/dependabot/npm_and_yarn/development-dependencies-7615b575d3
deps(deps-dev): bump the development-dependencies group with 2 updates
2025-11-04 23:37:26 +01:00
dependabot[bot]
f6b94d985a deps(deps): bump the production-dependencies group with 3 updates
Bumps the production-dependencies group with 3 updates: [@mui/icons-material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-icons-material), [@mui/material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material) and [bcryptjs](https://github.com/dcodeIO/bcrypt.js).


Updates `@mui/icons-material` from 7.3.4 to 7.3.5
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v7.3.5/packages/mui-icons-material)

Updates `@mui/material` from 7.3.4 to 7.3.5
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v7.3.5/packages/mui-material)

Updates `bcryptjs` from 3.0.2 to 3.0.3
- [Release notes](https://github.com/dcodeIO/bcrypt.js/releases)
- [Commits](https://github.com/dcodeIO/bcrypt.js/compare/v3.0.2...v3.0.3)

---
updated-dependencies:
- dependency-name: "@mui/icons-material"
  dependency-version: 7.3.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: "@mui/material"
  dependency-version: 7.3.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: bcryptjs
  dependency-version: 3.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 22:20:34 +00:00
dependabot[bot]
fc9276635f deps(deps-dev): bump the development-dependencies group with 2 updates
Bumps the development-dependencies group with 2 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [eslint](https://github.com/eslint/eslint).


Updates `@types/node` from 24.9.2 to 24.10.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 9.38.0 to 9.39.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.38.0...v9.39.1)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.10.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: eslint
  dependency-version: 9.39.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 22:20:03 +00:00
dependabot[bot]
42c7f358b6 ci(deps): bump actions/stale from 9 to 10
Bumps [actions/stale](https://github.com/actions/stale) from 9 to 10.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9...v10)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 22:19:37 +00:00
dependabot[bot]
3369ade5d4 ci(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 22:19:33 +00:00
dependabot[bot]
b0d6088473 ci(deps): bump docker/build-push-action from 5 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 22:19:30 +00:00
dependabot[bot]
a0a37be0d1 docker: bump node from 20-slim to 25-slim in /docker/web
Bumps node from 20-slim to 25-slim.

---
updated-dependencies:
- dependency-name: node
  dependency-version: 25-slim
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 22:19:30 +00:00
fuomag9
735e9b9c69 Merge pull request #6 from fuomag9/claude/fix-docker-tag-format-011CUoXaPFzx8eN9neD6hVug
Claude/fix docker tag format 011 c uo xa p fzx8e n9ne d6h vug
2025-11-04 23:18:50 +01:00
Claude
cc8d6560f1 Trigger workflow with SBOM/provenance fix 2025-11-04 22:02:57 +00:00
Claude
9981668bc5 Fix SBOM/provenance manifest list error on PR builds
Fixed error: "docker exporter does not currently support exporting manifest lists"

The issue occurred because SBOM and provenance attestations create manifest
lists, which cannot be loaded to the local Docker daemon (required for PRs).

Changes:
- Made sbom conditional: only enabled for push events (not PRs)
- Made provenance conditional: only enabled for push events (not PRs)
- PRs now build without attestations (faster, avoids manifest list error)
- Production pushes still get full SBOM and provenance attestations

This allows:
- PR builds to complete successfully with load=true
- Production builds to maintain supply chain security features
2025-11-04 22:00:08 +00:00
Claude
f326194de0 Remove Trivy vulnerability scanning from pipeline
Removed all Trivy-related security scanning:
- Removed "Extract first tag for Trivy" step
- Removed "Run Trivy vulnerability scanner" step
- Removed "Upload Trivy results to GitHub Security" step
- Removed "Run Trivy in table format" step
- Removed security-events permission (no longer needed)

Updated SECURITY.md:
- Removed Trivy vulnerability scanning references
- Removed SARIF upload references
- Kept other security measures intact

The workflow now focuses on:
- Fork PR protection
- SBOM generation
- Provenance attestation
- Dependabot updates
2025-11-04 21:52:02 +00:00
Claude
7e92e29f37 Fix workflow dependency and platform conflicts
Fixed critical workflow issues preventing builds:

1. Job Dependency Structure:
   - build-and-push now properly depends on security-check with always()
   - Allows push/tag events to run even when security-check is skipped
   - Only pull_request events trigger security-check
   - Conditional logic checks needs.security-check.result to handle skipped cases

2. Platform vs Load Conflict:
   - Removed platform specification for PR builds (load=true)
   - load: true only works with single platform matching host
   - Multi-platform (linux/amd64,linux/arm64) only for push events
   - Empty string for platforms when using load to avoid conflicts

3. Conditional Logic Improvements:
   - push events: always run (security-check skipped)
   - workflow_dispatch: always run (security-check skipped)
   - pull_request: only run if security-check succeeded and not a fork
   - pull_request_target: only run if has 'safe-to-build' label

This ensures:
- Branch pushes work correctly
- Tag builds work correctly
- PRs are security-checked before building
- Fork PRs require manual approval
2025-11-04 21:49:41 +00:00
Claude
9949240789 Fix build pipeline platform and Trivy issues
Fixed two critical build failures:

1. Platform Selection Bug:
   - Fixed operator precedence issue in platform conditional
   - Was evaluating to boolean 'true' instead of platform string
   - Changed: platforms: ${{ ... || ... && 'linux/amd64' || ... }}
   - To: platforms: ${{ (... || ...) && 'linux/amd64' || ... }}
   - Now correctly uses linux/amd64 for PRs, linux/amd64,linux/arm64 for releases

2. Trivy Multiple Tags Issue:
   - Trivy was receiving multiple tags separated by newlines
   - Added step to extract first tag from metadata output
   - Trivy now scans using single tag reference
   - Prevents "multiple targets cannot be specified" error

Both PRs and production builds should now complete successfully.
2025-11-04 21:40:02 +00:00
Claude
6dc27cb813 Use version tags for GitHub Actions for better maintainability
Changed from SHA-pinned actions to version tags (e.g., @v3, @v4, @v5)
for easier maintenance and automatic security updates via Dependabot.

While SHA pinning provides slightly better supply chain security, version
tags with Dependabot updates provide a better balance of security and
maintainability for most projects.

Updated actions:
- actions/checkout@v4
- docker/setup-buildx-action@v3
- docker/login-action@v3
- docker/metadata-action@v5
- docker/build-push-action@v5
- aquasecurity/trivy-action@0.24.0
- github/codeql-action/upload-sarif@v3

Dependabot will automatically create PRs for security updates.
2025-11-04 21:36:51 +00:00
Claude
fdb9ca6786 Add comprehensive security enhancements to build pipeline
Security Improvements:
- Fork PR Protection: Builds from forks require manual 'safe-to-build' label approval
- Trivy Vulnerability Scanning: Scan all images for CRITICAL/HIGH vulnerabilities
- SHA-Pinned Actions: All GitHub Actions pinned to specific commits for supply chain security
- SBOM Generation: Generate Software Bill of Materials for all builds
- Provenance Attestation: Record build provenance for supply chain verification
- Security Events Upload: Upload scan results to GitHub Security tab
- Platform Optimization: Single-platform builds for PRs for faster feedback

Additional Security:
- Created SECURITY.md with vulnerability reporting process and security practices
- Added Dependabot configuration for automated dependency updates
- Limited permissions model (contents:read, packages:write, security-events:write)
- No registry push from PR builds (load-only for security scanning)

This addresses concerns about malicious PR builds by:
1. Requiring manual approval for fork PRs
2. Scanning all images before they could be pushed
3. Preventing PR builds from pushing to registry
4. Using verified, SHA-pinned actions
2025-11-04 21:29:01 +00:00
Claude
6c13692272 Fix Docker tag format in build pipeline
Remove the prefix={{branch}}- from the sha tag type which was causing
invalid tag formats like ":-cbc2c2c" when building pull requests.
The {{branch}} placeholder becomes empty for PRs, leaving only the dash
prefix which creates an invalid Docker tag.

Changed from: type=sha,prefix={{branch}}-
Changed to: type=sha

This generates valid tags like "sha-cbc2c2c" for all events.
2025-11-04 21:06:32 +00:00
fuomag9
d015f19967 Merge pull request #4 from fuomag9/claude/fix-caddy-auto-button-011CUoUxsshwKDrv3wfAXXG3
Claude/fix caddy auto button 011 c uo uxsshw k drv3wf axxg3
2025-11-04 22:03:48 +01:00
fuomag9
b162d1bacd Merge pull request #5 from fuomag9/claude/fix-build-errors-011CUoSfJxqbwre8q4VbuYqA
Implement official Prisma solution for client generation
2025-11-04 22:03:30 +01:00
Claude
94edfe08bc Implement official Prisma solution for client generation
Following Prisma's official documentation for deployment caching issues:
https://www.prisma.io/docs/orm/more/help-and-troubleshooting/vercel-caching-issue

Changes:
- Add 'prisma generate' to build script (official Prisma recommendation)
- Add postinstall script for automatic client generation
- Remove custom stub generator workaround
- Keep runtime Prisma client generation in entrypoint.sh for reliability
- Add openssl to runtime container (required for Prisma engines)

This follows Prisma best practices: explicitly run prisma generate during the
build process to ensure Prisma Client is always up-to-date. The entrypoint
script regenerates the client at runtime to guarantee engine availability in
the production environment.
2025-11-04 20:55:36 +00:00
Claude
527e2e2f26 Update package-lock.json after npm install 2025-11-04 20:37:48 +00:00
Claude
6974022906 Fix Caddy Auto certificate management for proxy hosts
Previously, proxy hosts with "Managed by Caddy (Auto)" (certificate_id = null)
were being skipped during Caddy configuration generation, causing the feature
to not work at all.

This commit adds full support for automatic certificate management:

1. Modified collectCertificateUsage() to track domains with null certificate_id
   separately as auto-managed domains
2. Updated buildTlsAutomation() to create ACME automation policies for
   auto-managed domains (supports both HTTP-01 and DNS-01 challenges)
3. Modified buildTlsConnectionPolicies() to include TLS connection policies
   for auto-managed domains
4. Updated buildProxyRoutes() to allow proxy hosts with null certificate_id
   to be included in the route configuration

The configuration now automatically updates when domains are changed, as
applyCaddyConfig() is already called on create/update/delete operations.

Caddy will now automatically obtain and manage Let's Encrypt certificates
for all domains when "Managed by Caddy (Auto)" is selected.
2025-11-04 20:36:59 +00:00
fuomag9
c536890b4c Merge pull request #3 from fuomag9/claude/fix-build-errors-011CUoSfJxqbwre8q4VbuYqA
Fix build errors and add Prisma stub generator for environments with …
2025-11-04 21:24:58 +01:00
Claude
a2ae1f5baa Fix build errors and add Prisma stub generator for environments with network restrictions
This commit resolves multiple build errors and adds a workaround for environments
where Prisma engine binaries cannot be downloaded due to network restrictions.

Changes:
- Fix TypeScript error: Remove invalid request.ip property access in NextAuth route
- Add missing config import in auth.ts for sessionSecret
- Add dynamic = 'force-dynamic' to API routes to prevent static generation
- Create Prisma stub generator script for build-time type checking
- Update build script to use stub generator instead of prisma generate
- Add binaryTargets to Prisma schema configuration

The stub generator allows the Next.js build to complete successfully in environments
where Prisma binaries cannot be downloaded (403 Forbidden errors from binaries server).
The actual Prisma engines will need to be available at runtime in production deployments.

All routes are now properly configured as dynamic server-rendered routes.
2025-11-04 20:15:45 +00:00