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

docs: add decisions, cleanup contributing and scripts #105

Merged
merged 1 commit into from
Jan 16, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
19 changes: 19 additions & 0 deletions .decisions/2-Release-Cycle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ℹ️ Overview

The release cycle is largely based on the internal Algorand Foundation's engineering compass.
It has been tailored to work with a cli based tool with binary artifacts

## ✅ Decisions

- **SHOULD** use conventional commits for consistency
- **SHOULD** use automated release tools like semantic-release
- **SHOULD** build for arm/amd64 on darwin and linux
- **SHOULD** have checks on code quality and regressions
- **SHOULD** present a manual page and generated reference material
- **SHOULD** provide handcrafted guides and documentation

## 🔨 Deliverables

- automated CI/CD release actions
- installer features for consumers
- marketing landing page with documentation site
17 changes: 17 additions & 0 deletions .decisions/3-Node-Management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ℹ️ Overview

Node Management has many aspects which this decision makes concrete.

## ✅ Decisions

- **SHOULD** include install/upgrade commands
- **SHOULD** include start/stop commands
- **SHOULD** include catchup commands
- **SHOULD** include bootstrap command

## 🔨 Deliverables

- Use package managers for installation and upgrades (brew, dnf, apt-get)
- Use native supervisors for algod orchestration (launchd, systemd)
- Bootstrap concept which ties several components together (install, start, fast-catchup, launch TUI)
- Limited amount of configurations for the initial release
4 changes: 3 additions & 1 deletion .decisions/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Decisions for this Project

- [1. GoLang/Charm TUI](1-GoLang-Charm.md)
- [1. GoLang/Charm TUI](1-GoLang-Charm.md)
- [2. Release Cycle](2-Release-Cycle.md)
- [3. Node Management](3-Node-Management.md)
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
nodekit
coverage
bin
Expand Down
37 changes: 37 additions & 0 deletions .tapes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Overview

Includes various [vhs](https://github.com/charmbracelet/vhs) tapes for the project.
Useful for creating consistent demos and guides when the TUI updates


## Get Started

Install vhs

```bash
go install github.com/charmbracelet/vhs@latest
```

Copy the default `tui.tape` and name it appropriately

```bash
cp ./tui.tape ./my-demo.tape
```

Edit the tape with your favorite editor.
Then you can run the vhs tape

(Make sure to update the output file)

```bash
vhs ./my-demo.tape
```

### Theme

Example theme that uses some of the official Algorand Foundation brand guides

```
Set Theme { "name": "Whimsy", "black": "#2D2DFI", "red": "#ef6487", "green": "#5eca89", "yellow": "#fdd877", "blue": "#65aef7", "magenta": "#aa7ff0", "cyan": "#43c1be", "white": "#ffffff", "brightBlack": "#535178", "brightRed": "#ef6487", "brightGreen": "#5eca89", "brightYellow": "#fdd877", "brightBlue": "#65aef7", "brightMagenta": "#aa7ff0", "brightCyan": "#43c1be", "brightWhite": "#ffffff", "background": "#001324", "foreground": "#b3b0d6", "selection": "#3d3c58", "cursor": "#b3b0d6" }
```

25 changes: 25 additions & 0 deletions .tapes/tui.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Output ../assets/tapes/tui.gif

Require nodekit

Set Framerate 30
Set Margin 1

Set Theme { "name": "Whimsy", "black": "#2D2DFI", "red": "#ef6487", "green": "#5eca89", "yellow": "#fdd877", "blue": "#65aef7", "magenta": "#aa7ff0", "cyan": "#43c1be", "white": "#ffffff", "brightBlack": "#535178", "brightRed": "#ef6487", "brightGreen": "#5eca89", "brightYellow": "#fdd877", "brightBlue": "#65aef7", "brightMagenta": "#aa7ff0", "brightCyan": "#43c1be", "brightWhite": "#ffffff", "background": "#001324", "foreground": "#b3b0d6", "selection": "#3d3c58", "cursor": "#b3b0d6" }

Set Shell "bash"
Set FontSize 10
Set Width 1280
Set Height 640

Type "nodekit" Sleep 500ms Enter

Sleep 3s Enter

Sleep 500ms Down Sleep 1s Enter

Sleep 1s Type "o"

Sleep 5s

Ctrl+C
31 changes: 8 additions & 23 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,8 @@ Build the project
make build
```

Optionally, run a sandboxed participation node


```bash
docker compose up
```

Create a configuration file for the participation node in the root directory of the project (.nodekit.yaml)

```yaml
algod-endpoint: http://localhost:8080
algod-token: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

Launch the TUI


> [!NOTE]
> If you skipped the docker container or config file, try running `./bin/nodekit` standalone,
> which will detect your algorand data directory from the `ALGORAND_DATA` environment variable that works for `goal`.
> Otherwise, provide the `--algod-endpoint` and `--algod-token` arguments so that it can find your node.
> Note that nodekit requires the admin algod token.
Launch the TUI.
See the [full documentation](https://nodekit.run/guides/getting-started/) for a complete guide

```bash
./bin/nodekit
Expand All @@ -52,7 +32,7 @@ Launch the TUI
# 📂 Folder Structure

```bash
├── api # Generated API Client
├── api # Generated API Client and Hand Crafted HTTPInterface
├── cmd # Command Controller
├── internal # Data Models/Fetch Wrappers
└── ui # BubbleTea Interfaces
Expand Down Expand Up @@ -142,3 +122,8 @@ The full command for reference
```bash
oapi-codegen -config generate.yaml https://raw.githubusercontent.com/algorand/go-algorand/v3.26.0-stable/daemon/algod/api/algod.oas3.yml
```

# Submitting Changes

This project follows [GitHub flow](https://githubflow.github.io/).
Create a fork and submit changes directly to the `main` branch.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Algorand Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Binary file added assets/tapes/tui.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Overview

Collection of scripts and utilities used in this project.

# Documentation

Documentation generator is based on CobraDoc
5 changes: 5 additions & 0 deletions scripts/wallet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"mnemonic": "artefact exist coil life turtle edge edge inside punch glance recycle teach melody diet method pause slam dumb race interest amused side learn able heavy",
"address": "TUIDKH2C7MUHZDD77MAMUREJRKNK25SYXB7OAFA6JFBB24PEL5UX4S4GUU",
"private_key": "Z/CTWhR4dRnJKHVurdhn6U3F9oRxoVj+0GBbF4Qf20+dEDUfQvsofIx/+wDKRImKmq12WLh+4BQeSUIdceRfaQ=="
}
58 changes: 0 additions & 58 deletions scripts/wallet.mjs

This file was deleted.

Loading