Convert Figma logo to code with AI

pankod logosuperplate

A well-structured production-ready frontend boilerplate with Typescript, React Testing Library, styled-component, React Query, .env, Axios, Bundle Analyzer, Prettier and 30+ plugins. superplate creates projects for React.js, Next.js, and refine. https://pankod.github.io/superplate/

2,806
145
2,806
28

Top Related Projects

124,777

The React Framework

Set up a modern web app by running one command.

67,112

Next generation frontend tooling. It's fast!

18,419

web development, streamlined

17,089

The App Framework for Startups

13,599

⚡️ The Missing Fullstack Toolkit for Next.js

Quick Overview

Superplate is a powerful CLI tool for creating web applications with various modern frameworks and tools. It offers a wide range of customizable templates and plugins, allowing developers to quickly set up projects with their preferred tech stack and configurations.

Pros

  • Extensive selection of frameworks and tools, including React, Next.js, Vue, and more
  • Highly customizable project setup with numerous plugins and configurations
  • Time-saving boilerplate generation for rapid project initialization
  • Active community and regular updates to keep up with the latest trends

Cons

  • Learning curve for new users due to the wide range of options
  • Some generated projects may include unnecessary dependencies or configurations
  • Limited control over the exact structure of the generated project compared to manual setup

Getting Started

To use Superplate, follow these steps:

  1. Install Superplate globally:

    npm install -g superplate-cli
    
  2. Create a new project:

    superplate my-app
    
  3. Follow the interactive prompts to select your desired framework, plugins, and configurations.

  4. Once the project is generated, navigate to the project directory and start development:

    cd my-app
    npm run dev
    

Competitor Comparisons

124,777

The React Framework

Pros of Next.js

  • More mature and widely adopted framework with extensive documentation
  • Better performance optimization out of the box
  • Larger ecosystem and community support

Cons of Next.js

  • Steeper learning curve for beginners
  • Less flexibility in project structure and configuration
  • Limited built-in support for state management and UI libraries

Code Comparison

Next.js:

import { useRouter } from 'next/router'

function ActiveLink({ children, href }) {
  const router = useRouter()
  const style = {
    color: router.asPath === href ? 'red' : 'black',
  }

  return (
    <a href={href} style={style}>
      {children}
    </a>
  )
}

Superplate:

import { Link } from '@components'

const ActiveLink = ({ children, href }) => {
  return (
    <Link href={href} activeClassName="active">
      {children}
    </Link>
  )
}

Superplate provides a more abstracted approach with built-in components, while Next.js offers more granular control over routing and styling. Superplate aims to simplify development by including pre-configured tools and libraries, whereas Next.js focuses on providing a flexible foundation for building React applications with server-side rendering capabilities.

Set up a modern web app by running one command.

Pros of Create React App

  • Widely adopted and well-maintained by Facebook
  • Extensive documentation and community support
  • Simpler setup process with fewer configuration options

Cons of Create React App

  • Limited customization options out of the box
  • Slower build times for larger projects
  • Lack of built-in support for server-side rendering

Code Comparison

Create React App:

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

ReactDOM.render(<App />, document.getElementById('root'));

Superplate:

import React from 'react';
import { AppProps } from 'next/app';
import '@styles/global.css';

function MyApp({ Component, pageProps }: AppProps): JSX.Element {
  return <Component {...pageProps} />;
}

export default MyApp;

Superplate offers more flexibility in project setup, allowing developers to choose from various frameworks and tools during initialization. It supports Next.js, which enables server-side rendering out of the box. Create React App, on the other hand, provides a more streamlined and opinionated setup focused solely on React applications.

While Create React App is ideal for beginners and quick prototyping, Superplate caters to developers who need more customization options and advanced features from the start. The choice between the two depends on project requirements and developer preferences.

67,112

Next generation frontend tooling. It's fast!

Pros of Vite

  • Faster build times and hot module replacement
  • Leaner, more focused tooling with less configuration
  • Better support for ES modules and modern JavaScript features

Cons of Vite

  • Less opinionated, requiring more manual setup for complex projects
  • Smaller ecosystem of plugins and integrations compared to Webpack-based solutions
  • May require additional configuration for older browsers or legacy code

Code Comparison

Vite configuration:

// vite.config.js
export default {
  plugins: [],
  build: {
    target: 'esnext'
  }
}

Superplate configuration:

// next.config.js
module.exports = {
  webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
    // Custom webpack config
    return config
  }
}

Vite focuses on simplicity and speed, with minimal configuration required. Superplate, built on Next.js, offers more built-in features and a more opinionated structure, but may require more complex configuration for advanced use cases.

Both tools aim to improve developer experience, but Vite emphasizes raw performance and modern web standards, while Superplate provides a more comprehensive out-of-the-box solution for React applications.

18,419

web development, streamlined

Pros of SvelteKit

  • Specifically designed for Svelte, offering deep integration and optimized performance
  • Built-in routing system with file-based routing for easier navigation setup
  • Server-side rendering (SSR) and static site generation (SSG) out of the box

Cons of SvelteKit

  • Limited to Svelte framework, while superplate supports multiple frameworks
  • Steeper learning curve for developers new to Svelte ecosystem
  • Less flexibility in project structure compared to superplate's customizable templates

Code Comparison

SvelteKit (routes/+page.svelte):

<script>
  export let data;
</script>

<h1>{data.title}</h1>
<p>{data.content}</p>

superplate (pages/index.js with Next.js):

import { useEffect, useState } from 'react';

export default function Home() {
  const [data, setData] = useState({});
  useEffect(() => {
    // Fetch data here
  }, []);
  return (
    <>
      <h1>{data.title}</h1>
      <p>{data.content}</p>
    </>
  );
}

Both repositories aim to simplify web application development, but they cater to different needs. SvelteKit focuses on providing a comprehensive solution for Svelte applications, while superplate offers a more flexible approach supporting multiple frameworks and customizable project setups.

17,089

The App Framework for Startups

Pros of Redwood

  • Full-stack framework with integrated backend and frontend
  • Built-in authentication and authorization
  • Opinionated structure for faster development and consistency

Cons of Redwood

  • Steeper learning curve due to its comprehensive nature
  • Less flexibility in choosing individual technologies
  • Relatively newer framework with a smaller community

Code Comparison

Redwood (Route definition):

<Route path="/posts/{id:Int}" page={PostPage} name="post" />

Superplate (Route definition with React Router):

<Route path="/posts/:id" element={<PostPage />} />

Key Differences

  • Redwood is a full-stack framework, while Superplate is primarily a frontend boilerplate generator
  • Redwood uses Prisma for database access, whereas Superplate doesn't include backend functionality
  • Superplate offers more flexibility in choosing technologies, while Redwood provides a more opinionated structure

Use Cases

  • Choose Redwood for rapid full-stack application development with a consistent structure
  • Opt for Superplate when you need a customizable frontend setup or want to use a separate backend technology
13,599

⚡️ The Missing Fullstack Toolkit for Next.js

Pros of Blitz

  • Full-stack framework with built-in authentication, database integration, and API layer
  • Zero-API approach simplifies development by eliminating the need for separate API endpoints
  • Strong focus on developer productivity with conventions and best practices baked in

Cons of Blitz

  • Steeper learning curve due to its opinionated nature and full-stack approach
  • Less flexibility in choosing individual components or technologies compared to Superplate
  • Relatively newer project with a smaller community and ecosystem

Code Comparison

Blitz:

import { useQuery } from "blitz"
import getTodos from "app/todos/queries/getTodos"

function TodoList() {
  const [todos] = useQuery(getTodos)
  return <ul>{todos.map(todo => <li key={todo.id}>{todo.title}</li>)}</ul>
}

Superplate:

import { useQuery } from "react-query"
import { getTodos } from "../api/todos"

function TodoList() {
  const { data: todos } = useQuery("todos", getTodos)
  return <ul>{todos?.map(todo => <li key={todo.id}>{todo.title}</li>)}</ul>
}

The code comparison shows how Blitz integrates queries directly into the framework, while Superplate uses external libraries like react-query for data fetching. Blitz's approach results in slightly more concise code and tighter integration with the framework's features.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

superplate example


A well-structured production-ready frontend boilerplate with Typescript, React Testing Library, styled-component, React Query, .env, Axios, Bundle Analyzer, Prettier and 30+ plugins.
superplate creates ready-to-develop projects for React and Next.js and refine.

Meercode CI Score Meercode CI Success Rate Maintainability npm version npm

Created by Pankod

About

superplate lets you start rock-solid, production-ready React, Next.JS and refine projects just in seconds. The command-line interface guides the user through setup and no additional build configurations are required.

Superplate ships with +30 plugins including popular UI Kits, testing frameworks and many useful developer tools.

Quick Start

To use superplate, make sure you have npx is installed on your system (npx is shipped by default since npm 5.2.0).

To create a new app without using presets, run the following command:

npx superplate-cli my-project

You will be prompted with plugin options to create your project. A full list of avaiable plugins is here: superplate-core-plugins.

Available Integrations

Next.js


superplate makes it easier to get up and running with a well-structured Next.js and TypeScript application.

To get started quickly, please run the following command. The CLI wizard will assist you for the rest of the setup process:

npx superplate-cli -p nextjs my-project

React.js


superplate makes it easier to get up and running with a well-structured Create React App and TypeScript application.

To get started quickly, please run the following command. The CLI wizard will assist you for the rest of the setup process:

npx superplate-cli -p react my-project

refine ⚡

refine is an open source React framework for building CRUD apps rapidly.

superplate provides built-in templates for CRA, Next.js and Remix environments so you can bootstrap a refine project in a couple of minutes.

Refer to refine repository for more information ➡️


how-works-refine

To get started quickly, please run the following command. The CLI wizard will assist you for the rest of the setup process:

npx superplate-cli -p refine my-project

Coming Soon

We are planning to add the following frameworks integrations soon.


Documentation

For more detailed information and usage, you may refer to our documentation pages.

Philosophy

  • It provides an easy starting to your project by leveraging industry-standard best practices and and performance oriented tools.
  • Fully extensible due its plugin based architechture.
  • Code examples are added to plugin documents to show how best practices are implemented.

Plugins

superplate uses a plugin-based architecture. Basically, plugins are created from popular npm tools with configuration files. You can check them out in superplate-core-plugins.

The default core plugins determined by Pankod team. Feel free to send PR or open an issue for new plugins you want to add.

Using a custom source of plugins

You can use different sources for plugins other than superplate-core-plugins.

Simply add --source <path-to-source> option to use superplate with a custom source.

To learn more about sources and how to create your own; please check out documentation

Creating a plugin

superplate gives you many abilities to create your own plugin and interact with the others. To learn more on creating a plugin, please check out documentation

Available plugins

CLI options

> npx superplate-cli --help
Usage: superplate [options]

Options:
 -v, --version                   prints version number
 -h, --help                      prints help information on all commands and options
 -d, --debug                     prints additional logs
 -s, --source <path-to-source>   Use this option to target a custom source of plugins
                                 Source path can be a remote git repository or a local path.
 -p, --project <project-type>    In sources with multiple types, you can use this option to preset the type.
 -b, --branch <branch-name>      If your source is a git repository, you can define a custom branch for `superplate` to use.
 -o, --preset <preset-name>      If your source includes presets, you can select one of them to prefill the answers.
 -l, --lucky                     You can select random choices with this option, if you are feeling lucky.

Development mode commands

Watches for changes in the code; builds the project and then globally installs superplate for testing.

npm run dev:global

Create a build inside /lib directory.

npm run build:cli

Install the current build globally:

npm run global

Contribution

If you have a bug to report, do not hesitate to file an issue.

If you are willing to fix an issue or propose a feature; all PRs with clear explanations are welcome and encouraged.

License

Licensed under the MIT License, Copyright © 2021-present Pankod