ixartz / Next-js-Boilerplate

🚀🎉📚 Boilerplate and Starter for Next.js 14+ with App Router and Page Router support, Tailwind CSS 3.4 and TypeScript ⚡️ Made with developer experience first: Next.js + TypeScript + ESLint + Prettier + Drizzle ORM + Husky + Lint-Staged + Vitest + Testing Library + Playwright + Storybook + Commitlint + VSCode + Netlify + PostCSS + Tailwind CSS ✨
https://nextjs-boilerplate.com
MIT License
8.65k stars 1.66k forks source link

Feature request: Turborepo and Documentation #261

Closed gauravmandall closed 4 months ago

gauravmandall commented 5 months ago

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

ixartz commented 5 months ago

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.

gauravmandall commented 5 months ago

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

ixartz commented 5 months ago

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: https://github.com/ixartz/Next-js-Boilerplate/blob/93ea223dfbf29d060b68b46431478169c9b3e291/scripts/dbMigrate.ts#L16, which not available in Prisma

gauravmandall commented 4 months ago

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!

ixartz commented 4 months ago

Could you share the error?

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

SharadKumar commented 4 months ago

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.

SharadKumar commented 4 months ago

Keystatic is a much better replacement for Contentlayer.