Repository navigation
Move Together into a standalone app (apps/together) - #523
Merged
Merged
Conversation
Create apps/together (Next.js 16) with its own root layout, locale proxy, dictionaries, language context, API/TMDB clients and React Query/sonner providers. Move the Together routes, components, services and tests from apps/web with git mv, drop the /together route prefix and make invite links locale-neutral. Remove the compare/design-preview explorations and the Plotwist session/preferences prefill (default region now follows the page locale). Co-authored-by: Luiz Henrique <7henrique18@gmail.com>
Add a typed track() helper that forwards to gtag only when it is loaded, inject the gtag script when NEXT_PUBLIC_MEASUREMENT_ID is set, and track room_created, invite_shared, room_joined, voting_started, swipe, match_shown and plotwist_cta_clicked at the existing user actions. Replace the sign-in prompt with a dismissible Plotwist CTA linking to Plotwist sign-up with together UTM tags, and rewrite its copy in all seven locales so it no longer implies an import of saved services. Co-authored-by: Luiz Henrique <7henrique18@gmail.com>
Permanently redirect /together, /together/*, /<locale>/together and /<locale>/together/* to NEXT_PUBLIC_TOGETHER_URL (default https://together.plotwist.app), keeping the locale when present and the query string. Drop the Together nav item, sitemap entry, layout chrome exception, dictionary sections and Together dictionary contract tests. Co-authored-by: Luiz Henrique <7henrique18@gmail.com>
Add an optional TOGETHER_CLIENT_URL (URL, trailing slash trimmed) to the app config and accept it in production CORS origins and the production Origin/Referer client guard, which would otherwise reject requests from the new domain with 403. Co-authored-by: Luiz Henrique <7henrique18@gmail.com>
Add together#build to turbo (NEXT_PUBLIC_* env, .next outputs) and pass NEXT_PUBLIC_TOGETHER_URL to web#build, exclude the new app's build output from Biome, stop tracking its tsbuildinfo, and add a README, .env.example and a CLAUDE.md entry. Co-authored-by: Luiz Henrique <7henrique18@gmail.com>
Match apps/web, which tracks the file exactly as next dev writes it. Co-authored-by: Luiz Henrique <7henrique18@gmail.com>
Co-authored-by: Luiz Henrique <7henrique18@gmail.com>
Co-authored-by: Luiz Henrique <7henrique18@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lui7henrique
marked this pull request as ready for review
October 9, 2026 22:54
Co-authored-by: Luiz Henrique <7henrique18@gmail.com>
This branch was successfully deployed
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.
Describe your changes
Together moves out of the Plotwist web app into its own Next.js app at
apps/together. It's an MVP sandbox that can be deployed, measured, and changed on its own before being integrated back into Plotwist. It still uses the Plotwist API for rooms, votes, and the TMDB proxy; the backend and database are not duplicated.New app (
apps/together)/togetherprefix:/[lang],/[lang]/[code],/vote,/matches./swipestays as a redirect to/vote.https://together.plotwist.app/ABC123); the proxy detects the visitor's language and redirects.apps/web.utm_source=together). Its copy was rewritten so it no longer promises to import saved preferences.pt-BR→ BR,ja-JP→ JP).NEXT_PUBLIC_MEASUREMENT_ID). Events:room_created,invite_shared,room_joined,voting_started,swipe,match_shown,plotwist_cta_clicked.compare,design-preview) were removed.Web (
apps/web)/together/...and/<lang>/together/...) get a 308 redirect toNEXT_PUBLIC_TOGETHER_URL(defaulthttps://together.plotwist.app), keeping the query string.engines.node: 24.xinapps/webandapps/together. Vercel discontinued the Node 20.x set in the project settings, and any new deploy,mainincluded, was failing before the build started.Backend
client-guardaccept the optionalTOGETHER_CLIENT_URL. The production deploy sets it tohttps://together.plotwist.appas a plain env var, not a new SSM parameter.Monorepo:
together#buildadded to Turbo, README and.env.examplefor the new app, CLAUDE.md updated.Deploy order
apps/together, the domaintogether.plotwist.app, and the env vars fromapps/together/.env.example./togetherlinks would redirect to a domain that doesn't exist yet.Verification
videos.test.tsx, which makes a network call, andformat.spec.ts, which depends on the environment's ICU data) are in files this PR doesn't touch/→/pt-BR,/ABC123?source=whatsapp→/pt-BR/ABC123?source=whatsapp, room pages are noindexIssue ticket number and link
N/A
Checklist before requesting a review