Welcome to ReactKit, your go-to solution for rapid development with React. ReactKit offers a comprehensive set of abstract building blocks, a rich library of beautiful components, a minimalistic color system, and flexible dark and light themes to empower your projects. With ReactKit, you have complete control over your code, making it a versatile choice for your next venture. Plus, it's set up as a monorepo, allowing you to effortlessly add new apps and packages as your project evolves.
Check out our live showcase at reactkit.radzion.com and explore our YouTube channelfor in-depth tutorials and insights into ReactKit's implementation.
-
Use ReactKit as a Template: Begin by clicking the "Use this template" button on GitHub. This action will create a new monorepo with Yarn workspaces, giving you a solid foundation for your project.
-
Choose a Starter:
-
Use the app Folder: If you want to start with a fully functional Next.js app, check out the
app
folder. It powers reactkit.radzion.com and showcases all the available components. To maintain the showcase, you can duplicate theapp
folder and rename it todemo
. -
Create a New Next.js App: Alternatively, you can create a fresh Next.js app by following the instructions in the following section.
-
Create a new NextJS app by following these instructions.
-
Customize Your Project: Search for all instances of
reactkit
&ReactKit
in your codebase and replace them with your project's name. This step ensures that your project is uniquely yours. -
Run your app: Run
yarn
in the root of the monorepo to install all dependencies. Then, go to the app folder and runyarn dev
to start your app.
- Copy the
ui
folder from ReactKit's monorepo to your project. - Copy the
utils
folder from ReactKit's monorepo to your project. - Replace all instances of
reactkit
in your codebase with your project's name.
- Copy the code from the
ui
folder in ReactKit's monorepo to your project. - Copy the code from the
utils
folder in ReactKit's monorepo to your project. - Replace all instances of
@reactkit/utils
with the path to yourutils
folder within your project.
- Create a project
npx create-next-app@latest app
-
Update name in package.json, e.g.
@reactkit/app
-
Update next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
compiler: {
styledComponents: true,
},
output: 'export',
transpilePackages: ['@reactkit/ui'],
}
// eslint-disable-next-line no-undef
module.exports = nextConfig
- Install dependencies
yarn add styled-components@^5.3.5 next-sitemap
yarn add --dev @types/styled-components@^5.1.25
- Add
baseUrl
for absolute import to `tsconfig.json``
{
"compilerOptions": {
"baseUrl": "."
}
}
-
Copy state folder from ReactKit's
app
to your project. -
Copy ui folder from ReactKit's
app
to your project. -
Copy _document.tsx file from ReactKit's
app
to your project. -
Update your App at
pages/_app.tsx
withThemeProvider
andGlobalStyle
import type { AppProps } from 'next/app'
import { GlobalStyle } from '@reactkit/ui/css/GlobalStyle'
import { ThemeProvider } from 'themeProvider'
import { Inter } from 'next/font/google'
const inter = Inter({
subsets: ['latin'],
weight: ['400', '500', '600', '800'],
})
function MyApp({ Component, pageProps }: AppProps) {
return (
<ThemeProvider>
<GlobalStyle fontFamily={inter.style.fontFamily} />
<Component {...pageProps} />
</ThemeProvider>
)
}
export default MyApp
- Update
.eslintrc.json
{
"extends": ["plugin:@next/next/recommended"]
}
- Update
next-sitemap.config.js
with yoursiteUrl
:
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: '{YOUR_SITE_URL}}',
generateRobotsTxt: true,
generateIndexSitemap: false,
outDir: './out',
}
- Update Yarn
yarn set version stable
-
Create a new project and add
package.json
file - source -
Add
tsconfig.json
file - source -
Add
.prettierrc
file - source -
(optional) Add
.prettierignore
file - source -
Add
.gitignore
file - source -
Add
.eslintrc
file - source -
Initialize Git:
git init
- Setup Husky:
npx husky-init