A Minimal Setup & Fast Boilerplate for React.js with Vite.

Overview

A Minimal Setup & Fast Boilerplate for React.js with Vite

Features

πŸš€ Dynamic Pages Routing with react-router-dom from React.js
πŸš€ Fast development with Vite
πŸš€ SSR support with Vite
πŸš€ PWA support with Vite
πŸš€ SSG support with Vite


Installation

create-reactplate-app

npx create-reactplate-app blog-starter

cd blog-starter

npm install

# run server (development mode)
npm run dev
# run server (production mode)
npm run serve
# run debugger
npm run debug

# build the client side & the server side project
npm run build

# build the client side project
npm run build:client

# build the server side project
npm run build:server

# static site generate
npm run generate

Development

For further development and contributions, please follow the installation instructions below.

git clone https://github.com/fauzan121002/reactplate.git

# Reactplate CRA cli scope
cd reactplate

#----------------------------------

# Reactplate app scope
cd reactplate/examples

npm install

# run server (development mode)
npm run dev
# run server (production mode)
npm run serve
# run debugger
npm run debug

# build the client side & the server side project
npm run build

# build the client side project
npm run build:client

# build the server side project
npm run build:server

# static site generate
npm run generate

Built-in Configuration

Import Aliases

  • @ equals to _ROOT_/src
  • # equals to _ROOT_/src/components
  • % equals to _ROOT_/src/assets

ESBuild

ESBuild already injects import React from 'react'; for any .jsx files so you don't need to import it again.

Dynamic Pages Routing

Reactplate Dynamic Pages Routing folder structure works like Next.js.

pages
β”‚   Home.jsx
β”‚   About.jsx
β”‚
└───Rank
β”‚   β”‚   [rank].jsx
β”‚   └───subfolder1
β”‚       β”‚   [others].jsx
β”‚       β”‚   ...

Using the params example

// Rank/[rank].jsx
import { useParams } from "react-router-dom";

export default function rank() {
  const { rank } = useParams();
  return <div>Reactplate will be number {rank}</div>;
}

Note : Index page will refer to Home.jsx

URL Convertion

Reactplate will convert any jsx files filename with PascalCase or camelCase to kebab-case.

Example :

pages
β”‚   Home.jsx
β”‚   AboutMe.jsx
β”‚
└───myRank
β”‚   β”‚   [rank].jsx
β”‚   └───subfolder1
β”‚       β”‚   [others].jsx
β”‚       β”‚   ...

will be converted to :

/home
/about-me
/my-rank/:rank
/my-rank/:rank/subfolder1/:others
...

License

Reactplate using the MIT License

Credits

Credits to React.js and Vite teams for their awesome open source and resources!

You might also like...

boilerplate for react-firebase app

Goal of the project Everytime there is an idea about web app side project, significant amount time is spent on building boilerplate code. Especially g

Dec 8, 2022

React/Express/Webpack Boilerplate

React Boilerplate The following repo contains a very basic setup git clone https://github.com/asieke/React-Express-Boilerplate.git cd React-Express-Bo

Dec 30, 2022

Boilerplate to get started building React-based interfaces for Crestron using CH5

Getting Started with Crestron UI This project was bootstrapped with Create React App. Example component communicating with the Crestron-CH5 library: i

Apr 25, 2022

A boilerplate for kickstarting my projects with Django backend and React front-end

Django-React-Boilerplate This is a boilerplate for kickstarting my projects with Django backend and React front-end. (AND, PostgreSQL) as the database

Apr 14, 2022

This project is a React Native Boilerplate that can be used to kickstart a mobile app.

Meta Point People: Mounir Dhahri This is an Artsy OSS project. Don't know what Artsy is? Check out this overview and more, or read our objc.io on team

Jul 6, 2022

Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.

Recoil Β· Recoil is an experimental set of utilities for state management with React. Please see the website: https://recoiljs.org Installation The Rec

Jan 8, 2023

Build blazing fast, modern apps and websites with React

Gatsby v3 βš›οΈ πŸ“„ πŸš€ Fast in every way that matters Gatsby is a free and open source framework based on React that helps developers build blazing fast w

Jan 9, 2023

βš›οΈ Hooks for building fast and extendable tables and datagrids for React

βš›οΈ Hooks for building fast and extendable tables and datagrids for React

Hooks for building lightweight, fast and extendable datagrids for React Enjoy this library? Try them all! React Query, React Form, React Charts Visit

Jan 3, 2023

Tweak React components in real time. (Deprecated: use Fast Refresh instead.)

React Hot Loader Tweak React components in real time βš›οΈ ⚑️ Watch Dan Abramov's talk on Hot Reloading with Time Travel. Moving towards next step React-

Jan 1, 2023
Comments
  • Configure Eslint and Prettier with Pre Commit Hook.

    Configure Eslint and Prettier with Pre Commit Hook.

    I think this will work correctly, test it and let me know if it works as expected or not. Note: you can custom your Eslint and Prettier Rules as you want by modifying configuration files.

    Closes #9

    Description

    Configure Eslint and Prettier with Pre Commit Hook to fix and format files recursively.

    Tasks

    • [x] Configure eslint
    • [x] Configure prettier
    • [x] Add pre commit hook with husky
    opened by YoussefMahmod 1
  • Configure Eslint and Prettier with Pre Commit Hook

    Configure Eslint and Prettier with Pre Commit Hook

    Description

    Configure Eslint and Prettier with Pre Commit Hook to fix and format files recursively.

    Tasks

    • [x] Configure eslint
    • [x] Configure prettier
    • [x] Add pre commit hook with husky
    documentation enhancement good first issue 
    opened by fzn0x 0
  • Typescript support

    Typescript support

    This is a great alternative to CRA; will you be adding Typescript support (please):

    CRA supports it like this :

    npx create-react-app my-app --template typescript
    
    enhancement help wanted good first issue 
    opened by johnoscott 1
Releases(0.0.3)
Owner
Muhammad Fauzan
18y.o software developer, Fn or F Lock provide two sets of commands for many keys. Meanwhile fncolon provides many good open sources for many developers.
Muhammad Fauzan
React-electron - dagimsolomon: minimalstic setup of Reactjs with electron

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 2 Jan 23, 2022
Setup all the linters you like for your react app in 1 minute πŸš€

Create React Linters ?? Setup all the linters you like and don't let ?? slip into your code base! Eslint | Stylelint | Commitlint | Prettier | EditorC

Mo'men Sherif 19 Nov 18, 2022
React Starter Kit β€” isomorphic web app boilerplate (Node.js, Express, GraphQL, React.js, Babel, PostCSS, Webpack, Browsersync)

React Starter Kit β€” "isomorphic" web app boilerplate React Starter Kit is an opinionated boilerplate for web development built on top of Node.js, Expr

Kriasoft 21.7k Dec 30, 2022
Turborepo with Tailwind CSS setup for shared ui components.

Turborepo starter This is an official Yarn v1 starter turborepo. What's inside? This turborepo uses Yarn as a package manager. It includes the followi

George Carl 46 Jan 2, 2023
Agile Planning tool for cool team, free, no setup, just come and play.

Voting Poker is an Agile Planning Tool for cool teams We're looking to create a fully customizable Zero config Pretty design tool for teams in demand.

Jefferson Moura 10 Dec 12, 2022
Webpack is an open-source JavaScript module bundler. This includes basic setup files to help me not redo all the setups for webpack when starting a new project.

Webpack Setup Webpack is an open-source JavaScript module bundler. It is made primarily for JavaScript, but it can transform front-end assets such as

Nemwel Boniface 14 Jun 23, 2022
React.js Responsive Minimal Carousel

React Carousel Minimal Easy to use, responsive and customizable carousel component for React Projects. Installation npm i react-carousel-minimal Demo

Sahil Saha 82 Dec 23, 2022
React + Redux starter kit / boilerplate with Babel, hot reloading, testing, linting and a working example app built in

A comprehensive starter kit for rapid application development using React. Why Slingshot? One command to get started - Type npm start to start develop

Cory House 9.8k Dec 22, 2022
Boilerplate to build Cross-Platform Apps with Expo and React Native

Expo and React Native Boilerplate Boilerplate to build Cross-Platform Apps with Expo and React Native What are you going to find in this boilerplate E

JosΓ© Ferrer 26 Apr 29, 2022
Boilerplate for Truffle, Web3.js, React, Redux Toolkit

Truffle, React, Redux Toolkit, Web3.js boilerplate What it's for Currently, it's a nightmare and takes forever trying to get React working with Truffl

Adrian Delgado Ξ 29 Jun 9, 2022