-
Initialize the Project: � �
bash � �npx create-react-app frontend --template typescript � �cd frontend � �
-
Install Necessary Dependencies: � �
bash � �npm install axios react-router-dom @reduxjs/toolkit react-redux � �npm install -D tailwindcss postcss autoprefixer � �npx tailwindcss init -p � �
-
Configure Tailwind CSS: � �- Update
tailwind.config.js
: � �javascript � �module.exports = { � � �purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'], � � �darkMode: 'class', // Enable dark mode � � �theme: { � � � �extend: {}, � � �}, � � �variants: { � � � �extend: {}, � � �}, � � �plugins: [], � �}; � �
� �- Update src/index.css
:
� �css � �@tailwind base; � �@tailwind components; � �@tailwind utilities; � �
- Set Up Routing:
� �- Update
src/App.tsx
to include your routes.
-
Initialize the Project: � �
bash � �mkdir backend � �cd backend � �npm init -y � �
-
Install Necessary Dependencies: � �
bash � �npm install express cors dotenv pg sequelize � �npm install -D typescript ts-node @types/express @types/node nodemon � �
-
Configure TypeScript: � �
bash � �npx tsc --init � �
-
Set Up Basic Server: � �- Create
src/index.ts
and set up your Express server. -
Run the Server: � �
bash � �npm run dev � �
- Database Setup: Ensure you have PostgreSQL installed and create a database for your application.
- Environment Variables: Create a
.env
file in the backend directory to store sensitive information like database credentials and JWT secrets.
-
Start the Backend: � �
bash � �cd backend � �npm run dev � �
-
Start the Frontend: � �
bash � �cd frontend � �npm start � �
-
Access the Application: � �- Frontend: http://localhost:3000 � �- Backend: http://localhost:5000