GithubHelp home page GithubHelp logo

yuriuliam / react-vite-app-template Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.42 MB

A (WIP) template by me for general-purpose scalable React apps using Clean Architecture and Vite. (there's more!)

Home Page: https://yuriuliam.github.io/react-vite-app-template/

TypeScript 92.00% HTML 0.23% MDX 7.76%
clean-architecture pnpm react reactjs storybook template-project typescript vite vite-template vite-template-react vitejs vitest

react-vite-app-template's Introduction

React Vite Template

What's this?

This is a React Application Base/Template for big and scalable projects.

Considered a POC, the goal of this repo is to prove you can implement a distinguished clean architecture to solve real word cases with abstraction and isolation-per-concept.

Main Features

  • Modular Clean Code architecture to give full support for scalability;
  • Common-case structures for caching, logging, validation and communicate with external services via HTTP;

External Modules

  • Asynchronous State Management w/ React Query
  • Built-in React components, HOCs, hooks and other utilities
  • Built-in logger w/ Debug (Lib) + Chalk
  • Built-in toast system
  • Built-in validators
  • Chart components w/ Apex Charts
  • Components and Design System Basis w/ Radix Primitives + Radix Theme
  • Custom CSS-in-JS Styles w/ Styled Components + Polished
  • Dev runtime, build and preview w/ Vite
  • Decentralized Global State w/ Jotai
  • Documentation and Design Workshop w/ Storybook
  • Linting + Code Styling w/ ESLint (with plugins) + Prettier
  • Rich Text Editor w/ Lexical
  • Tests w/ Vitest + Testing Library + JSDom

Architecture

The Code-style has a functional approach, mostly inspired by Elixir and Lisp. It is based on a Modular Architecture enhanced with Clean Code, splitting each responsibility into a new folder or file.

There are a few ones:

Folder Path Description
src/@types Typing overrides and domain interfaces, globally available without imports.
src/config Shared's configuration.
src/containers All React Pages and Sections.
src/data The Data Access Library
src/infra The foundations of the logic. It holds the entire logic to let it flow better with the App.
src/modules An isolated part of the architecture to implement the most abstract concepts.
src/shared Shared utilities, consumed by the entirety of the App without restrictions.
src/main.tsx The entrypoint of the App.
__tests__ All the tests related to the App.

How to start it?

  1. Ensure you have those dependencies installed:
    1. NodeJS ^20.11.1
    2. PNPM ^8.14.1
  2. Run pnpm install
  3. Make a copy of .env and name it .env.local
  4. Run pnpm dev to start de Application locally.

Credits

Yuri Uliam - Author & Maintainer


react-vite-app-template's People

Contributors

yuriuliam 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.