Skip to content
/ Next15 Public template
generated from Aleydon/Next14

Next-15 template configured with React 19, typescript, eslint, prettier, husky (pre-commit), storybook, prisma, jest, testing-library and more...

Notifications You must be signed in to change notification settings

Aleydon/Next15

Repository files navigation

🚀 Next.js 15 Template 🚀

Next.js React TypeScript Tailwind CSS PostgreSQL Docker Prisma Jest


logo of Next15 repository

📖 About The Project

This is a robust template for Next.js 15 projects, pre-configured with a modern development stack to ensure productivity, code quality, and scalability. It includes tools for databases, testing, component documentation, and much more.


✨ Key Features


🌿 Branches

This project has multiple branches to showcase different database configurations:

  • master: The main branch, configured with Prisma ORM.
  • Aleydon: A development branch, also configured with Prisma ORM.
  • Drizzle: This branch is configured with Drizzle ORM.

🚀 Getting Started

Prerequisites

Steps

  1. Clone the repository:

    git clone https://github.com/Aleydon/Next15.git
  2. Navigate to the project directory:

    cd Next15
  3. Install dependencies:

    npm install
  4. Set up environment variables:

    • Rename the enviroment-example.env file to .env.
    • Fill in the required environment variables in the .env file.
  5. Start the Docker environment:

    • This command will build and start the PostgreSQL container.
    npm run docker:start
  6. Run the database migrations:

    • This command will create the database tables based on your Prisma schema.
    npm run prisma:migrate
  7. Start the development server:

    npm run dev

📜 Available Scripts

Script Description
dev Starts the Next.js development server.
build Builds the application for production.
start Starts a production server.
lint Runs ESLint to analyze and fix the code.
docker:start Starts the services defined in docker-compose.yml.
prisma:migrate Runs Prisma migrations to update the database.
prisma:generate Generates the Prisma Client based on your schema.
prisma:studio Opens Prisma Studio to view and edit your data.
test Runs the unit and integration tests.
test:watch Runs the tests in watch mode.
commit Starts the Commitizen assistant to create standardized commits.
storybook Starts Storybook to view and develop components.
build-storybook Builds Storybook for production.

🐳 Docker

The development environment uses Docker to manage the PostgreSQL database.

  • Start the container:
    npm run docker:start
    This command will build and start the database container in the background.

💿 Prisma

Prisma is used as an ORM to interact with the database.

  • Apply migrations:

    npm run prisma:migrate

    Creates and applies migrations to the database based on schema.prisma.

  • Generate Prisma Client:

    npm run prisma:generate

    Generates or updates the Prisma Client whenever schema.prisma is modified.

  • Open Prisma Studio:

    npm run prisma:studio

    Opens a visual interface in the browser to view and manage the database data.


🧪 Testing

This project uses Jest and Testing Library for testing.

  • To run the tests, execute:
    npm run test
  • To run the tests in watch mode:
    npm run test:watch

A test example can be found in src/app/page.spec.tsx.


🎨 Storybook

Visualize and develop your components in isolation with Storybook.

  • To start Storybook:
    npm run storybook

A story example can be found in src/app/components/Text/text.stories.tsx.


storybook running

About

Next-15 template configured with React 19, typescript, eslint, prettier, husky (pre-commit), storybook, prisma, jest, testing-library and more...

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published