npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rubemfsv/clean-react-app

v1.1.4

Published

Clean React App

Downloads

3

Readme

PRs Welcome Open Source Node Version React Version

Create React apps using Clean Architecture with no build configuration.

  • User Guide – How to develop apps bootstrapped with Clean React App.

Clean React App works on macOS, Windows, and Linux. If something doesn’t work, please file an issue.

Quick Overview

npx @rubemfsv/clean-react-app my-app
cd my-app
npm start or npm run dev

This boilerplate contains the following settings:

  • Local storage adapter;
  • Axios as HTTP Client;
  • Webpack configured for development and production environments;
  • Basic end-to-end test settings with Cypress;
  • Unit tests with Jest;
  • Husky with pre-push to run unit tests;
  • Authentication with validations;
  • Validation layer for reuse of validations;
  • Some hooks to help with API calls and form submissions;
  • Private route configured;
  • Three pages to help improve productivity:
    • Login page
    • Sign up page
    • Dashboard

:construction_worker: Installation

You must first have installed NodeJS (I recommend nvm to deal with versions), Yarn, and then:

git clone https://github.com/rubemfsv/clean-react-app.git

Step 1:

cd clean-react-app - access the project files

Step 2:

yarn (or npm install) - to install dependencies

Step 3:

Change your webpack.dev.js and webpack.prod.js env url to your real urls

Step 4:

yarn dev (or npm run dev) - to initialize the project under development

Observations:

yarn test (or npm run test) - to run jest unit testing

yarn test:e2e (or npm run test:e2e) - to run cypress e2e testing (if you use linux or windows, the command may change because of the , but you can change the script or run it by node_modules/.bin/cypress open)

yarn start (or npm start) - to initialize the project under production webpack;

In the package.json file, there are scripts that you can run with node and yarn

:open_file_folder: Architecture

The architecture used in this project was the Clean Architecture, using the concepts proposed by Roberto Martin. To know how to implement this architecture, there is an article applying this Architecture with React that describes very well the thought line.

cypress/
src/
  data/
    protocols/
    test/
    usecases/
  domain/
    errors/
    models/
    test/
    usecases/
  infra/
    cache/
    http/
    test/
  main/
    adapters/
    config/
    decorators/
    factories/
      cache/
      decorators/
      http/
      pages/
      usecases/
    routes/
    scripts/
    index.tsx
  presentation/
    assets/
      fonts/
      images/
    components/
    hooks/
    pages/
    protocols/
    routes/
    styles/
    test/
  validation/
    errors/
    protocols/
    test/
    validators/

🖥️ Login page

It's a simple login page with a form and error handling. It already has input, button, field and loader components.

Login page

🖥️ Sign up page

It is a registration page with a form that receives the username, email, password and password confirmation. It already has error handling and reused components.

Sign up page

🖥️ Dashboard page

It is an empty page that is redirected after successful login. It's there to help with development, saving time by being the starting point.

Dashboard page

:bug: Issues

If something doesn’t work, please file an issue.

📜 Code of Conduct

We are committed to providing a welcoming and safe environment in our community. All contributors, maintainers, and everyone participating in this project are expected to adhere to our Code of Conduct. Please read the full text so that you can understand what actions will and will not be tolerated.

:bookmark_tabs: Branches and contributions

As this project is intended to be open source and free for everyone to use, feel free to contribute improvements.

If something can be improved, just create a branch from main and make a Pull Request with the suggestions.

Contributors

Meet the talented individuals who have contributed to Clean React App project:

License

Clean React App is available under MIT. See LICENSE for more details.