Coder Social home page Coder Social logo

inkasadev / frontend-architecture-basic-example Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 1.0 24 MB

Project created to be an example of what I consider a good frontend architecture for basic projects.

Home Page: https://frontend-architecture-basic-example.surge.sh/

License: MIT License

Shell 0.23% JavaScript 77.22% HTML 4.47% CSS 18.07%

frontend-architecture-basic-example's Introduction

Frontend Architecture Basic Example

This project was created to be an example of what I consider a good frontend architecture for basic projects.

example workflow example workflow codecov License: MIT

Summary

Technologies Used

Architecture and Directories

This project uses a folder structure based on the Atomic Design, by Brad Frost. I love this philosophy and find it’s a really useful way to think about components that make up our applications.

Project
├── .github
│   ├── workflows: Github Actions workflows
│   .husky: Husky Hooks config
│   .storybook: Storybook config
├── src
│   ├── api: Project mock api
│   ├── assets: Project assets
│   ├── components
|   |   ├── atoms:  Inspired by the naming in Atomic Design, I generally call my foundational components atoms. These are things like buttons, headings, text, and things that don’t stand up so well on their own,but are necessary for the success of the other elements in our application.
|   |   ├── patterns: These components are reusable UI patterns that are composed from the atom-level components.
|   |   ├── screens: These components represent our pages or screens in an application.
│   ├── App.js: Main application component.
│   ├── index.js: EntryPoint of application.
│   ├── Routes.js: Application routes.
│   ├── setupTests.js: Tests configuration
│   ├── theme.css:
|── .eslintrc: ESLint project configuration.
|── .gitignore: Specifies files to Git ignore
|── .prettierrc: Prettier project configuration.
|── jsconfig.json: JS config configuration.
├── package.json: File that manages all the dependecies and contains script definitions.

The Atoms, Patterns and Screens naming schema is also based on the Ryan Lanciaux works.

Local Configuration

After cloning the project, enter in the project root and run the following command:

$ npm run setup
  • By default the application will be started at port 3000.
  • You can also see the application in production clicking here.

Testing

Use the following command to run it:

$ npm run test:coverage
  • After the test finishes a folder called COVERAGE will be generated in the project root.
  • Open coverage/lcov-report/index.html file to check coverage visually.
  • You can also see the coverage report online clicking here.

Storybook Documentation

This project uses Storybook for component documentation, allowing you to check in details each component in the project. Run the following command to access it:

$ npm run sb:dev
  • By default the storybook will be started at port 6006.
  • You can also see the storybook documentation online clicking here.

Possible Improvements

A system is never perfect and there is always room for improvement. Here are some points that I would like to enhance if I had more time:

Authors

Phillipe Martins
Phillipe Martins

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

frontend-architecture-basic-example's People

Stargazers

codenet.dev avatar Alexandre de Lara Castro Junior avatar Renan Miguel avatar Philip Ramkeerat avatar Gabriel (gdpf) avatar Matheus Lima avatar  avatar Leandro de Jesus avatar Phillipe Martins avatar

Watchers

Phillipe Martins avatar  avatar

Forkers

t-bello7

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.