DEV Community

Cover image for ๐Ÿš€ My Enterprise React Boilerplate โ€“ Built from Lessons Learned in Real Projects
hoangbui
hoangbui

Posted on

๐Ÿš€ My Enterprise React Boilerplate โ€“ Built from Lessons Learned in Real Projects

Hey devs ๐Ÿ‘‹,

If youโ€™ve ever kicked off a new React project for a big client or internal team, you know the drill:

  • Install dependencies
  • Set up Axios with interceptors
  • Configure Redux, React Query, routing, i18n, dark/light themesโ€ฆ
  • Spend a day fixing ESLint/Prettier configs
  • And then start writing actual features ๐Ÿ˜…

After doing this way too many times, I decided to bottle up all the boring setup into one boilerplate โ€” so I can jump straight into building features.

Here it is:
๐Ÿ”— GitHub Repo: Hoang21099/react-boilerplate


What You Get Out of the Box

  • โšก React 18 + TypeScript for type-safe, modern apps
  • ๐Ÿ›  Vite for blazing-fast dev & builds
  • ๐ŸŽจ Tailwind CSS + dark/light theme switch
  • ๐Ÿ” JWT-based authentication & role-based routes
  • ๐Ÿ“ฆ Redux Toolkit + RTK Query for state & API
  • ๐ŸŒ i18n with English & Vietnamese
  • ๐Ÿ›ก Error boundaries, protected routes, and graceful loading states

Why This Exists

When I was working on enterprise apps, the initial setup was always:

  1. Copy configs from an old project
  2. Update half the packages
  3. Break something because configs were outdated
  4. Spend hours debugging before writing real code

Now, I just git clone this repo and Iโ€™m ready to go in minutes.


Try It

git clone https://github.com/Hoang21099/react-boilerplate
cd react-boilerplate
yarn install
yarn dev
Enter fullscreen mode Exit fullscreen mode

Edit .env for your API base URL, and youโ€™re off to the races ๐Ÿš€.


Final Thoughts

I built this for myself, but if it saves you time, thatโ€™s even better.
If youโ€™ve got ideas to make it better โ€” drop an issue or PR.
And if you like it, a โญ on GitHub means a lot โค๏ธ.

Happy coding!
โ€“ Hoang

Top comments (1)

Collapse
 
koistya profile image
Konstantin Tarkus

Adding monorepo setup into the mix might be handy. See React Starter Kit as an example.