Template

screenshot of Template
nextjs
react
tailwind
shadcn-ui
drizzle-orm
planetscale

Template

A Next.js 13 application with authentication and payments, built with PlanetScale, Drizzle ORM, Lucia, Tailwind and LemonSqueezy

Overview

TemplateA is a Next.js 13 application that provides authentication and payments functionality. It is built with various technologies such as PlanetScale, Drizzle ORM, Lucia, Tailwind, and LemonSqueezy. The project was created as a way to experiment with the new Next.js app directory, so it may not be optimized or implemented correctly. However, contributions and bug reports are welcome.

Features

  • Next.js app directory with various components and functionality
  • TypeScript ORM (Drizzle ORM) for SQL databases
  • Authentication using Lucia
  • Database on PlanetScale
  • UI components from shadcn/ui
  • Blog functionality using MDX and Contentlayer
  • Subscriptions using LemonSqueezy
  • Styled using Tailwind CSS
  • Data fetching using RSCs and tRPC
  • Email verification
  • Teams with team member management
  • Role-Based Access Control (RBAC) using CASL
  • Email functionality using Mailing and Resend

Installation

To run the TemplateA Next.js application locally, follow these steps:

  1. Install dependencies using npm:
npm install
  1. Copy the .env.example file to .env and update the variables according to your environment.

  2. Start the development server:

npm run dev
  1. Setting up the database:
  • For local development: Log in to MySQL, create the database, and push the schema.
  • For production using PlanetScale: You can use PlanetScale as your primary database instead of a local one.

Summary

TemplateA is a Next.js application that provides authentication and payment functionality. It is built with various technologies and libraries and offers a range of features such as authentication using Lucia, SQL database ORM using Drizzle ORM, and UI components from shadcn/ui. The project is still in development, and there are known issues that need to be addressed. However, it provides a good starting point for building a real application and can be customized according to specific requirements.

nextjs
Next.js

Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

tailwind
Tailwind

Tailwind CSS is a utility-first CSS framework that provides pre-defined classes for building responsive and customizable user interfaces.

shadcn-ui
Shadcn UI

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.

drizzle-orm
Drizzle ORM

Drizzle ORM is a TypeScript ORM for SQL databases designed with maximum type safety in mind. It comes with a drizzle-kit CLI companion for automatic SQL migrations generation. Drizzle ORM is meant to be a library, not a framework. It stays as an opt-in solution all the time at any levels.

planetscale
Planetscale

PlanetScale is a MySQL-compatible serverless database that brings you scale, performance, and reliability — without sacrificing developer experience.

fullstack
Fullstack Boilerplates

A fullstack boilerplate provides a starter application that includes both frontend and backend. It should include database, auth, payments, user roles and other backend services to build a fully featured saas or webapps.

contentlayer
Contentlayer

Contentlayer is an open-source platform for building dynamic, data-driven websites and applications using markdown files as the content source. It features an intuitive API, flexible content modeling, and easy integration with popular frontend frameworks and tools.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

postcss
Postcss

PostCSS is a popular open-source tool that enables web developers to transform CSS styles with JavaScript plugins. It allows for efficient processing of CSS styles, from applying vendor prefixes to improving browser compatibility, ultimately resulting in cleaner, faster, and more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.