JSPM

  • Created
  • Published
  • Downloads 216
  • Score
    100M100P100Q92832F
  • License MIT

A CLI to create projects using Salman Ahamed's Next.js TypeScript Starter Template

Package Exports

  • next-ts-app
  • next-ts-app/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (next-ts-app) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Next.js TypeScript Starter Template

Next.js Bun License

A simple starter template for Next.js projects with useful tools:

TypeScript Tailwind CSS ESLint Prettier Husky

Main Features

  • ✅ Next.js 15 (App Router)
  • ✅ TypeScript for better coding
  • ✅ Bun for fast package management
  • ✅ ESLint to check code mistakes
  • ✅ Prettier to format code automatically
  • ✅ Husky for Git checks before commits
  • ✅ Ready for production use
  • ✅ Clean project structure

How to Start

  1. Create a new project with this command:

    npx next-ts-app
  2. Answer these questions:

    • Enter your project name (e.g., my-project).
    • Choose a package manager (bun, pnpm, yarn, or npm).
  3. Follow the steps shown: For example, if you choose bun:

    cd my-project
    bun install
    bun run dev

    Note: If you pick bun, make sure Bun is installed (visit bun.sh). For pnpm or yarn, install them first if needed.

Option 2: Use GitHub Template

  1. Click Use this template on GitHub.

  2. Name your new repository.

  3. Click Create repository.

  4. Set up locally:

    git clone https://github.com/[your-username]/[your-repo].git
    cd [your-repo]
    bun install
    bun run dev

Useful Commands

Run these commands in your project folder:

# Start the development server
bun run dev

# Build for production
bun run build

# Check code for errors
bun run lint

# Fix code errors automatically
bun run lint:fix

# Check code formatting
bun run format:check

# Format code automatically
bun run format

Code Quality Tools

These tools keep your code neat:

  • ESLint: Finds code mistakes.
  • Prettier: Formats code nicely.
  • Tailwind CSS: Organizes styles.
  • Husky: Checks code before commits.
  • lint-staged: Runs checks on changed files.

Example rule for imports:

"import/order": [
  "error",
  {
    "groups": ["builtin", "external", "internal"],
    "alphabetize": { "order": "asc" }
  }
]

Deployment

This template works with:

  • Vercel
  • Netlify
  • AWS
  • Docker

Copy .env.example to .env for production settings.

License

Free to use under MIT License. See the LICENSE file for details.