darcher-figo / figo-rts Goto Github PK
View Code? Open in Web Editor NEWA React/Typescript template and guide.
Home Page: https://darcher-figo.github.io/project-starter/
A React/Typescript template and guide.
Home Page: https://darcher-figo.github.io/project-starter/
Establish what scans we want to run and where.
I'll generate some "best practice" base configurations but we'll want to review those and augment them with anything we want to standardize across projects.
Want:
sonarlint
prettier
eslint
stylelint
Maybe:
editorconfig
style-guide.xml
We want to create some general oddity tracking mechanisms to log and generate reports from in order to proactively catch issues before they become apparent.
These anomalies will usually need to be tracked by variance to common data,
e.g.
N
seconds, it usually loads in under N
milliseconds.X
number of times, whereas usually users only do it this much.ALL svg
tags should receive focusable="true"
and role="img"
to prevent screen readers from going into the vector frame, but there's a lot of areas that require some accessibility improvements, we need to investigate and isolate these areas, and create backlog tickets to go after them before they cause any legality issues.
aria-describedby
, aria-controlledby
, aria-live="polite"
, aria-label
, etc. etc.
For example, one approach:
For form validation, as fields become "valid" or "populated" the progression button should be disabled and have an aria-describedby
with a comma delimited list of field id
's for fields that remain prior to the button being enabled.
or
For modals, aria-hidden="true"
should be applied to the wrapper of all page content behind the modal, while the modal, outside of the container with this attribute, should have proper dialog
/modal
roles
and aria-live
indicators on close buttons, proceed buttons, etc.
Javascript is single-threaded and although it has the ability to use Promises or async/await, offloading logic into Web Workers introduces a multi-threaded approach to processing data heavy areas so they can happen in parallel.
Web Workers work similar to a pub/sub mediator in that you send messages to and from the worker while the functionality housed inside the worker operates independently and only looks for specific messages in order to execute the logic is houses, it then passes the result back once the process is completed.
Introduce additional tracking metrics that bring value to the analytics matrix/dataset
Get a mocking system in place with Figma to record user interaction with UI interfaces prior to development cycle. Internal users can review mocks during design phase in order to make necessary adjustment prior to items landing in dev backlog.
use alias[key] = "!f() { 〈 command 〉 }; f"
to include complex commands
# .git/config
[alias]
log = log --oneline --graph
lgc = log -l HEAD --stats
caa = commit -a --amend -C HEAD
usr = config --global -l
cmd = config --get-regexp alias
dst = reflog expire --dry-run --expire-unreachable=30.days refs/stash
sba = '!f() { git subtree add --prefix $2 $1 main --squash; }; f'
bcn = '!f() { git branch --merged ${1-main} | grep -v "${1-main}$" | xargs -r git branch -d; }; f'
fsh = '!f() { git fetch origin && git rebase origin/$(git branch --show-current); }; f'
fpc = '!f() { git push -u -F origin $(git branch --show-current); }; f'
fnd = '!f() { git !git rev-list --all | xargs git grep -F $1; }; f'
dbm = '!f() { git fetch -p && for branch in `git branch -vv --no-color | grep ": gone]" | awk "{print $1}"`; do git branch -D $branch; done; }; f'
ubm = '!f() { git for-each-ref --format "%(refname:short)" refs/heads | grep -v main | xargs git branch -D; }; f'
bin = '!f() { git reset bin/** && git clean bin/** -fxd; }; f'
new = !sh -c 'git log $1@{1}..$1@{0} "$@"'
sbf = !sh -c 'git diff "$@" | grep "^[+-]" | sort --key=1.2 | uniq -u -s1'
branch.autosetuprebase
always rebase new branchesgit config --global branch.autosetuprebase always
pull.rebase
always rebase pullsgit config --global pull.rebase true
push.default
always push current branchgit config --global push.default current
usr
get global user configs listgit config --global -l
cmd
get global alias listgit config --get-regexp alias
refresh
pull remote changes into local branchgit fetch origin && git rebase origin/$(git branch --show-current);
reindex
reindex branch commit historygit reset $(git merge-base origin/master $(git rev-parse --abbrev-ref HEAD))
shove
force push current local branch changes to remote origingit push -u -F origin $(git branch --show-current)
history
get local branch commit historygit log --oneline --graph
stats
get local branch last commit in historygit log -l HEAD --stats
find
get commits in history that have matches term or phrase in messagegit !git rev-list --all | xargs git grep -F 'some phrase or term'
debranch
remove all branches that have been merged into master.git fetch -p && for branch in `git branch -vv --no-color | grep ": gone]" | awk "{print $1}"`; do git branch -D $branch; done
unbranch
remove all branches that are not master.git for-each-ref --format '%(refname:short)' refs/heads | grep -v "master\|main" | xargs git branch -D
destash
expire stash older than 30 daysgit reflog expire --dry-run --expire-unreachable=30.days refs/stash
dropbin
unstage & discard entire /bin
directorygit reset bin/** && git clean bin/** -fxd
amend
takes all uncommitted and un-staged changes, currently in the working directory, and add them to the previous commit.git commit -a --amend -C HEAD
Dynamic imports to include functionality as-needed. Necessary dependancies to page load should get:
import { Header } from 'Components'
However, dependancies that are not required at initial load should be offloaded to dynamic imports to promote "as needed" packages:
const [state, setState] = React.useState<{
nodes: {
Modal: React.ReactNode | null,
},
}>({ nodes: { Modal: null } });
(async (() => {
const { Modal }: {
Modal: React.ReactNode
} = await import('Components');
setState((etc) => ({
...etc,
nodes: { Modal }
}));
}))
Generate a report from any or all of our tools that show areas that stand out, page load speeds, endpoint response times, image rendering, etc. etc.
Lets create a list of tags each repository needs, like:
To avoid impeding the progress of work, we want to start creating typings based on the data model/structures that are existing so when we start to transition from javascript to typescript we have these already established.
Serving new features to subsets of users to get initial metrics and user feedback.
We should have a hierarchic outline of coding styles and best practices that is easily referenced.
What is in place to get user feedback in order to get exposure to paint points or features users want? what in the UI do we want to add in order to get feedback from users interacting with our systems?
indexedDB
, cookies
, localStorage
, and sessionStorage
can all be used to similar effects. We don't utilize user localized data enough which puts the performance strain on the API endpoints instead of the users local machine.
I'm working on a template or starting repo where all projects can start with the same setup/configuration.
create mocked data items for use in testing and development.
Additional information or tag line
A brief description of your project, what it is used for.
A quick introduction of the minimal setup you need to get a hello world up &
running.
commands here
Here you should say what actually happens when you execute the code above.
List main libraries, frameworks used including versions (React, Angular etc...)
What is needed to set up the dev environment. For instance, global dependencies or any other tools. include download links.
Here's a brief intro about what a developer must do in order to start developing
the project further:
git clone https://github.com/darcher-/app-boilerplate.git
cd app-boilderplate/
yarn
And state what happens step-by-step. If there is any virtual environment, local server or database feeder needed, explain here.
If your project needs some additional steps for the developer to build the
project after some code changes, state them here. for example:
./configure
make
make install
Here again you should state what actually happens when the code above gets
executed.
give instructions on how to build and release a new version
In case there's some step you have to take that publishes this project to a
server, this is the right time to state it.
packagemanager deploy your-project -s server.com -u username -p password
And again you'd need to tell what the previous code actually does.
We can maybe use SemVer for versioning. For the versions available, see the link to tags on this repository.
Here you should write what are all of the configurations a user can enter when using the project.
Describe and show how to run the tests with code examples.
Explain what these tests test and why.
Give an example
Explain your code style and show how to check it.
If the api is external, link to api documentation. If not describe your api including authentication methods as well as explaining all the endpoints with their required parameters.
Explaining what database (and version) has been used. Provide download links.
Documents your database design and schemas, relations etc...
State what the license is and how to find the text version of the license.
We should have a short setup guide to show new developers how to setup their local environments to accommodate all projects.
React.useState
manages data states across the application and update in random orders and can cause dependency issues or state conflicts, not to mention cause a performance impact if the application is managing too many state instances.
A better approach, is using a single state const
for each functional component and passing all data to it in the below approach:
const [state, setState] = React.useState<Record<string, any>>({});
setState((etc) => ({
...etc,
prop: {
key: 'value'
}
}));
xState is a tool for creating, inspecting, and visualizing your applications state. Creating a sharable flow of various states that make up logic.
I'll generate some "best practice" base configurations but we'll want to review those and augment them with anything we want to standardize across projects.
Want:
sonarlint
prettier
eslint
stylelint
Maybe:
editorconfig
style-guide.xml
We should introduce a quarterly audit of tooling to ensure our toolset stays current with industry trends.
If we feature flag we can toggle on/off as needed.
Dead code on "in-flight" work or necessary pre-work that is required ahead of features moving fowrard.
Pretty self explanatory... The easiest approach to implementing this is to create abstractions and test those individually to remove complexity from components.
I'll generate some "best practice" base configurations but we'll want to review those and augment them with anything we want to standardize across projects.
Want:
sonarlint
prettier
eslint
stylelint
Maybe:
editorconfig
style-guide.xml
We need a scalable list of projects, their points of contact, and how they interact with each other so new developers (or anyone) can reference it while trying to find who to contact for what.
Where ES5 iteration methods and in general most logic is inside components, we want to abstract it out, wrap it in a namespace that is descriptive and understandable, and has tests written around it to increase stability, reusability, and scalability.
These new, succinct code snippets, will then be able to get updates as technology evolves and will be isolated/limited to small blocks of functionality.
No sense in reinventing the wheel, I prefer Ramda
as it is a functional programming approach to a utility library, but lodash
and a few others are acceptable as well.
Fetches, caches, and updates data in React app without touching global state.
We should establish a hierarchic outline of information that new developers/employees have access to reference.
If a purchase should fail, we notify the user to contact customer support.
Since they're already "purchasing" legally we can just store user details and "retry" after services are restored, then email to "complete" or "confirm"
We want to look through the front-end ecosystem at large and see what pieces we can abstract out and create reusable utilities from.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.