npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

create-nextsaasify-app

v1.0.6

Published

CLI tool for creating a NextSaaSBoilerplate project

Downloads

74

Readme

create-nextsaasify-app

create-nextsaasify-app is a CLI tool for quickly setting up a new SaaS project using the NextSaaSBoilerplate. It provides an interactive setup process to customize your new SaaS application with various authentication and database options.

Features

  • Interactive CLI for project setup
  • Support for multiple authentication providers (Firebase, Supabase, Clerk)
  • Support for multiple database options (Firebase, Supabase, MongoDB)
  • Optional email integration setup
  • Stripe integration for subscription management
  • Automatic configuration of selected options
  • Built with Next.js 14, TypeScript, Tailwind CSS, and Shadcn/UI

Prerequisites

  • Node.js 14.0.0 or later
  • npm 6.0.0 or later

Usage

To create a new SaaS project, run:

npx create-nextsaasify-app

Follow the interactive prompts to configure your project:

  1. Enter your project name
  2. Choose your authentication provider
  3. Select your database provider
  4. Decide whether to include Stripe integration
  5. Decide whether to include email integration

After the setup is complete, navigate to your project directory and start the development server.

Configuration

The CLI tool will create a .env.local file in your project root with placeholders for the necessary environment variables. Before running your application, you need to fill these in with your actual credentials:

  1. For Firebase Auth and/or Firebase Database:

    • NEXT_PUBLIC_FIREBASE_API_KEY
    • NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN
    • NEXT_PUBLIC_FIREBASE_PROJECT_ID
    • NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET
    • NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID
    • NEXT_PUBLIC_FIREBASE_APP_ID
  2. For Supabase Auth and/or Supabase Database:

    • NEXT_PUBLIC_SUPABASE_URL
    • NEXT_PUBLIC_SUPABASE_ANON_KEY
  3. For Clerk Authentication:

    • NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
    • CLERK_SECRET_KEY
  4. For MongoDB Database:

    • MONGODB_URI
  5. For Email Integration (if selected):

    • EMAIL_SERVER_USER
    • EMAIL_SERVER_PASSWORD
    • EMAIL_SERVER_HOST
    • EMAIL_SERVER_PORT
    • EMAIL_FROM
  6. For Stripe Integration (if selected):

    • STRIPE_SECRET_KEY
    • NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
    • STRIPE_WEBHOOK_SECRET
    • NEXT_PUBLIC_STRIPE_STARTER_PLAN_PRICE_ID
    • NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE_ID

Make sure to obtain these credentials from your respective service providers and update the .env.local file accordingly.

Stripe Integration

If you choose to include Stripe integration, the setup will add the necessary configuration to handle subscription plans. You will need to:

  • Set up your Stripe account and obtain the API keys.
  • Update the components/Pricing.tsx to integrate with Stripe checkout for handling subscriptions.
  • Ensure that the environment variables related to Stripe are correctly set in your .env.local file.

Adding Shadcn/UI Components

To add Shadcn/UI components to your project, use the following command:

npx shadcn-ui@latest add <component-name>

Project Structure

The generated project follows the Next.js 14 App Router structure:

  • app/: Contains the main application code
  • components/: Reusable React components
  • lib/: Utility functions and configurations
  • public/: Static assets
  • styles/: Global styles and Tailwind CSS configuration

Customization

Feel free to modify the generated code to fit your specific needs. The boilerplate provides a solid foundation, but you may want to add additional features or modify existing ones.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

Support

If you encounter any problems or have any questions, please open an issue in the GitHub repository.

Acknowledgments