Need Help Bridging Two Projects in Next.js

Hi everyone,

I need some quick assistance to understand how I can connect two of my projects.

Problem Statement:

I have two separate projects built using Next.js, Vercel, and Supabase. The first project is a job board for job listings, and I’m planning to introduce a Quiz module, which I’ve created separately. The repositories for both projects are distinct.

Currently, I know I can create a subdomain like quiz.example.com for the new Quiz module, while my original project runs on example.com. However, I’m looking for an alternative solution.

I want the second Quiz project to run on example.com/quiz within the main domain, with the prerequisites I mentioned.

TL;DR:
I have two separate Vercel projects and would like to bridge them as follows:

  1. The first project should run on: example.com
  2. The second project should run on: example.com/quiz

I’m looking forward to a smooth transition for this setup.

Best,
Chintan
[chintan.com]

Any thoughts guys? Need any further clarification?

Hey Chintan! :waving_hand: You’ve got a few good options here:

Option 1 (Recommended): Use Vercel Rewrites
Add this to your vercel.json to proxy /quiz/* to your quiz project while keeping a clean URL:

{
  "rewrites": [
    { "source": "/quiz/:path*", "destination": "https://your-quiz-project.vercel.app/:path*" }
  ]
}

Option 2: Restructure into a monorepo with Turborepo to manage both apps together.
Option 3: Move the quiz code into your main project as a separate route group.

Rewrites are usually the quickest win since they need minimal changes and keep your URLs tidy.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.