This is a comprehensive, production-ready monorepo starter kit designed for building modern, full-stack applications. It comes pre-configured with a suite of powerful tools and a logical structure to accelerate development.
- Features
- Monorepo Structure
- Technologies Used
- Getting Started
- Available Scripts
- Authentication
- Email Handling
- Internationalization (i18n)
- UI and State Management
- Contributing
- License
- Monorepo: Managed with
pnpm
andTurborepo
for efficient builds and dependency management. - Full-stack Framework: Built on Next.js for both the main web application and the documentation site.
- Dual Authentication Strategy: Pre-configured support for both Clerk and Next-Auth, allowing you to choose the best fit for your needs.
- Custom OIDC Provider: Includes a custom OIDC provider implementation, giving you full control over your authentication flows.
- UI Components: A dedicated UI package (
@repo/ui
) using shadcn/ui, Tailwind CSS, and Tanstack Table for building beautiful and complex data grids. - Component Previews: Isolated component development and previews with Storybook.
- Database ORM: Drizzle ORM for type-safe database access with PostgreSQL.
- API Layer: tRPC for building type-safe APIs between the client and server.
- File Storage: Integrated with both S3 and R2 for flexible file storage options.
- Payments: Pre-configured Stripe integration for handling payments.
- Advanced Email System: A robust, multi-provider email system supporting Resend, Nodemailer (SMTP), and AWS SES, configurable via environment variables.
- AI-Powered Internationalization (i18n): A comprehensive i18n setup using
i18next
, featuring an advanced script that leverages the Google Gemini API to automatically translate language files. - Code Quality: Enforced code style and quality with BiomeJS, ESLint, and TypeScript.
- Git Hooks: Husky and lint-staged for running checks before commits.
- Conventional Commits: Enforced commit message format with Commitlint.
- Environment Variables: Centralized and type-safe environment variable management with Zod.
- State Management: Zustand for lightweight global state management and SWR for data fetching and caching.
The repository is organized into two main directories: apps
and packages
.
apps/
: Contains the different applications.packages/
: Contains shared code and libraries, includingcore
,ui
,i18n
, andemail
.tooling/
: Contains shared configurations for tools.
- Framework: Next.js
- Monorepo: pnpm, Turborepo
- UI: React, shadcn/ui, Tailwind CSS, Storybook, Tanstack Table
- Database: Drizzle ORM, PostgreSQL
- API: tRPC
- Authentication: Clerk, Next-Auth, OIDC Provider
- Email: Resend, Nodemailer, AWS SES
- Internationalization: i18next, Google Gemini API
- State Management: Zustand, SWR
- Code Quality: BiomeJS, ESLint, TypeScript
- Testing: Jest
-
Clone the repository:
git clone https://github.com/codersaadi/advanced-starter-pack.git cd private-starterkit
-
Install dependencies:
pnpm install
-
Set up environment variables:
Each app and package with an
.env.example
file needs its own.env
file. Start by copying the example file in theweb
app:cp apps/web/.env.example apps/web/.env
Then, fill in the required environment variables in
apps/web/.env
.
To start all applications in development mode, run the following command from the root of the project:
pnpm web dev
This will use Turborepo to run the dev
script for each app in the monorepo.
The following scripts are available at the root level and can be run with pnpm <script-name>
:
dev
: Starts all applications in development mode.build
: Builds all applications for production.lint
: Lints the codebase using Turborepo.check
: Runs BiomeJS to check for formatting and linting issues.format-and-lint:fix
: Applies automatic fixes for formatting and linting issues found by BiomeJS.test
: Runs Jest tests.generate:i18n
: Generates types for the i18n module.translate:i18n
: Runs the AI-powered translation script for the i18n module.bump-ui
: Adds all availableshadcn/ui
components to the@repo/ui
package.
This starter kit provides a flexible authentication setup that can be configured to use either Clerk or Next-Auth.
- Clerk: For a quick and easy, yet powerful, authentication solution with pre-built UI components.
- Next-Auth: For a more customizable solution, this starter kit includes a full implementation of a custom OIDC Provider, giving you the ability to act as your own identity provider.
The choice between them can be configured via environment variables.
This project includes a flexible email service that can be configured to use one of several providers:
- Resend: A modern email platform for developers.
- Nodemailer: A module for Node.js applications to allow easy as cake email sending. Can be configured with any SMTP provider.
- AWS SES: Amazon's Simple Email Service for a scalable and cost-effective solution.
The active provider is determined by the EMAIL_PROVIDER
environment variable.
The i18n system is built with i18next
and is designed for scalability. A key feature is the automated translation script located in @repo/i18n/scripts/translate.ts
. This script uses the Google Gemini API to translate the source language files (in English) into all other supported languages, drastically reducing the manual effort required for localization.
- shadcn/ui: A collection of beautifully designed, accessible, and customizable components.
- Tanstack Table: A headless utility for building powerful and flexible data tables and datagrids.
- Zustand: A small, fast, and scalable state-management solution.
- SWR: A React Hooks library for data fetching, providing caching, revalidation, and more.
Contributions are welcome. Please ensure that your code adheres to the established linting and formatting rules. Commits must follow the Conventional Commits specification.
This repo is subject to change , may have many changes and updates in the near future
This starter kit is licensed under the MIT License.