GithubHelp home page GithubHelp logo

permaweb / ao-cookbook Goto Github PK

View Code? Open in Web Editor NEW
48.0 9.0 56.0 9.3 MB

Get cooking with ao - the decentralized computer with infinite threads ๐Ÿฐ ๐Ÿ•ณ๏ธ ๐Ÿ‘ˆ

Home Page: https://cookbook_ao.arweave.dev

JavaScript 83.42% CSS 16.58%

ao-cookbook's Introduction

ao Cookbook

The ao Cookbook is meant to house small digestible code snippets for someone that has no experience with ao to be able to grab and go.

Contributing

The Cookbook is welcome to any and all contributions. Please refer to the project's style when contributing new snippets of code.

Structure

Currently we have "sections" under /src and the code for those sections.

Section Description
Getting Started Resources for starting development on ao
Core Concepts Building blocks of ao that are good to know for development
Guides Snack-sized guides about different tools for development
References References to commonly needed code snippets

Writing References

References are an overarching topic with a list of references of how to do things under that topic. The general structure is the following:

Code Reference Title

Short Summary

Code Snippet

Writing Guides

Guides are longer form informational documentation on various topics. The general structure for writing a guide is the following:

Brief Summary/TLDR

Fact Sheet

Deep Dive

Other Resources

Building

If you use GitPod, this setup is done for you.

You need to have node v18 installed - https://nodejs.org

cd docs
yarn
yarn dev

Translation

Learn more about translating the cookbook here

Audit

If you find a tool or guide out of date, please create an issue on the project board so that it can be removed or updated.

Committing

We are using conventional commits for this repository.

To choose a task or make your own, do the following:

  1. Add an issue for the task and assign it to yourself or comment on the issue
  2. Make a draft PR referencing the issue.

The general flow for making a contribution:

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

You can find tasks on the project board or create an issue and assign it to yourself.

Happy Cooking!

Deploy Instructions

Deploy is all handled by CI via a GitHub workflow

ao-cookbook's People

Contributors

countzer0 avatar creedscode avatar cryptowizard0 avatar degensean avatar envoy-vc avatar freekers avatar hellorwa avatar holazz avatar jajablinky avatar jomosis avatar jonny-ringo avatar leo5imon avatar martonlederer avatar mayurmarvel avatar megabyte0x avatar michaelbuhler avatar nestorbonilla avatar outprog avatar pchao3 avatar pskinnertech avatar regchiu avatar ropats16 avatar rosmcmahon avatar star8ks avatar tillathehun0 avatar twilson63 avatar vincejuliano avatar xgocn avatar xj5027 avatar zhiqiangxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ao-cookbook's Issues

Fix: Fix the Token Blueprint code in the AO Cookbook

Description:
The code for tokens in the AO Cookbook is different from the code in the AO Stack. This is causing problems when sending tokens and other stuff.

Details:

  • The code in the AO Cookbook doesn't match the code in the AO Stack.
  • This is causing issues when trying to send tokens and doing other things with them.

To Do:

  • We need to update the Token Blueprint code in the AO Cookbook to match the code in the AO Stack.
  • After updating, we should test it to make sure everything works smoothly.

Related Links:

Implement Multilingual BUILD time translations

Support for multiple languages in static config is already supported. Ideally, we can use a process similar to the Permaweb Cookbook to use CI, in conjunction with GPT, to automatically generate the cookbook translated to other languages.

We have the raw materials and approach in the Permaweb Cookbook, just need time to port it over to the ao Cookbook.

PRs welcome!

Recommended denomination for tokens

Hey there,
I'm a bit concerned about the recommended Denomination value in the cookbook. I feel like 10 is a very small number and it does not allow precise calculations (for e.g. exchange calculations). I understand the cookbook only has examples for this, but I feel like it should still be changed, because many developers will use it as a base. My recommendation is to have a Denomination of 10^12 in the tutorial, as well as the aos blueprint.
I also think it would make sense to recommend developers to only use integer powers of 10.

optimize the docs site heading and add language switcher

Hey, I'd like to optimize the heading of the docs site.

After we click on the Docs page, it shows a long list of menu and page links on the left.

I can optimize it to be the same style as the Vitepress official site.
Screenshot 2024-03-06 at 18 47 46

I have read through the whole docs site, and I think I understand the whole docs now, and the new menu structure will be like this:

Screenshot 2024-03-06 at 18 49 02

The screenshot is my Nuxt3 version of it, I understand that I need to build the structure in the Vitepress.

If permitted, I will start to work on this and make a PR for this including multiple language switchers with part of Chinese translation(We are working on progressing the whole docs into Chinese, about 50% for now).

AO from Stark@HelloRWA!

is it a `sh` or `lua`?

While I am reading the docs.

Have confusion about this:

the code type here is sh

  Send({ Target = "process ID", Data = "Hello World!" })

some times use:

the code type here is lua

Send({ Target = Morpheus, Data = "Morpheus?" })

What we should use then? I am working on translate the docs into Chinese, and at the same time I can optimize the docs in English too ;)

Accessing the msg.From field

Problem

The tutorials use msg.From as an authentication mechanism.

Solution

There is also msg.Tags.["From-Process"], or what is the difference?

Make an alt version of ao-cookbook

I just read through the ao cookbook.
It's exciting for the new tech!

I am just thinking about making a Chinese translation for the cookbook, at the same time, I make an alt version for the ao-cookbook, if you like, I can transfer the repo to permaweb org.

Source
Preview

Screenshot 2024-03-02 at 12 40 00

Screenshot 2024-03-02 at 12 39 23

Difference from ao-cookbook

  • Move top-level item to the top nav
    • reduce the length of left aside menu
    • Only show sub-level menu items in the current top-level menu
  • For multiple languages, making a different branch to host this with different sub-domains will be better.
  • Support doc search internal
  • Use Nuxt3 Docs Template
  • Require to buy a Nuxt3 UI Pro license to deploy, it's ok to dev in localhost without the licence key

ArDrive failing to upload `/assets/chunks/theme.b4WnDNzP.js`

Our CI uploads our Vitepress static site assets to ArDrive. Across CI runs, we're consistently seeing one file in those set of assets produce an error from ArDrive like:

Error uploading file file:///home/runner/work/.../.vitepress/dist/assets/chunks/theme.b4WnDNzP.js: Error: Upload to Turbo Has Failed. Status: 403 Text: Forbidden
Skipping and continuing...

We're using ArDrive CLI version 2.0.2 and uploading the entire directory using this command:

ardrive upload-file \
            --turbo \
            --parent-folder-id "${FOLDER_ID}" \
            --local-paths "${ARTIFACTS_OUTPUT_DIR}"/* \
            -w "..."

All of the other files, ~250 seem to upload to ArDrive just fine, it's just consistently that file. File is ~52KB.

Guide: FAQ

Create a guide for FAQs

  • Ownership
  • JSON
  • when to use ao.send and Send

feat: Reorg folders

After a discussion with Sam, we thought it was best to reorganize the folders as:

  1. Tutorials
  2. Guides
  3. Concepts
  4. References

--

Current:

  1. Concepts
  2. Guides
  3. Tutorials
  4. References

setup aos concepts and guides

aos

  • installing aos
  • checking the version
  • command line arguments
  • load command
  • receiving/handling messages
  • sending messages
  • spawning processes

A Break In Navigation.

When going from the tutorial table of contents to the 1st step in the tutorial, it just takes you back to the "Getting Started" page. This creates a navigation loop. When completing the "Getting Started", it takes you to the Next Page which is "Concepts".

Loom Video to Demo:
https://www.loom.com/share/a0e8dea305064c34a9aec6bcde49c986

Suggested Changes:

  • Create a new, condensed version of "Getting Started" to serve as the 1st page of the tutorial track. That way, when reaching the bottom the next page should be the suggested next step in the tutorial track.

Error trying to boot aos.

Description
Trying to boot aos but receiving An Error occurred trying to boot AOS. Please check your access points, if the problem persists contact support.

Desktop:

  • macOS
  • Version: 14.2.1
  • BuildVersion: 23C71

Details

  • Node v20.11.1
  1. Ran npm i -g https://get_ao.g8way.io/
  2. Ran aos
  3. Received An Error occurred trying to boot AOS. Please check your access points, if the problem persists contact support.
  4. Ran DEBUG=1. See screenshot below for output.
  5. Ran HTTPS_PROXY=http://localhost:3000 aos โ†’ same output as step 3.

Screenshots
Screenshot 2024-03-03 at 1 09 33โ€ฏPM


Screenshot 2024-03-03 at 1 39 53โ€ฏPM


Screenshot 2024-03-03 at 1 12 02โ€ฏPM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.