Welcome to the StartOut React project. This project is set up with a comprehensive configuration including Prettier, ESLint, Tailwind CSS, and a sample folder structure to get you started quickly.
Here is an overview of the folder structure in this project:
.
├─ public
│ └─ favicon.ico
├─ src
│ ├─ assets
│ ├─ components
│ │ ├─ footer
│ │ │ └─ footer.jsx
│ │ ├─ header
│ │ │ └─ header.jsx
│ ├─ pages
│ │ ├─ landing
│ │ │ └─ landing.jsx
│ │ ├─ error404
│ │ │ └─ error404.jsx
│ ├─ redux
│ ├─ exports.js
│ ├─ App.js
│ ├─ index.js
│ └─ index.css
├─ .env
├─ .eslintrc.json
├─ .gitignore
├─ .prettierignore
├─ .prettierrc
├─ package.json
├─ postcss.config.cjs
├─ tailwind.config.js
└─ README.md
header.jsx
).footer.jsx
).landing.jsx
).error404.jsx
).First, clone the repository and install the dependencies:
git clone https://github.com/yourusername/startout-react-app.git
cd startout-react-app
npm install
This script automates the setup of a new React project, optionally including TypeScript. It installs necessary dependencies, configures Prettier and ESLint, adds useful scripts to package.json
, and sets up Tailwind CSS. It also organizes the project structure by creating directories and files for components, assets, and pages.
package.json
.Make the script executable: chmod +x setup_react.sh
Execute the script: ./setup_react.sh
The script uses the following environment variables to customize the project setup (more will be added in the future):
MODULE_REACT_APP_NAME
: Sets the application name (default: startout-react-app
).MODULE_REACT_USE_TYPESCRIPT
: Enables TypeScript if set to true (default: false).To start the development server: npm start
This will run your app in development mode. Open http://localhost:3000
to view it in the browser.
To build the app for production:npm run build
This will create an optimized build of the app in the build
folder.
To check for code quality issues: npm run lint
To format the code: npm run format
This project comes with a set of predefined configurations for ESLint, Prettier, and Tailwind CSS. You can customize these configurations by editing their respective files:
.eslintrc.json
.prettierrc
tailwind.config.js
postcss.config.cjs
src/pages
directory. Follow the existing structure for consistency.src/components
directory.