Feature/v1 full build#3
Merged
Merged
Conversation
…hotlinked images)
…mockups + final CTA
…th optional `make up` was failing for any dev who hadn't done the one-time GCP OAuth client setup yet. Three changes so the binary boots out of the box: - SHOPLIT_SESSION_SECRET: no longer hard-required. If unset, auto-generate a per-process random secret and log a WARN that sessions invalidate on restart. Production must set it explicitly. - GOOGLE_OAUTH_CLIENT_ID / GOOGLE_OAUTH_CLIENT_SECRET: optional. When unset, /api/v1/auth/google and the callback return 503 with a friendly pointer to the runbook; the rest of the API works normally. - Drop the dead internal/deps.go (build-tag dummy file from Task 1's go-mod-tidy workaround; the deps are imported for real now). Tests reworked: only DBDSN + RedisURL are still hard-required; added TestLoad_AutoGeneratesSessionSecret + TestLoad_DetectsGoogleOAuthConfigured.
…t/headers Server Components ran fetch() with relative paths like "/api/v1/carts" — Node's fetch needs absolute URLs, so SSR was crashing with TypeError: Failed to parse URL. Changes: - api-client.ts: detect server vs client, prepend SHOPLIT_API_INTERNAL_URL (defaults to http://localhost:8080) when running in Node. Added an optional `cookie` parameter so server callers can forward the incoming request's session cookie explicitly. - Removed next/headers import from api-client (it was breaking client bundles because client components import this file too). - dashboard/page.tsx and carts/[id]/page.tsx now read cookies() at the page level and pass the header through to api-client calls. On 401 they redirect to /login (server-side guard). - (public)/page.tsx swallows the auth failure when listMyCarts 401s for unauthenticated visitors (the landing page should still render).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.