Open mpetrunic opened 2 years ago
Personally don't like the idea of having MUI skin as a component library.
About CSS, we tried (@irubido and me) to use the BEM bus is more confusing but dint does not work well with component hierarchy. For other methodologies, we dint dive enough to find a good way to use it in our architecture.
Architecture
Think we can go to 2 approaches it depends on the project scale.
For small scale projects, they should have folders inside src
something like this
- assets
- components
- containers
- pages
- services
- styles
- ducks
- hooks
- types
- utils
A bigger project should be split into chunks inside the pages
folder to represent the routes hierarchy
for example
- pages (is root page)
- index.tsx
- trades
- components
- containers
- assets
- index.tsx
- history
- index.tsx
- User.tsx
where subfolders are only relevant for specific routes and root-level are used for globally shared code.
Recommender libs
classnames - simple utility but pretty useful tool for manipulating className's
axios - defacto standard for HTTP requests
date-fns - date manipulation library
react-router-dom - routing library
formik - extremely useful for big form
joi - validating object/form
redux - global state managment tool
Hi guys, apology if I'm pushing my personal project.
I have created a front-end framework which is inspired by elm (The Elm Architecture). The name of the project is sauron.
It has demonstrated that is a viable alternative to other front-end. Here is an example code on how to use it as front-end for a Near contract.
This project is certainly a niche, which is targeting rust developers who are trying to use rust for front-end development. Most rust programmers are in the back-end side of things.
The advantage of using sauron is that I am the core developer and adding support for case where it is not supported can be added as we go along.
Personally don't like the idea of having MUI skin as a component library.
About CSS, we tried (@irubido and me) to use the BEM bus is more confusing but dint does not work well with component hierarchy. For other methodologies, we dint dive enough to find a good way to use it in our architecture.
Architecture Think we can go to 2 approaches it depends on the project scale. For small scale projects, they should have folders inside
src
something like this
- assets
- components
- containers
- pages
- services
- styles
- ducks
- hooks
- types
- utils
A bigger project should be split into chunks inside the
pages
folder to represent the routes hierarchy for example
pages (is root page)
index.tsx
trades
components
containers
assets
index.tsx
history
- index.tsx
- User.tsx
where subfolders are only relevant for specific routes and root-level are used for globally shared code.
Recommender libs
- classnames - simple utility but pretty useful tool for manipulating className's
- axios - defacto standard for HTTP requests
- date-fns - date manipulation library
- react-router-dom - routing library
- formik - extremely useful for big form
- joi - validating object/form
redux - global state managment tool
- @reduxjs/toolkit - simplifies life of writing redux loop
- redux-saga - powerful data flow managment
We had a meeting with @FSM1 about this, so we can figure it out a way to organize this. I guess it would be great to organize a guild meeting to talk about this. Our general considerations are the following:
NextJS
as our choice, folder structure is going to differ for a simple create react app (@BeroBurny address this referring to bigger projects). In any cases we should discuss this.axios
would just add up to the bundle size. Form libraries and validators we think could be problematic to enforce. Some developers are more use to one or another, or just to make their own validations. State managment is a big topic in frontend, but in general those libraries are too opinionated and with a lot of ceremony. Personally I would leave this to the judgment of the team.Cypress
and, in the current project that I'm working on we are going to have funcional test over our bridge methods, so I can contribute on that part. styled components
and JSS
. I don't have a particular strong opinion about this. Also it depends if we are going to agree in the usage of some library for our frontend components. @wainola Just a note for library usage, I didn't mean that you write here libraries that each project must include. But rather to have something like:
for calling HTTP API use "axios"
for testing use "cypress"
But for certain we should standardize directory naming across organisation so it's easier to onboard and guide new developers as well as make it easy for people to switch between projects. Obviously some project will have additional directories and that's ok.
I'm thinking of creating github repo for standards (similar to https://github.com/ipfs/eslint-config-ipfs) which we can push to npm so for lining instead of copying configuration, you could do in .eslint.json
extends: "@chainsafe/standard"
Frontend
page here with following subject:Brainstorm
https://mui.com/
On Friday, November 5, We had a discussion about $Component Library Implementation$ which opened a few new questions.
My recommendation is to contain 2 separate meetings between the architecture and component library. (please comment if you agree or disagree about this)
cc @BeroBurny @sweetpea22 @FSM1 @Tbaut @RyRy79261 and others who I forgot to tag