Skip to content

NexusForge is a cutting-edge boilerplate for Next.js 14, featuring shadcn/ui, Stripe integration, Lucia authentication, Prisma ORM, PostgreSQL, S3 compatibility, Tailwind CSS, and the full T3 stack with tRPC. Original credit to @iamtouha for building the project with Drizzle. We updated all dependencies and switched to Prisma.

License

Notifications You must be signed in to change notification settings

BuildAppolis/Nexus-Forge

Repository files navigation

NexusForge: Next-Gen Web Development Boilerplate

Installation and Deployment Guide

NexusForge is a cutting-edge boilerplate for Next.js 14, featuring shadcn/ui, Stripe integration, Lucia authentication, Prisma ORM, PostgreSQL, S3 compatibility, Tailwind CSS, and the full T3 stack with tRPC.

Table of Contents

Prerequisites

Ensure you have the following installed:

  • Node.js (v18 or later)
  • pnpm
  • PostgreSQL
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/nexusforge.git
    cd nexusforge
  2. Install dependencies:

    pnpm install

Environment Setup

  1. Rename .env.example to .env:

    cp .env.example .env
  2. Open .env and update all the variables with your actual values.

  3. The env.js file in the root directory ensures type safety for your environment variables. If you add new environment variables, make sure to update both .env and env.js.

Development

  1. Start the development server:

    pnpm dev
  2. Open http://localhost:3000 in your browser.

  3. The tRPC API routes are located in /server/api/routers. Add new routers here and import them in /server/api/root.ts.

  4. The Prisma schema is located at prisma/schema.prisma. After making changes to the schema, run:

    pnpm db:push
  5. To seed the database:

    pnpm db:seed

Testing with Playwright

  1. Install Playwright browsers:

    pnpm playwright install
  2. Run Playwright tests:

    pnpm test:e2e
  3. To open Playwright UI for debugging:

    pnpm test:e2e:ui
  4. Playwright test files are located in the e2e directory. Add new tests there.

Production Deployment

  1. Build the application:

    pnpm build
  2. Start the production server:

    pnpm start
  3. For database migrations in production:

    pnpm db:migrate:deploy
  4. Ensure all environment variables are properly set in your production environment.

  5. Set up a reverse proxy (e.g., Nginx) and SSL certificates for secure HTTPS connections.

  6. Configure your Stripe webhook endpoint in the Stripe dashboard to point to your production URL.

Troubleshooting

  • If you encounter TypeScript errors related to environment variables, ensure that both .env and env.js are properly configured.
  • For database connection issues, check your DATABASE_URL in the .env file and ensure your PostgreSQL server is running.
  • If Playwright tests fail, make sure you have the latest browsers installed and your application is running on the expected port.

For more detailed information, refer to the documentation of individual packages used in NexusForge.

About

NexusForge is a cutting-edge boilerplate for Next.js 14, featuring shadcn/ui, Stripe integration, Lucia authentication, Prisma ORM, PostgreSQL, S3 compatibility, Tailwind CSS, and the full T3 stack with tRPC. Original credit to @iamtouha for building the project with Drizzle. We updated all dependencies and switched to Prisma.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published