Code-sharing patterns for Next.js

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • multitenant-nextjs

    Discontinued a test repository for testing Next.js' multi-tenant capabilities with a custom Express.js server

  • In this approach, a custom server is set up and maps individual sites to their own folders inside your pages folder. You can do this manually yourself (here is one example), but I will focus on a great library available for this called 🦀 Krabs.

  • krabs

    Discontinued 🦀 Express.js/Fastify middleware and virtual host for multi-tenant Next.js applications

  • Krabs.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • next-multi-host

    Multiple domains hosting on next.js

  • Next.js recently added support for Rewrites - essentially a regex matching engine that supports rewriting parts of the query. More importantly, you can dynamically match on headers, cookies, and query parameters. A multitenancy approach using rewrites was developed.

  • next-js-monorepo

    A monorepo approach for Next.js that lets you have multiple discrete Next.js sites while sharing modules, components and NPM dependencies.

  • Surprisingly, this approach worked! It's only about 10 lines of bash code and doesn't touch Next.js. It supports individual API and public folders, and you could even deploy it to Vercel. (In your CI, you would switch to each site, build it and then deploy it to Vercel.

  • Next.js

    The React Framework

  • Sometimes it's convenient to have one Next.js codebase serve multiple discrete sites. The sites might have different content and design but also share code - such as having the same React component to render the header or sidebar.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • System & Database Design (Day 1) - Creating a SaaS Startup in 30 Days

    2 projects | dev.to | 26 Apr 2024
  • Epic Next.js 14 Tutorial: Learn Next.js by building a real-life project: Part 1

    2 projects | dev.to | 13 Mar 2024
  • best approach to fetch data based on state in nextjs 13

    2 projects | /r/nextjs | 2 Jul 2023
  • My experience deploying a Next.js application on Netlify (using Next App Router)

    3 projects | dev.to | 29 Jun 2023
  • Need examples of good structured applications to follow

    3 projects | /r/reactjs | 16 Dec 2022