A set of React (TypeScript) UX components for Firebase database CRUD and cloud functions flow.
- Firebase Database CRUD w/ State-Context Management
- Firebase Cloud Functions Dynamic Conditional Flow (DCF)
- Node.js npm: Guide
- Global Dependencies:
npm install -g node-gyp yarn react typescript
-
Install Yarn:
yarn init; rm package-lock.json; yarn
-
Create the app:
yarn create next-app --typescript
-
Add ESLint:
npx eslint --init
-
Add the following to
eslint.json
:
"extends" : [
//...
"prettier"
]
-
Add and run prettier:
yarn add --dev --exact prettier eslint-config-prettier; yarn prettier
-
Create
.prettierrc.json
:
echo $'{
"semi" : true,
"singleQuote" : true,
"useTabs": false
"tabWidth" : 2,
"printWidth" : 80,
"trailingComma" : "es5",
"bracketSpacing" : true,
"arrowParens" : "always",
"endOfLine" : "lf"
}'> .prettierrc.json
- Add the following to
package.json/scripts{...}
:
"scripts" : {
// ...
"eslint" : "eslint src/**",
"prettier" : "prettier --write ."
}
-
Install MaterialUI:
yarn add @mui/material @emotion/react @emotion/styled @mui/icons-material
-
Install Next.js:
yarn add next
-
Install PostCSS/Tailwind CSS:
yarn add -D tailwindcss postcss autoprefixer
-
Install Jest:
yarn add -D jest jest-environment-jsdom @testing-library/react @testing-library/jest-dom; yarn create jest@latest