Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/app integrations #50

Merged
merged 7 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"app": "yarn workspace @bazk/app",
"gramine": "yarn workspace @bazk/gramine",
"serverless": "yarn workspace @bazk/serverless",
"api-gramine": "yarn workspace @bazk/api-gramine",
"provisioning": "yarn workspace @bazk/provisioning"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/api-gramine/src/constants/contract.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/app/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
rules: {
'react/no-unknown-property': 0,
'react-refresh/only-export-components': 0,
"@typescript-eslint/ban-ts-comment": 0,
'@typescript-eslint/no-explicit-any': 0,
'react-refresh/only-export-components': [
'warn',
Expand Down
59 changes: 38 additions & 21 deletions packages/app/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,47 @@
# React + TypeScript + Vite
[Bazk](https://www.bazk.tech/)
==========

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
## Guidelines
* Use the present tense ("Add feature" not "Added feature") and the imperative mood ("Move class to..." not "Moves class to...") on commits and use the name issue on pull requests.
* Pull requests must be reviewed before merged.
* Done is better than perfect. Does it work as expected? Ship now, iterate later.

Currently, two official plugins are available:
## Coding Style

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
- CSS: https://github.com/airbnb/css
- Javascript: https://github.com/airbnb/javascript
- React: https://airbnb.io/javascript/react/

## Expanding the ESLint configuration
## Directory Structure
In our project, Nuxt.js is used in combination with Nuxt Layer to manage various applications as individual layers. This unique structure allows us to segregate our codebase based on their functionality or scope and handle each layer as a separate Nuxt.js application.

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
Here's a brief overview of the structure:

- Configure the top-level `parserOptions` property like this:
```bash
.
├── components # UI Components
├── pages # App pages
├── hooks # UI Hooks
├── machines # Xstate machines
├── providers # App providers
```

## Installation
-----------------

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
#### Steps
1) Clone the repository:
```bash
$ gh repo clone hack-a-chain-software/bazk
$ cd bazk
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
2) Install frontend dependencies via YARN:
```bash
$ yarn install
```

3) Run dev server
```bash
$ yarn app dev
```
2 changes: 2 additions & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"localforage": "^1.10.0",
"ramda": "^0.29.1",
"react": "^18.2.0",
"react-datepicker": "^6.5.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"react-router": "^6.21.3",
"react-router-dom": "^6.21.3",
"react-transition-group": "^4.4.5",
Expand Down