Skip to content

Commit 6a4d57f

Browse files
authored
Merge pull request #158 from theahaco/feat/redesign
Feat/redesign
2 parents 3b438e2 + b3ec48e commit 6a4d57f

File tree

126 files changed

+15541
-20490
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+15541
-20490
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2828
# Add the wasm32v1-none target for building contracts
2929
- run: rustup target add wasm32v1-none
30-
- run: sudo apt-get update && sudo apt-get install -y libudev-dev libdbus-1-dev pkg-config
30+
- run:
31+
sudo apt-get update && sudo apt-get install -y libudev-dev
32+
libdbus-1-dev pkg-config
3133
# Install binstall to quickly install stellar-scaffold-cli
3234
- name: Install cargo-binstall
3335
uses: cargo-bins/cargo-binstall@main
@@ -44,7 +46,9 @@ jobs:
4446
- run: npm run lint
4547
- run: npx prettier . --check
4648
- name: Build with Scaffold and build client packages
47-
run: STELLAR_SCAFFOLD_ENV=development stellar-scaffold build --build-clients 2>&1 | tee build_clients.log
49+
run:
50+
STELLAR_SCAFFOLD_ENV=development stellar-scaffold build
51+
--build-clients 2>&1 | tee build_clients.log
4852
- name: Check client generation summary
4953
run: |
5054
# Extract the number after "Failed: "

.github/workflows/dapp-ipfs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ jobs:
3434

3535
- name: Build app
3636
env:
37-
PUBLIC_STELLAR_NETWORK_PASSPHRASE: ${{ vars.PUBLIC_STELLAR_NETWORK_PASSPHRASE }}
37+
PUBLIC_STELLAR_NETWORK_PASSPHRASE:
38+
${{ vars.PUBLIC_STELLAR_NETWORK_PASSPHRASE }}
3839
PUBLIC_STELLAR_RPC_URL: ${{ vars.PUBLIC_STELLAR_RPC_URL }}
39-
PUBLIC_PUBLIC_STELLAR_HORIZON_URL: ${{ vars.PUBLIC_PUBLIC_STELLAR_HORIZON_URL }}
40+
PUBLIC_PUBLIC_STELLAR_HORIZON_URL:
41+
${{ vars.PUBLIC_PUBLIC_STELLAR_HORIZON_URL }}
4042
run: npm run build
4143

4244
- name: Generate artifact attestation for dist

CODE_OF_CONDUCT.md

Lines changed: 166 additions & 131 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Contributing
22

3-
This is a guide to contributing to `scaffold-stellar-frontend` itself. Feel free to delete or modify it for your own project.
3+
This is a guide to contributing to `scaffold-stellar-frontend` itself. Feel free
4+
to delete or modify it for your own project.

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Scaffold Stellar Frontend
22

3-
_To get started with Scaffold Stellar, visit its repo: [github.com/theahaco/scaffold-stellar](https://github.com/theahaco/scaffold-stellar)._
3+
_To get started with Scaffold Stellar, visit its repo:
4+
[github.com/theahaco/scaffold-stellar](https://github.com/theahaco/scaffold-stellar)._
45

56
_Under active development._
67

@@ -12,17 +13,22 @@ A modern, up-to-date toolkit for building Stellar smart contract frontends.
1213
- 🛠 Hot reload for contract changes
1314
- 🧪 Easy local/testnet deployment
1415

15-
This is the starter frontend generated by `stellar scaffold init`. See more at [Scaffold Stellar](https://github.com/theahaco/scaffold-stellar).
16+
This is the starter frontend generated by `stellar scaffold init`. See more at
17+
[Scaffold Stellar](https://github.com/theahaco/scaffold-stellar).
1618

1719
## Requirements
1820

19-
Before getting started, make sure you’ve met the requirements listed in the [Soroban documentation](https://developers.stellar.org/docs/build/smart-contracts/getting-started/setup) and that the following tools are installed :
21+
Before getting started, make sure you’ve met the requirements listed in the
22+
[Soroban documentation](https://developers.stellar.org/docs/build/smart-contracts/getting-started/setup)
23+
and that the following tools are installed :
2024

2125
- [Rust](https://www.rust-lang.org/tools/install)
2226
- [Cargo](https://doc.rust-lang.org/cargo/) (comes with Rust)
23-
- Rust target: install the compilation target listed in the [Soroban setup guide](https://developers.stellar.org/docs/build/smart-contracts/getting-started/setup)
27+
- Rust target: install the compilation target listed in the
28+
[Soroban setup guide](https://developers.stellar.org/docs/build/smart-contracts/getting-started/setup)
2429
- [Node.js](https://nodejs.org/en/download/package-manager) (v22, or higher)
25-
- [npm](https://www.npmjs.com/): Comes with the node installer or can also be installed package managers such as Homebrew, Chocolatey, apt, etc.
30+
- [npm](https://www.npmjs.com/): Comes with the node installer or can also be
31+
installed package managers such as Homebrew, Chocolatey, apt, etc.
2632
- [Stellar CLI](https://github.com/stellar/stellar-core)
2733
- [Scaffold Stellar CLI Plugin](https://github.com/AhaLabs/scaffold-stellar)
2834

@@ -88,7 +94,8 @@ stellar registry create-alias my-contract
8894

8995
## Scaffold Initial Project Structure
9096

91-
When you run `stellar scaffold init`, it creates a frontend-focused project structure with example contracts:
97+
When you run `stellar scaffold init`, it creates a frontend-focused project
98+
structure with example contracts:
9299

93100
```
94101
my-project/ # Your initialized project
@@ -108,4 +115,7 @@ my-project/ # Your initialized project
108115
└── .env # Local environment variables
109116
```
110117

111-
This template provides a ready-to-use frontend application with example smart contracts and their TypeScript clients. You can use these as reference while building your own contracts and UI. The frontend is set up with Vite, React, and includes basic components for interacting with the contracts.
118+
This template provides a ready-to-use frontend application with example smart
119+
contracts and their TypeScript clients. You can use these as reference while
120+
building your own contracts and UI. The frontend is set up with Vite, React, and
121+
includes basic components for interacting with the contracts.

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
## Reporting a Vulnerability
44

5-
Please reach out to the team using GitHub's own security mechanism to submit an anonymous report.
5+
Please reach out to the team using GitHub's own security mechanism to submit an
6+
anonymous report.

environments.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ default = true
8383
# soroban-increment-contract = { id = "C567..." }
8484
# soroban-token-contract = { id = "C678..." }
8585
# eurc = { id = "C789..." }
86+
guess_the_number = { client = true, constructor_args = "--admin me", after_deploy = "reset" }
8687

8788
### Production environment configuration
8889
[production.network]

eslint.config.js

Lines changed: 24 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,25 @@
1-
import js from "@eslint/js";
2-
import globals from "globals";
3-
import reactDOM from "eslint-plugin-react-dom";
4-
import reactHooks from "eslint-plugin-react-hooks";
5-
import reactRefresh from "eslint-plugin-react-refresh";
6-
import reactX from "eslint-plugin-react-x";
7-
import tseslint from "typescript-eslint";
8-
import prettier from "eslint-config-prettier";
9-
import { globalIgnores } from "eslint/config";
1+
import { config } from "@theahaco/ts-config/eslint"
2+
import { globalIgnores } from "eslint/config"
3+
import globals from "globals"
104

11-
export default tseslint.config(
12-
globalIgnores([
13-
"dist",
14-
"packages",
15-
"target/packages",
16-
"src/contracts/*",
17-
"!src/contracts/util.ts",
18-
]),
19-
{
20-
extends: [
21-
js.configs.recommended,
22-
tseslint.configs.recommendedTypeChecked,
23-
reactDOM.configs.recommended,
24-
reactHooks.configs["recommended-latest"],
25-
reactRefresh.configs.vite,
26-
reactX.configs["recommended-typescript"],
27-
prettier,
28-
],
29-
files: ["**/*.{ts,tsx}"],
30-
languageOptions: {
31-
ecmaVersion: 2020,
32-
globals: globals.browser,
33-
parserOptions: {
34-
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
35-
tsconfigRoot: import.meta.dirname,
36-
},
37-
},
38-
rules: {
39-
"react-refresh/only-export-components": [
40-
"warn",
41-
{ allowConstantExport: true },
42-
],
43-
},
44-
},
45-
);
5+
/** @type {import("eslint").Linter.Config[]} */
6+
export default [
7+
globalIgnores([
8+
"dist",
9+
"packages",
10+
"target/packages",
11+
"src/contracts/*",
12+
"!src/contracts/util.ts",
13+
]),
14+
...config,
15+
{
16+
files: ["**/*.{ts,tsx}"],
17+
languageOptions: {
18+
ecmaVersion: 2020,
19+
globals: globals.browser,
20+
parserOptions: {
21+
tsconfigRoot: import.meta.dirname,
22+
},
23+
},
24+
},
25+
]

index.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
7-
<title>Scaffold Stellar Starter App</title>
8-
<link rel="preconnect" href="https://fonts.googleapis.com" />
9-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10-
<link
11-
href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Inconsolata:wght@500&display=swap"
12-
rel="stylesheet"
13-
/>
14-
</head>
15-
<body>
16-
<div id="root"></div>
17-
<script type="module" src="/src/main.tsx"></script>
18-
</body>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
7+
<title>Scaffold Stellar Starter App</title>
8+
<link rel="preconnect" href="https://fonts.googleapis.com" />
9+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10+
<link
11+
href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Inconsolata:wght@500&display=swap"
12+
rel="stylesheet"
13+
/>
14+
</head>
15+
<body>
16+
<div id="root"></div>
17+
<script type="module" src="/src/main.tsx"></script>
18+
</body>
1919
</html>

0 commit comments

Comments
 (0)