Git Product home page Git Product logo

react-boilerplate's Introduction

React Boilerplate

This React Boilerplate is structured to provide a clean and understandable framework for building scalable and maintainable React applications. It outlines a suggested folder structure that categorizes different aspects of a React application for better organization and efficiency.

Table of Contents

Folder Structure

Below is an outline of the folder structure that this boilerplate recommends:

project-name/
│
├── src/
│   ├── components/
│   │   ├── ui/
│   │   │   ├── Button.tsx
│   │   │   ├── TextInput.tsx
│   │   │   └── ...
│   │   └── ...
│   │
│   ├── hooks/
│   │   ├── useCustomHook1.ts
│   │   ├── useCustomHook2.ts
│   │   └── ...
│   │
│   ├── pages/
│   │   ├── Page1.tsx
│   │   ├── Page2.tsx
│   │   └── ...
│   │
│   ├── services/
│   │   ├── ApiService.ts
│   │   ├── ContextService.ts
│   │   └── ...
│   │
│   ├── utils/
│   │   ├── utilFunction1.ts
│   │   ├── utilFunction2.ts
│   │   └── ...
│   │
│   ├── App.tsx
│   └── index.tsx
│
└── README.md
  • /pages: This folder contains all the page components of your application. Each page component corresponds to a route.

  • /components: This folder contains all the components which are unique and may or may not utilise files from the components/ui directory.

  • /components/ui: This sub-folder inside the components directory houses reusable UI components like buttons, text inputs, and other UI elements.

  • /hooks: Custom React hooks used throughout the application are placed in this folder. This helps in reusing logic and maintaining clean code.

  • /services: Contains all services that the application consumes, such as API calls, context providers, and state management setups.

  • /utils: This folder includes utility functions and helpers that do not fall into the other categories but are still essential for the operation of the application.

Getting Started

To get a local copy up and running follow these simple steps.

git clone https://github.com/yourusername/react-boilerplate.git
cd react-boilerplate
npm install
npm run dev

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you would like to contribute to the project, please follow these steps:

  1. Fork the Project: Navigate to the repository on GitHub and click the "Fork" button at the top right corner.
  2. Create your Feature Branch: After forking, clone your fork to your local machine and create a branch for your new feature.
    git checkout -b feature/AmazingFeature
  3. Commit your Changes: Make the necessary changes or additions to the project and commit them. Try to write clear and concise commit messages. bash
git commit -m 'Add some AmazingFeature'
  1. Push to the Branch: Push your changes to your GitHub repository. bash
git push origin feature/AmazingFeature
  1. Open a Pull Request: Go back to the original repository and open a pull request from your feature branch to the main branch. Provide a description of your changes and how they improve the project.

Thank you for considering contributing to the project, and we look forward to your contributions!

License

Distributed under the MIT License.

react-boilerplate's People

Contributors

rahmatdeep avatar

Stargazers

Logesh avatar Freak Intruder avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.