Quick development project structure Vite:React-Tailwind CSS-React Router.
This project provides a simple and modular structure for quick development. It is designed to help developers get started quickly without spending much time setting up the basic project structure.
Here's an overview of the project directory:
├── src/
│ ├── assets/ # Assets like images, fonts, videos
│ │ ├── fonts/
│ │ ├── image/
│ │ └── videos/
│ ├── components/ # Reusable UI components
│ │ └── index.js
│ ├── context/ # Context API related logic
│ ├── pages/ # Main pages (e.g., HomePage.jsx)
│ │ └── index.js
│ ├── router/ # Routing logic
│ │ └── index.jsx
│ ├── services/ # API calls or external service integrations
│ ├── styles/ # Global styles and font styles
│ │ ├── fonts/ # Custom fonts
│ │ │ └── _fonts.css
│ │ └── global.css # Global styling
│ ├── utils/ # Utility functions and helper files
│ │ ├── functions.util.jsx
│ │ └── icons.util.jsx
│ ├── App.jsx # Main application file
│ ├── main.jsx # Entry point of the application
├── .gitignore # Files and directories to ignore in Git
├── eslint.config.js # ESLint configuration for linting
├── index.html # Main HTML file
├── package.json # Project metadata and dependencies
├── tailwind.config.js # TailwindCSS configuration
├── vite.config.js # Vite configuration for bundling
└── README.md # Project documentation
-
src/assets/
: Contains static resources such as fonts, images, and videos.fonts/
: Font files used in the project.images/
: Image assets.videos/
: Video files.
-
src/components/
: Contains reusable components like buttons, headers, or cards. -
src/context/
: Manages the application’s state using the Context API. -
src/pages/
: Contains high-level components (pages) likeHome.js
,About.js
. -
src/router/
: Contains routing logic for the app, managing different routes/pages. -
src/services/
: Handles API calls or any external service integrations. -
src/styles/
: Contains global styles and fonts.fonts/
: Custom fonts styling.global.css
: Contains general/global CSS for the project.
-
src/utils/
: Helper functions and utility files that assist in various parts of the project. -
App.jsx
: Main app component that serves as the entry point for the component tree. -
main.jsx
: Starting point of the React application, typically where the app gets rendered to the DOM.
To get started, clone the repository and install the dependencies.
git clone https://github.com/3mohamed-abdelfattah/ReactProjectStructure.git
cd ReactProjectStructure
npm install
Start the development server with the following command:
npm run dev
This will start the application and allow you to view it in your browser http://localhost:5173/.
To build the project for production:
npm run build
This will create an optimized production build of the project.