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

First OKP4 boilerplate, with Vite #2

Merged
merged 26 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dbb89bf
feat(vite): set up empty vite project
antho31 Sep 19, 2023
cc1acbf
feat(vite): add nodejs polyfills
antho31 Sep 19, 2023
d1d7db5
feat(vite): connect to okp4-nemeton-1 network
antho31 Sep 19, 2023
51d2b5f
feat(vite): add basic connection component
antho31 Sep 19, 2023
c895d35
feat(vite): add multiple wallet support for connection
antho31 Sep 19, 2023
84ef831
feat(vite): add balance component
antho31 Sep 19, 2023
ff60368
feat(vite): add instantitation possibilities
antho31 Sep 19, 2023
fd0c27f
feat(vite): add execute possibilities
antho31 Sep 19, 2023
4855ce5
feat(vite): add query possibilities
antho31 Sep 19, 2023
c38264e
feat(vite): add contract list query
antho31 Sep 19, 2023
cfa8857
feat(vite): list Transactions with tx decoding utils
antho31 Sep 20, 2023
d2e757c
feat(vite): add ui components + update README
antho31 Sep 20, 2023
6d50d82
fix(lint): add eslint-config-okp4
antho31 Sep 21, 2023
c387d1c
fix(deps): add node engine
antho31 Sep 21, 2023
9fb13e0
fix(config): update tsconfig
antho31 Sep 21, 2023
9e9cd99
fix(config): update vite.config.ts with autoprefixer for cross browse…
antho31 Sep 21, 2023
e6be4cd
fix(config): add autoprefixer for postcss
antho31 Sep 21, 2023
6ea105b
fix(config): move autoprefixer
antho31 Sep 21, 2023
c59b57a
fix(config): update package-lock.json
antho31 Sep 21, 2023
01dcf90
feat(deps): add saas package
antho31 Sep 21, 2023
4d1374a
fix(docs): remove npm
antho31 Sep 21, 2023
43515da
fix(docs): set up scss
antho31 Sep 21, 2023
f36ba1f
feat(dx): add gitpod conf
antho31 Sep 21, 2023
8513697
fix(dx): update gitpod conf
antho31 Sep 21, 2023
a259cdc
fix(vite): gather imports
antho31 Sep 25, 2023
ab8e533
fix(example): add uint128max const
antho31 Sep 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
.vscode/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
5 changes: 5 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
image: gitpod/workspace-full

tasks:
- init: curl https://i.jpillora.com/okp4/[email protected]! | bash
name: Install OKP4 CLI
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Template project
# Web UI Boilerplates

> Template for opensource projects [@okp4](https://okp4.network).
> Boilerplates to build UIs interacting with the [@okp4](https://okp4.network) protocol.

[![lint](https://img.shields.io/github/actions/workflow/status/okp4/template-oss/lint.yml?branch=main&label=lint&style=for-the-badge&logo=github)](https://github.com/okp4/template-oss/actions/workflows/lint.yml)
[![conventional commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=for-the-badge&logo=conventionalcommits)](https://conventionalcommits.org)
[![contributor covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?style=for-the-badge)](https://github.com/okp4/.github/blob/main/CODE_OF_CONDUCT.md)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg?style=for-the-badge)](https://opensource.org/licenses/BSD-3-Clause)

## Frameworks

- [Vite](./vite)

## You want to get involved? 😍

Please check out OKP4 health files :
Expand Down
14 changes: 14 additions & 0 deletions vite/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: ["@okp4"],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
};
34 changes: 34 additions & 0 deletions vite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# OKP4 Boilerplate with React + TypeScript + Vite

Front-end boilerplate to rapidly develop UIs for interacting with the OKP4 blockchain. Utilizing Vite, it shows how to handle the connection, the interaction with smart contracts, and the decoding of transactions.

![Preview](./src/assets/global-preview.png)

---

## 🌟 Features

- Pre-configured setup to connect to OKP4 testnet
- Utility functions and [Graz](https://graz.sh/docs/) hooks to call, deploy, and interact with [OKP4 smart contracts](https://github.com/okp4/contracts)
- Decode transactions to analyze onchain Prolog programs and more

## 🛠 Prerequisites

- Node.js >=18.x

## 🖥 Get started

To set up and run the project locally, follow the following steps:

```bash
npm i
npm run dev
```

## 🆘 Support

For bugs 🐛, feature requests 🌈, or other queries ❓, open an issue in the GitHub repository.

## 📜 License

This project is licensed under the BSD-3-Clause License. See LICENSE file for more details.
13 changes: 13 additions & 0 deletions vite/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading