In this tutorial, I will guide you through the process of building and deploying a full-stack React JS app using a combination of React, Tailwind CSS, Drizzle ORM, and Clerk. This tutorial assumes you have a basic understanding of React JS and have Node.js and NPM installed on your system.
Step 1: Setting Up Your React App
First, we will create a new React app using Create React App. Open your terminal and run the following command:
npx create-react-app my-react-app
cd my-react-app
This will create a new React app in a folder called my-react-app.
Step 2: Installing Tailwind CSS
Tailwind CSS is a utility-first CSS framework that makes it easy to style your app without writing custom CSS. Install Tailwind CSS by running the following commands in your terminal:
npm install tailwindcss
npm install @craco/craco
Next, create a tailwind.config.js file in the root of your project with the following content:
module.exports = {
purge: [
'./src/**/*.{js,jsx,ts,tsx}',
'./public/index.html',
],
darkMode: false,
theme: {
extend: {},
},
variants: {},
plugins: [],
}
Update your package.json file to include the following scripts:
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
}
Finally, create a craco.config.js file in the root of your project with the following content:
module.exports = {
style: {
postcss: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
},
}
Step 3: Installing Drizzle ORM
Drizzle ORM is a popular library for managing data in React apps. Install Drizzle ORM by running the following command in your terminal:
npm install drizzle
Step 4: Installing Clerk
Clerk is a powerful authentication and user management solution for web applications. Install Clerk by running the following command in your terminal:
npm install @clerk/clerk-react @clerk/next @clerk/next-bridge
Step 5: Building Your App
Now that you have all the necessary dependencies installed, it’s time to start building your app. Replace the contents of App.js with the following code:
import React from 'react';
import {DrizzleProvider} from 'drizzle';
import {ClerkProvider, SignedIn, SignedOut} from '@clerk/clerk-react';
import drizzleOptions from './drizzleOptions';
import ClerkSettings from './ClerkSettings';
function App() {
return (
<DrizzleProvider options={drizzleOptions}>
<ClerkProvider frontendApi={ClerkSettings.frontendApi}>
<SignedIn>
<p>Welcome back!</p>
</SignedIn>
<SignedOut>
<p>Please sign in to continue.</p>
</SignedOut>
</ClerkProvider>
</DrizzleProvider>
);
}
export default App;
Step 6: Deploying Your App
To deploy your app, you can use a service like Vercel or Netlify. First, make sure you have installed the Vercel or Netlify CLI tools on your system.
For Vercel, run the following command in your terminal:
npm install -g vercel
vercel login
vercel --prod
For Netlify, run the following command in your terminal:
npm install -g netlify-cli
netlify login
netlify deploy --prod
Follow the prompts to deploy your app to the selected platform.
Congratulations! You have successfully built and deployed a full-stack React JS app using React, Tailwind CSS, Drizzle ORM, and Clerk. I hope this tutorial was helpful in getting you started with building production-ready web applications. Feel free to experiment with different features and libraries to further enhance your app. Happy coding!
im not able to use shadcn properly any solutions??
i have purchased the membership but the source code present there is also not complete, the delete car code is not there
1:52:10;I don't know what happened to checkbox ✅ it's not showing check icon after state=checked and also it's not square it's rectangular slightly…… 😢
Finally done
Thanks man
super super cool man. Thanks
I am not able to find logo.svg Can anyone help?
colBuilder.build is not a function. i am getting an error
Its shows error when i am try to add tailwind what can i do ?
Clerk production instance video
did you use redux in whole project??
sir how to add carDetails .json file
Hi TubeGuruji, I’m interested in purchasing your projects and would like your support in setting it up on my system. Could you please share your contact details? I'm happy to pay for your services. Looking forward to hearing from you!
iconfield not attch plz give it
Can you explain to me why do you use NPM instead of Yarn?
icons.jsx file is not provided in your assets thanks
You have made yourself a new subscriber
can you help me ? when I npm run db:push there is a error says "TypeError: colBuilder.build is not a function" how to solve this?
Use next auth please
After adding class name to flex in div nothing is changing can someone help
superbb guruji