ixartz/Next-js-Boilerplate

Feature request: Turborepo and Documentation

Closed this issue · 7 comments

Add documentation template /[locale]/docs and also make turborepo for multiple apps

.
├── README.md                           # README file
├── .github                                    # GitHub folder
...
├──apps
│   ├── web                                   # App1 Nextjs
│   │   ├── src
│   │       ├── app                         # Next JS App (App Router)
│   │       ├── components           # React components
│   │       ├── ...
│   │       ├── utils                        # Utilities folder
│   │       ├── validations             # Validation schemas
│   │
│   ├── docs                                 # App2 Vite
│   │   ├── src
│   │       ├── app                        # Next JS App (App Router)
│   │       ├── components          # React components
│   │       ├── ...
│   │
│   ├── PWA                                # App3 Nextjs
│   │   ├── ...
│   │
│   ├── Blogs                               # App4 Nextjs
│   │   ├── ...
│
├── tests
│   ├── e2e                                 # E2E tests, also includes Monitoring as Code
│   └── integration                     # Integration tests
├── tailwind.config.js                 # Tailwind CSS configuration
└── tsconfig.json                       # TypeScript configuration
└── turbo.json                           # Turbo configuration

documentation examples:
nextjs: https://nextjs.org/docs
shacn: https://ui.shadcn.com/docs
clerk: https://clerk.com/docs

turborepo examples:
shadcn: https://github.com/shadcn-ui/ui
cal.com https://github.com/calcom/cal.com
supabase: https://github.com/supabase/supabase

Refrences:
docs: Nextra, Contentlayer.dev ⚠️, Sandocs
turborepo: Turbo.build

I think these 2 features will make more sense in SaaS Boilerplate: https://github.com/ixartz/SaaS-Boilerplate, which is built on top of Next.js Boilerplate

In SaaS Boilerplate, it'll totally make sense to add a documentation template.

Yeah I agree with you and this template will booming soon but why you don't use Prisma instead of Drizzle and Prisma in this Saas Boilerplate even Prisma is now edge compatible and also supporting Turso

Read here: https://github.com/prisma/prisma/releases/tag/5.11.0
Blog: https://www.prisma.io/blog/prisma-orm-support-for-edge-functions-is-now-in-preview

It's a new project, just published today.

The Edge and Turso support is only available in 5.11, it was released 2 weeks ago. I didn't know it before your comment.

Here are the few reason I'm using Drizzle ORM instead of Prisma:
Schema in TypeScript
No DB client to generate
Programmatic migrate function:

await migrate(db, { migrationsFolder: './migrations' });
, which not available in Prisma

I think these 2 features will make more sense in SaaS Boilerplate: https://github.com/ixartz/SaaS-Boilerplate, which is built on top of Next.js Boilerplate

In SaaS Boilerplate, it'll totally make sense to add a documentation template.

It's not added to the Saas boilerplate, and when I tried to make this one turborepo, it's throwing errors!

Could you share the error?

There isn't any specific changes to make incompatible with Turborepo

Since Turso by design supports large number of DBs, it is a great candidate for SaaS.

Reduces security risks in B2B SaaS with each tenant getting their own DB.

Plus a monorepo is much more scalable pattern. This would be great.

Keystatic is a much better replacement for Contentlayer.