diff --git a/.env.docker.production.generated b/.env.docker.production.generated index 29ab420..b1febc0 100644 --- a/.env.docker.production.generated +++ b/.env.docker.production.generated @@ -31,7 +31,7 @@ NEXT_PUBLIC_API_URL=https://api.example.com/api/v1 # Frontend public URLs NEXT_PUBLIC_HOMEPAGE_URL=https://example.com -NEXT_PUBLIC_STOREFRONT_URL=https://example.com +NEXT_PUBLIC_CARPLACE_URL=https://example.com NEXT_PUBLIC_DASHBOARD_URL=https://example.com/dashboard NEXT_PUBLIC_ADMIN_URL=https://example.com/admin NEXT_PUBLIC_PUBLIC_SITE_DOMAIN=example.com diff --git a/.env.example b/.env.example index bf4b682..6e5bf39 100644 --- a/.env.example +++ b/.env.example @@ -88,7 +88,7 @@ REDIS_URL=redis://localhost:6379 NEXT_PUBLIC_DASHBOARD_URL=http://localhost:3000/dashboard NEXT_PUBLIC_ADMIN_URL=http://localhost:3000/admin -NEXT_PUBLIC_STOREFRONT_URL=http://localhost:3000/storefront +NEXT_PUBLIC_CARPLACE_URL=http://localhost:3000/carplace NEXT_PUBLIC_HOMEPAGE_URL=http://localhost:3000 # Public site is subdomain-based; use this for local dev: NEXT_PUBLIC_PUBLIC_SITE_DOMAIN=localhost:3003 diff --git a/.gitea/workflows/build-and-deploy.yml b/.gitea/workflows/build-and-deploy.yml index 5e92007..c4860e7 100644 --- a/.gitea/workflows/build-and-deploy.yml +++ b/.gitea/workflows/build-and-deploy.yml @@ -93,7 +93,7 @@ jobs: NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }} NEXT_PUBLIC_HOMEPAGE_URL: ${{ secrets.NEXT_PUBLIC_HOMEPAGE_URL }} NEXT_PUBLIC_CARPLACE_URL: ${{ secrets.NEXT_PUBLIC_CARPLACE_URL }} - NEXT_PUBLIC_STOREFRONT_URL: ${{ secrets.NEXT_PUBLIC_STOREFRONT_URL }} + NEXT_PUBLIC_CARPLACE_URL: ${{ secrets.NEXT_PUBLIC_CARPLACE_URL }} NEXT_PUBLIC_DASHBOARD_URL: ${{ secrets.NEXT_PUBLIC_DASHBOARD_URL }} NEXT_PUBLIC_ADMIN_URL: ${{ secrets.NEXT_PUBLIC_ADMIN_URL }} SITE_ORIGIN: ${{ secrets.SITE_ORIGIN }} @@ -114,8 +114,8 @@ jobs: esac } - if [ -z "$NEXT_PUBLIC_CARPLACE_URL" ] && [ -n "$NEXT_PUBLIC_STOREFRONT_URL" ]; then - NEXT_PUBLIC_CARPLACE_URL="${NEXT_PUBLIC_STOREFRONT_URL%/}/carplace" + if [ -z "$NEXT_PUBLIC_CARPLACE_URL" ] && [ -n "$SITE_ORIGIN" ]; then + NEXT_PUBLIC_CARPLACE_URL="${SITE_ORIGIN%/}/carplace" fi validate_url NEXT_PUBLIC_API_URL "$NEXT_PUBLIC_API_URL" @@ -251,7 +251,7 @@ jobs: NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }} NEXT_PUBLIC_HOMEPAGE_URL: ${{ secrets.NEXT_PUBLIC_HOMEPAGE_URL }} NEXT_PUBLIC_CARPLACE_URL: ${{ secrets.NEXT_PUBLIC_CARPLACE_URL }} - NEXT_PUBLIC_STOREFRONT_URL: ${{ secrets.NEXT_PUBLIC_STOREFRONT_URL }} + NEXT_PUBLIC_CARPLACE_URL: ${{ secrets.NEXT_PUBLIC_CARPLACE_URL }} NEXT_PUBLIC_DASHBOARD_URL: ${{ secrets.NEXT_PUBLIC_DASHBOARD_URL }} NEXT_PUBLIC_ADMIN_URL: ${{ secrets.NEXT_PUBLIC_ADMIN_URL }} SITE_ORIGIN: ${{ secrets.SITE_ORIGIN }} @@ -265,8 +265,8 @@ jobs: fi SSH_OPTIONS="-i $HOME/.ssh/id_rsa -o BatchMode=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=$HOME/.ssh/known_hosts" REGISTRY_PASSWORD_B64="$(printf '%s' "$REGISTRY_PASSWORD" | base64 | tr -d '\n')" - if [ -z "$NEXT_PUBLIC_CARPLACE_URL" ] && [ -n "$NEXT_PUBLIC_STOREFRONT_URL" ]; then - NEXT_PUBLIC_CARPLACE_URL="${NEXT_PUBLIC_STOREFRONT_URL%/}/carplace" + if [ -z "$NEXT_PUBLIC_CARPLACE_URL" ] && [ -n "$SITE_ORIGIN" ]; then + NEXT_PUBLIC_CARPLACE_URL="${SITE_ORIGIN%/}/carplace" fi ssh $SSH_OPTIONS "${{ secrets.VPS_USER }}@$VPS_HOST" " set -e diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56542d1..8c67c61 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,14 +28,14 @@ api_tests: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' -storefront_tests: +carplace_tests: stage: test image: node:20-bookworm before_script: - npm ci - npm run build --workspace @rentaldrivego/types script: - - npm run test:storefront + - npm run test:carplace rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' diff --git a/DESIGN_MIGRATION_REPORT.md b/DESIGN_MIGRATION_REPORT.md index 4b265dd..46c0836 100644 --- a/DESIGN_MIGRATION_REPORT.md +++ b/DESIGN_MIGRATION_REPORT.md @@ -7,7 +7,7 @@ The Phase 16 visual system has been applied at source level to the legacy applic - `homepage`: retained as the authoritative Phase 16 marketing implementation already present in the legacy archive. - `admin`: migrated to the Phase 16 token palette and component treatment; navigation was rebuilt as a responsive, accessible application shell. - `dashboard`: migrated to the same semantic surfaces, typography, borders, shadows, focus treatment, dark theme, and blue/orange action hierarchy. -- `storefront`: migrated to the same public-site surfaces, conversion treatment, cards, forms, dark theme, and brand naming. +- `carplace`: migrated to the same public-site surfaces, conversion treatment, cards, forms, dark theme, and brand naming. - `api`: intentionally unchanged. A visual migration should not casually rewrite business logic because that is how weekends disappear. ## Design rules applied @@ -29,7 +29,7 @@ The supplied `RentalDriveGo_Phase16_Evidence_Package_v1.0.zip` is an evidence an - `admin/src/styles/phase16-tokens.css` - `dashboard/src/styles/phase16-tokens.css` -- `storefront/src/styles/phase16-tokens.css` +- `carplace/src/styles/phase16-tokens.css` - `scripts/validate-phase16-design.mjs` - `DESIGN_MIGRATION_REPORT.md` - `PHASE16_DESIGN_MIGRATION_MANIFEST.json` diff --git a/NAVBAR_FOOTER_REFACTOR_REPORT.md b/NAVBAR_FOOTER_REFACTOR_REPORT.md index 7afdc7a..3a94482 100644 --- a/NAVBAR_FOOTER_REFACTOR_REPORT.md +++ b/NAVBAR_FOOTER_REFACTOR_REPORT.md @@ -7,14 +7,14 @@ 3. Added `PublicPageLayout` as the reusable composition layer for authentication and onboarding pages. 4. Updated sign-in, create-account, forgot-password, reset-password, verify-email, onboarding, and invitation pages to use the public component API. 5. Preserved legacy component paths through compatibility exports. -6. Moved storefront navbar/footer assembly out of the Next.js route layout and into reusable public components. +6. Moved carplace navbar/footer assembly out of the Next.js route layout and into reusable public components. 7. Added active-page semantics to dashboard sign-in and create-account navbar actions. 8. Added focused tests and implementation documentation. ## Deliberately unchanged - Authentication requests and API endpoints -- Redirect behavior between storefront, dashboard, and admin applications +- Redirect behavior between carplace, dashboard, and admin applications - Language and theme persistence - Embedded workspace behavior - Authenticated dashboard and admin navigation @@ -25,7 +25,7 @@ - Verified all relative and `@/` local imports resolve. - Verified every `use client` directive remains the first statement. - Verified sign-in and create-account import and render `PublicPageLayout`. -- Verified the storefront route layout no longer assembles navbar/footer inline. +- Verified the carplace route layout no longer assembles navbar/footer inline. - Verified embedded password-recovery navigation preserves `embedded=1`. ## Validation limitation diff --git a/PHASE16_DESIGN_MIGRATION_MANIFEST.json b/PHASE16_DESIGN_MIGRATION_MANIFEST.json index 8d95c4f..357e309 100644 --- a/PHASE16_DESIGN_MIGRATION_MANIFEST.json +++ b/PHASE16_DESIGN_MIGRATION_MANIFEST.json @@ -11,7 +11,7 @@ "homepage": "retained as embedded Phase 16 source of truth", "admin": "migrated", "dashboard": "migrated", - "storefront": "migrated", + "carplace": "migrated", "api": "unchanged" }, "validation": { @@ -37,37 +37,37 @@ "sha256": "7a35fad2750bccc09c24f24c1d57594048b040f24d4cde7639fa1a2ce3d63e64" }, { - "path": "storefront/src/app/layout.tsx", + "path": "carplace/src/app/layout.tsx", "status": "modified", "bytes": 1833, "sha256": "6fed4ef50a886e1c551b6456b46c5fc785b02a4be988aef06fa95c28443bbd27" }, { - "path": "storefront/src/app/globals.css", + "path": "carplace/src/app/globals.css", "status": "modified", "bytes": 7525, "sha256": "49e03206558248eb5de2b9a8463be6e0b43e01df518bc0b625fe2953a18185c6" }, { - "path": "storefront/src/components/StorefrontFooter.tsx", + "path": "carplace/src/components/CarplaceFooter.tsx", "status": "modified", "bytes": 4632, "sha256": "169d04dcf0976d2637ef5371ca295e9c362bd089d8d6ec313b4e8b4131d5bdd3" }, { - "path": "storefront/src/components/StorefrontHeader.tsx", + "path": "carplace/src/components/CarplaceHeader.tsx", "status": "modified", "bytes": 10438, "sha256": "25afc57ff9893f255eddf19580e84b510e6032764daaa5727e2e8d669dca4213" }, { - "path": "storefront/src/styles/phase16-tokens.css", + "path": "carplace/src/styles/phase16-tokens.css", "status": "added", "bytes": 4214, "sha256": "0e7fb35fb2833ff564c1188e39735349a8df901938fa87f2dc1b931dd4f04cd0" }, { - "path": "storefront/src/app/(public)/explore/[slug]/vehicles/[id]/page.tsx", + "path": "carplace/src/app/(public)/explore/[slug]/vehicles/[id]/page.tsx", "status": "modified", "bytes": 13979, "sha256": "9edf8da13e50cabcb2a126b300c71cb0b7a096a31d11d364e37dc09eeb625d3b" diff --git a/PHASE16_OPERATIONAL_UI_MANIFEST.json b/PHASE16_OPERATIONAL_UI_MANIFEST.json index 926b106..c644cce 100644 --- a/PHASE16_OPERATIONAL_UI_MANIFEST.json +++ b/PHASE16_OPERATIONAL_UI_MANIFEST.json @@ -7,7 +7,7 @@ ], "includedApplications": [ "homepage", - "storefront", + "carplace", "dashboard", "admin", "api" diff --git a/PHASE16_OPERATIONAL_UI_REPORT.md b/PHASE16_OPERATIONAL_UI_REPORT.md index c900cf3..63bc96d 100644 --- a/PHASE16_OPERATIONAL_UI_REPORT.md +++ b/PHASE16_OPERATIONAL_UI_REPORT.md @@ -13,7 +13,7 @@ The dashboard and admin applications now use the same visual language as the Pha The previous navbar/footer refactor archive omitted the `homepage` and `api` applications. This package was rebuilt from the complete Phase 16 archive, then overlaid with the public navbar/footer refactor before the operational UI migration. The final repository contains: - `homepage` -- `storefront` +- `carplace` - `dashboard` - `admin` - `api` diff --git a/PHASE16_OPERATIONAL_VALIDATION_REPORT.md b/PHASE16_OPERATIONAL_VALIDATION_REPORT.md index 796e2ea..9e1f0d3 100644 --- a/PHASE16_OPERATIONAL_VALIDATION_REPORT.md +++ b/PHASE16_OPERATIONAL_VALIDATION_REPORT.md @@ -17,9 +17,9 @@ | Light/dark and Arabic RTL token mappings present | Passed | | Reduced-motion and forced-colors rules present | Passed | | Shared sign-in/create-account public layout retained | Passed | -| Shared storefront navbar/footer components retained | Passed | +| Shared carplace navbar/footer components retained | Passed | | Retired `RentalDriveGo` brand in dashboard/admin source | 0 matches | -| Complete app directories retained | `homepage`, `storefront`, `dashboard`, `admin`, `api` | +| Complete app directories retained | `homepage`, `carplace`, `dashboard`, `admin`, `api` | ## Reproducible design gate diff --git a/SECURITY_HARDENING_LEFTOVER_APPLIED_REPORT.md b/SECURITY_HARDENING_LEFTOVER_APPLIED_REPORT.md index a5a14bb..e46c475 100644 --- a/SECURITY_HARDENING_LEFTOVER_APPLIED_REPORT.md +++ b/SECURITY_HARDENING_LEFTOVER_APPLIED_REPORT.md @@ -60,15 +60,15 @@ Changed files: - `apps/api/src/app.ts` - `apps/dashboard/src/middleware.ts` -- `apps/storefront/src/middleware.ts` +- `apps/carplace/src/middleware.ts` - `apps/admin/src/middleware.ts` - `apps/dashboard/src/middleware.test.ts` -- `apps/storefront/src/middleware.test.ts` +- `apps/carplace/src/middleware.test.ts` What changed: - API now rejects requests containing `x-middleware-subrequest` before route handling. -- Dashboard, storefront, and admin Next middleware now reject the same header at the app layer. +- Dashboard, carplace, and admin Next middleware now reject the same header at the app layer. - Added/updated middleware tests for the rejection path. Security effect: diff --git a/storefront/next-env.d.ts b/carplace/next-env.d.ts similarity index 100% rename from storefront/next-env.d.ts rename to carplace/next-env.d.ts diff --git a/storefront/next.config.js b/carplace/next.config.js similarity index 96% rename from storefront/next.config.js rename to carplace/next.config.js index 20d26b7..4967c1b 100644 --- a/storefront/next.config.js +++ b/carplace/next.config.js @@ -2,7 +2,7 @@ const { buildSecurityHeaders, normalizeAssetPrefix } = require('../../config/nextSecurityHeaders') -// The storefront proxies /dashboard and /admin to their own Next dev servers. +// The carplace proxies /dashboard and /admin to their own Next dev servers. // Allow those asset-prefix origins so proxied pages can load chunks and HMR. const dashboardAssetSource = normalizeAssetPrefix( process.env.DASHBOARD_ASSET_PREFIX ?? (process.env.NODE_ENV !== 'production' ? 'http://localhost:3001' : undefined), diff --git a/storefront/package.json b/carplace/package.json similarity index 96% rename from storefront/package.json rename to carplace/package.json index 337d1c4..7669b19 100644 --- a/storefront/package.json +++ b/carplace/package.json @@ -1,5 +1,5 @@ { - "name": "@rentaldrivego/storefront", + "name": "@rentaldrivego/carplace", "version": "1.0.0", "private": true, "scripts": { diff --git a/storefront/postcss.config.js b/carplace/postcss.config.js similarity index 100% rename from storefront/postcss.config.js rename to carplace/postcss.config.js diff --git a/storefront/public/favicon.ico b/carplace/public/favicon.ico similarity index 100% rename from storefront/public/favicon.ico rename to carplace/public/favicon.ico diff --git a/storefront/public/icon.svg b/carplace/public/icon.svg similarity index 100% rename from storefront/public/icon.svg rename to carplace/public/icon.svg diff --git a/storefront/public/rentalcardrive.png b/carplace/public/rentalcardrive.png similarity index 100% rename from storefront/public/rentalcardrive.png rename to carplace/public/rentalcardrive.png diff --git a/storefront/public/rentaldrivego.jpeg b/carplace/public/rentaldrivego.jpeg similarity index 100% rename from storefront/public/rentaldrivego.jpeg rename to carplace/public/rentaldrivego.jpeg diff --git a/storefront/src/app/(public)/app-policy-pages.test.ts b/carplace/src/app/(public)/app-policy-pages.test.ts similarity index 96% rename from storefront/src/app/(public)/app-policy-pages.test.ts rename to carplace/src/app/(public)/app-policy-pages.test.ts index 1417d71..4ebe9fa 100644 --- a/storefront/src/app/(public)/app-policy-pages.test.ts +++ b/carplace/src/app/(public)/app-policy-pages.test.ts @@ -16,7 +16,7 @@ function expectPolicyPage(element: unknown, slug: string, forcedLanguage: string expect(page.props.forcedLanguage).toBe(forcedLanguage) } -describe('storefront static app policy pages', () => { +describe('carplace static app policy pages', () => { it('binds app privacy pages to explicit locales', () => { expectPolicyPage(AppPrivacyEnPage(), 'privacy-policy', 'en') expectPolicyPage(AppPrivacyFrPage(), 'privacy-policy', 'fr') diff --git a/storefront/src/app/(public)/app-privacy-ar/page.tsx b/carplace/src/app/(public)/app-privacy-ar/page.tsx similarity index 100% rename from storefront/src/app/(public)/app-privacy-ar/page.tsx rename to carplace/src/app/(public)/app-privacy-ar/page.tsx diff --git a/storefront/src/app/(public)/app-privacy-en/page.tsx b/carplace/src/app/(public)/app-privacy-en/page.tsx similarity index 100% rename from storefront/src/app/(public)/app-privacy-en/page.tsx rename to carplace/src/app/(public)/app-privacy-en/page.tsx diff --git a/storefront/src/app/(public)/app-privacy-fr/page.tsx b/carplace/src/app/(public)/app-privacy-fr/page.tsx similarity index 100% rename from storefront/src/app/(public)/app-privacy-fr/page.tsx rename to carplace/src/app/(public)/app-privacy-fr/page.tsx diff --git a/storefront/src/app/(public)/app-tc-ar/page.tsx b/carplace/src/app/(public)/app-tc-ar/page.tsx similarity index 100% rename from storefront/src/app/(public)/app-tc-ar/page.tsx rename to carplace/src/app/(public)/app-tc-ar/page.tsx diff --git a/storefront/src/app/(public)/app-tc-en/page.tsx b/carplace/src/app/(public)/app-tc-en/page.tsx similarity index 100% rename from storefront/src/app/(public)/app-tc-en/page.tsx rename to carplace/src/app/(public)/app-tc-en/page.tsx diff --git a/storefront/src/app/(public)/app-tc-fr/page.tsx b/carplace/src/app/(public)/app-tc-fr/page.tsx similarity index 100% rename from storefront/src/app/(public)/app-tc-fr/page.tsx rename to carplace/src/app/(public)/app-tc-fr/page.tsx diff --git a/storefront/src/app/(public)/company-workspace/page.tsx b/carplace/src/app/(public)/company-workspace/page.tsx similarity index 100% rename from storefront/src/app/(public)/company-workspace/page.tsx rename to carplace/src/app/(public)/company-workspace/page.tsx diff --git a/storefront/src/app/(public)/explore/ExploreSearchForm.tsx b/carplace/src/app/(public)/explore/ExploreSearchForm.tsx similarity index 100% rename from storefront/src/app/(public)/explore/ExploreSearchForm.tsx rename to carplace/src/app/(public)/explore/ExploreSearchForm.tsx diff --git a/storefront/src/app/(public)/explore/ExploreVehicleGrid.tsx b/carplace/src/app/(public)/explore/ExploreVehicleGrid.tsx similarity index 100% rename from storefront/src/app/(public)/explore/ExploreVehicleGrid.tsx rename to carplace/src/app/(public)/explore/ExploreVehicleGrid.tsx diff --git a/storefront/src/app/(public)/explore/[slug]/page.tsx b/carplace/src/app/(public)/explore/[slug]/page.tsx similarity index 91% rename from storefront/src/app/(public)/explore/[slug]/page.tsx rename to carplace/src/app/(public)/explore/[slug]/page.tsx index a314bbf..b054926 100644 --- a/storefront/src/app/(public)/explore/[slug]/page.tsx +++ b/carplace/src/app/(public)/explore/[slug]/page.tsx @@ -1,6 +1,6 @@ import Link from 'next/link' -import { storefrontFetchOrDefault } from '@/lib/api' -import { getStorefrontLanguage } from '@/lib/i18n.server' +import { carplaceFetchOrDefault } from '@/lib/api' +import { getCarplaceLanguage } from '@/lib/i18n.server' import { formatCurrency } from '@rentaldrivego/types' interface CompanyProfile { @@ -21,14 +21,14 @@ interface CompanyProfile { } export default async function CompanyProfilePage({ params }: { params: { slug: string } }) { - const language = await getStorefrontLanguage() + const language = await getCarplaceLanguage() const dict = { en: { - unavailable: 'Storefront unavailable', + unavailable: 'Carplace unavailable', unavailableTitle: 'Company details are temporarily unavailable.', - unavailableBody: 'The storefront API is running, but the database is not reachable in this local environment.', + unavailableBody: 'The carplace API is running, but the database is not reachable in this local environment.', backToExplore: 'Back to explore', - partner: 'Storefront partner', + partner: 'Carplace partner', vehicles: 'vehicles', offers: 'active offers', rating: 'Rating', @@ -42,11 +42,11 @@ export default async function CompanyProfilePage({ params }: { params: { slug: s unavailableNoDate: 'Temporarily unavailable for new reservations.', }, fr: { - unavailable: 'Storefront indisponible', + unavailable: 'Carplace indisponible', unavailableTitle: "Les détails de l'entreprise sont temporairement indisponibles.", - unavailableBody: "L'API storefront fonctionne, mais la base de données n'est pas accessible dans cet environnement local.", + unavailableBody: "L'API carplace fonctionne, mais la base de données n'est pas accessible dans cet environnement local.", backToExplore: "Retour à l'exploration", - partner: 'Partenaire storefront', + partner: 'Partenaire carplace', vehicles: 'véhicules', offers: 'offres actives', rating: 'Note', @@ -78,7 +78,7 @@ export default async function CompanyProfilePage({ params }: { params: { slug: s unavailableNoDate: 'غير متاحة مؤقتاً للحجوزات الجديدة.', }, }[language] - const company = await storefrontFetchOrDefault(`/storefront/${params.slug}`, null) + const company = await carplaceFetchOrDefault(`/carplace/${params.slug}`, null) if (!company) { return ( diff --git a/storefront/src/app/(public)/explore/[slug]/vehicles/[id]/page.tsx b/carplace/src/app/(public)/explore/[slug]/vehicles/[id]/page.tsx similarity index 95% rename from storefront/src/app/(public)/explore/[slug]/vehicles/[id]/page.tsx rename to carplace/src/app/(public)/explore/[slug]/vehicles/[id]/page.tsx index dc12698..b9c6d3e 100644 --- a/storefront/src/app/(public)/explore/[slug]/vehicles/[id]/page.tsx +++ b/carplace/src/app/(public)/explore/[slug]/vehicles/[id]/page.tsx @@ -1,6 +1,6 @@ import Link from 'next/link' -import { storefrontFetchOrDefault } from '@/lib/api' -import { getStorefrontLanguage } from '@/lib/i18n.server' +import { carplaceFetchOrDefault } from '@/lib/api' +import { getCarplaceLanguage } from '@/lib/i18n.server' import { formatCurrency } from '@rentaldrivego/types' import BookingForm from '@/components/BookingForm' @@ -33,12 +33,12 @@ interface VehicleDetail { } export default async function VehicleDetailPage({ params }: { params: { slug: string; id: string } }) { - const language = await getStorefrontLanguage() + const language = await getCarplaceLanguage() const dict = { en: { - unavailable: 'Storefront unavailable', + unavailable: 'Carplace unavailable', unavailableTitle: 'Vehicle details are temporarily unavailable.', - unavailableBody: 'The storefront frontend is running, but the backing database is not reachable right now.', + unavailableBody: 'The carplace frontend is running, but the backing database is not reachable right now.', backToFleet: 'Back to fleet', backToExplore: 'Back to explore', noPhotos: 'No photos available.', @@ -59,9 +59,9 @@ export default async function VehicleDetailPage({ params }: { params: { slug: st photos: 'Photos', }, fr: { - unavailable: 'Storefront indisponible', + unavailable: 'Carplace indisponible', unavailableTitle: 'Les détails du véhicule sont temporairement indisponibles.', - unavailableBody: "Le frontend storefront fonctionne, mais la base de données n'est pas accessible pour le moment.", + unavailableBody: "Le frontend carplace fonctionne, mais la base de données n'est pas accessible pour le moment.", backToFleet: 'Retour à la flotte', backToExplore: 'Retour à l’exploration', noPhotos: 'Aucune photo disponible.', @@ -106,7 +106,7 @@ export default async function VehicleDetailPage({ params }: { params: { slug: st }, }[language] - const vehicle = await storefrontFetchOrDefault(`/storefront/${params.slug}/vehicles/${params.id}`, null) + const vehicle = await carplaceFetchOrDefault(`/carplace/${params.slug}/vehicles/${params.id}`, null) if (!vehicle) { return ( diff --git a/storefront/src/app/(public)/explore/page.tsx b/carplace/src/app/(public)/explore/page.tsx similarity index 93% rename from storefront/src/app/(public)/explore/page.tsx rename to carplace/src/app/(public)/explore/page.tsx index 7251068..8a2113e 100644 --- a/storefront/src/app/(public)/explore/page.tsx +++ b/carplace/src/app/(public)/explore/page.tsx @@ -1,6 +1,6 @@ import Link from 'next/link' -import { storefrontFetchOrDefault } from '@/lib/api' -import { getStorefrontLanguage } from '@/lib/i18n.server' +import { carplaceFetchOrDefault } from '@/lib/api' +import { getCarplaceLanguage } from '@/lib/i18n.server' import ExploreSearchForm from './ExploreSearchForm' import ExploreVehicleGrid from './ExploreVehicleGrid' @@ -68,7 +68,7 @@ const CATEGORY_VALUES = [ export default async function ExplorePage({ searchParams }: { searchParams?: Promise> }) { const resolvedSearchParams = await searchParams - const language = await getStorefrontLanguage() + const language = await getCarplaceLanguage() const dict = { en: { kicker: 'Discovery only', @@ -89,10 +89,10 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Pro ageOptions: ['18+', '21+', '23+', '25+', '30+'], search: 'Search', currentDeals: 'Current deals', - featuredOffers: 'Featured storefront offers', + featuredOffers: 'Featured carplace offers', company: 'Company', validUntil: 'Valid until', - offersUnavailable: 'Storefront offers are unavailable right now.', + offersUnavailable: 'Carplace offers are unavailable right now.', availableVehicles: 'Available vehicles', listings: 'listings', rentalCompany: 'Rental company', @@ -108,8 +108,8 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Pro vehicleUnavailable: 'Vehicle listings are unavailable right now.', browseByCategory: 'Browse by category', browseByCompany: 'Browse by company', - storefrontPartners: 'Storefront partners', - storefrontPartner: 'Storefront partner', + carplacePartners: 'Carplace partners', + carplacePartner: 'Carplace partner', rating: 'Rating', new: 'New', publishedVehicles: 'published vehicles', @@ -135,10 +135,10 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Pro ageOptions: ['18+', '21+', '23+', '25+', '30+'], search: 'Rechercher', currentDeals: 'Offres du moment', - featuredOffers: 'Offres storefront mises en avant', + featuredOffers: 'Offres carplace mises en avant', company: 'Entreprise', validUntil: "Valable jusqu'au", - offersUnavailable: 'Les offres storefront sont indisponibles pour le moment.', + offersUnavailable: 'Les offres carplace sont indisponibles pour le moment.', availableVehicles: 'Véhicules disponibles', listings: 'annonces', rentalCompany: 'Société de location', @@ -154,8 +154,8 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Pro vehicleUnavailable: 'Les annonces véhicules sont indisponibles pour le moment.', browseByCategory: 'Parcourir par catégorie', browseByCompany: 'Parcourir par entreprise', - storefrontPartners: 'Partenaires storefront', - storefrontPartner: 'Partenaire storefront', + carplacePartners: 'Partenaires carplace', + carplacePartner: 'Partenaire carplace', rating: 'Note', new: 'Nouveau', publishedVehicles: 'véhicules publiés', @@ -200,8 +200,8 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Pro vehicleUnavailable: 'قوائم السيارات غير متاحة حالياً.', browseByCategory: 'تصفح حسب الفئة', browseByCompany: 'تصفح حسب الشركة', - storefrontPartners: 'شركاء السوق', - storefrontPartner: 'شريك في السوق', + carplacePartners: 'شركاء السوق', + carplacePartner: 'شريك في السوق', rating: 'التقييم', new: 'جديد', publishedVehicles: 'سيارات منشورة', @@ -241,9 +241,9 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Pro query.set('pageSize', '24') const [offers, vehicles, companies] = await Promise.all([ - storefrontFetchOrDefault('/storefront/offers', []), - storefrontFetchOrDefault(`/storefront/search?${query.toString()}`, []), - storefrontFetchOrDefault('/storefront/companies?pageSize=8', []), + carplaceFetchOrDefault('/carplace/offers', []), + carplaceFetchOrDefault(`/carplace/search?${query.toString()}`, []), + carplaceFetchOrDefault('/carplace/companies?pageSize=8', []), ]) const cities = Array.from( new Set( @@ -309,12 +309,12 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Pro

{dict.browseByCompany}

-

{dict.storefrontPartners}

+

{dict.carplacePartners}

{companies.map((company) => ( -

{company.brand?.publicCity ?? dict.storefrontPartner}

+

{company.brand?.publicCity ?? dict.carplacePartner}

{company.brand?.displayName ?? dict.rentalCompany}

{dict.rating} {company.brand?.marketplaceRating?.toFixed(1) ?? dict.new}

{company._count.vehicles} {dict.publishedVehicles}

diff --git a/storefront/src/app/(public)/footer/[slug]/page.test.ts b/carplace/src/app/(public)/footer/[slug]/page.test.ts similarity index 96% rename from storefront/src/app/(public)/footer/[slug]/page.test.ts rename to carplace/src/app/(public)/footer/[slug]/page.test.ts index fe57631..8e930d9 100644 --- a/storefront/src/app/(public)/footer/[slug]/page.test.ts +++ b/carplace/src/app/(public)/footer/[slug]/page.test.ts @@ -13,7 +13,7 @@ import FooterContentPage from '@/components/FooterContentPage' import FooterPage, { generateStaticParams } from './page' import { footerPageSlugs } from '@/lib/footerContent' -describe('storefront footer route', () => { +describe('carplace footer route', () => { it('generates one static route per registered footer slug', () => { expect(generateStaticParams()).toEqual(footerPageSlugs.map((slug) => ({ slug }))) }) diff --git a/storefront/src/app/(public)/footer/[slug]/page.tsx b/carplace/src/app/(public)/footer/[slug]/page.tsx similarity index 100% rename from storefront/src/app/(public)/footer/[slug]/page.tsx rename to carplace/src/app/(public)/footer/[slug]/page.tsx diff --git a/storefront/src/app/(public)/layout.tsx b/carplace/src/app/(public)/layout.tsx similarity index 100% rename from storefront/src/app/(public)/layout.tsx rename to carplace/src/app/(public)/layout.tsx diff --git a/storefront/src/app/(public)/page.tsx b/carplace/src/app/(public)/page.tsx similarity index 59% rename from storefront/src/app/(public)/page.tsx rename to carplace/src/app/(public)/page.tsx index b227514..253cdde 100644 --- a/storefront/src/app/(public)/page.tsx +++ b/carplace/src/app/(public)/page.tsx @@ -1,5 +1,5 @@ import { redirect } from 'next/navigation' -export default function StorefrontHomePage() { +export default function CarplaceHomePage() { redirect('/explore') } diff --git a/storefront/src/app/globals.css b/carplace/src/app/globals.css similarity index 100% rename from storefront/src/app/globals.css rename to carplace/src/app/globals.css diff --git a/storefront/src/app/layout.tsx b/carplace/src/app/layout.tsx similarity index 62% rename from storefront/src/app/layout.tsx rename to carplace/src/app/layout.tsx index 6d853cf..308bd13 100644 --- a/storefront/src/app/layout.tsx +++ b/carplace/src/app/layout.tsx @@ -1,11 +1,11 @@ import type { Metadata } from 'next' import { cookies } from 'next/headers' -import StorefrontShell from '@/components/StorefrontShell' -import { getStorefrontLanguage } from '@/lib/i18n.server' +import CarplaceShell from '@/components/CarplaceShell' +import { getCarplaceLanguage } from '@/lib/i18n.server' import './globals.css' export const metadata: Metadata = { - title: 'RentalDriveGo Storefront', + title: 'RentalDriveGo Carplace', description: 'Discover vehicles from trusted rental companies.', icons: { icon: '/rentaldrivego.png', @@ -15,11 +15,11 @@ export const metadata: Metadata = { } export default async function RootLayout({ children }: { children: React.ReactNode }) { - const language = await getStorefrontLanguage() + const language = await getCarplaceLanguage() const cookieStore = await cookies() const rawTheme = cookieStore.get('rentaldrivego-theme')?.value ?? - cookieStore.get('storefront-theme')?.value + cookieStore.get('carplace-theme')?.value const theme = rawTheme === 'dark' ? 'dark' : 'light' return ( @@ -29,12 +29,12 @@ export default async function RootLayout({ children }: { children: React.ReactNo