Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LaunchPad

Next.js + Auth.js + Drizzle Starter

Based on

This project combines two templates from the Strapi and Next.js communities, plus custom modifications that allow you to build pages via Strapi without writing code for each page.


Introduction

A Next.js + TypeScript boilerplate using Auth.js for authentication, with user data persisted to PostgreSQL via Auth.js's @auth/drizzle-adapter. Unlike the original Docker-based template, this version runs locally against any PostgreSQL instance you provide.


Getting Started Locally

  1. Clone the repository:

    git clone https://github.com/yourusername/yourproject.git
    cd yourproject
  2. Install dependencies:

    cd ./next-js
    npm install

    and

    cd ./strapi
    #nvm use 20 (RECOMMENDED! need to install nvm)
    npm  install
    npx strapi ts:generate-types
  3. Configure environment:

    • Create a .env.local file (ignored by Git) for storing secrets:
      cp .env .env.local
    • Edit .env.local with your own values (e.g., database connection string, Auth.js secret, OAuth credentials).
  4. Run the dev server:

    npm run dev #in next-js

    and

    npm run develop #in strapi

    Then visit http://localhost:3000.


Setting Up PostgreSQL (Optional)

You can use any PostgreSQL instance (local or remote). For local development, install PostgreSQL on your machine and update the connection URL in your .env.local:

DATABASE_URL=postgresql://user:password@localhost:5432/mydb

Creating Pages from Strapi

  1. Dynamic Zones
    Define your dynamic-zone fields in Strapi for each page. For example, you might have a “Hero” block, a “Card” block, etc.

Useful Commands

  • Start local dev:
    npm run dev
  • Build for production:
    npm run build
  • Run migrations (Drizzle):
    npx drizzle-kit up
    Adjust your Drizzle config as needed in drizzle.config.ts.

Acknowledgments

We combined and modified these templates to create our own boilerplate, tailored to our needs.


License

This project inherits licenses from the original templates. Please refer to their respective repositories for details on license terms:


Happy coding! If you run into any issues or have suggestions, feel free to open an issue or submit a pull request.

About

A Next.js + Auth.js + Drizzle boilerplate enhanced with Strapi-based dynamic pages, allowing you to build and manage content without additional coding. Includes local video overview, customizable layouts, and a flexible structure for multi-locale projects.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages