diff --git a/astro.config.mjs b/astro.config.mjs index 80d549f..b7f2709 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,75 +1,77 @@ -import { defineConfig } from 'astro/config'; -import starlight from '@astrojs/starlight'; +import { defineConfig } from "astro/config"; +import starlight from "@astrojs/starlight"; // https://astro.build/config export default defineConfig({ - site: 'https://docs.everywhere.computer', - integrations: [ - starlight({ - title: 'Everywhere Computer', - components: { - // Override the default `Head` component. - Head: './src/components/Head.astro', - }, - logo: { - light: '/src/assets/logo-light.svg', - dark: './src/assets/logo-dark.svg', - replacesTitle: true, - }, - customCss: [ - // Relative path to your custom CSS file - './src/styles/custom.css', - ], - favicon: './src/assets/favicon.svg', - expressiveCode: { - plugins: [{ - name: 'Variable Weight', - baseStyles: ` + site: "https://docs.everywhere.computer", + integrations: [ + starlight({ + title: "Everywhere Computer", + components: { + // Override the default `Head` component. + Head: "./src/components/Head.astro", + }, + logo: { + light: "/src/assets/logo-light.svg", + dark: "./src/assets/logo-dark.svg", + replacesTitle: true, + }, + customCss: [ + // Relative path to your custom CSS file + "./src/styles/custom.css", + ], + favicon: "./src/assets/favicon.svg", + expressiveCode: { + plugins: [ + { + name: "Variable Weight", + baseStyles: ` pre > code { font-variation-settings: 'wght' 550; } `, - }], - }, - social: { - github: 'https://github.com/everywhere-computer', - discord: 'https://discord.gg/yU6y8XMGaY', - 'x.com': 'https://x.com/everywherecomp', - }, - sidebar: [ - { label: '👋 Welcome', link: '/' }, - { label: '🤔 Why Choose It?', link: '/why-choose' }, - { label: '🤝 Who Participates?', link: '/who-participates' }, - { label: '🐇 Quick Start', link: '/quick-start' }, - { - label: '🧑‍💻 Every CLI', - autogenerate: { directory: 'everycli' }, - }, - { - label: '🏗️ Manual Setup', - autogenerate: { directory: 'manual-setup' }, - }, - // { - // label: '🎛️ Control Panel', - // autogenerate: { directory: 'control-panel' }, - // }, - // { - // label: '🪡 Workflows', - // autogenerate: { directory: 'workflows' }, - // }, - { - label: '💫 Homestar', - autogenerate: { directory: 'homestar' }, - }, - // { - // label: '🔌 Integrations', - // autogenerate: { directory: 'integrations' }, - // }, - // { - // label: '👥 Accounts', - // autogenerate: { directory: 'integrations' }, - // }, - ], - }), - ], + }, + ], + }, + social: { + github: "https://github.com/everywhere-computer", + discord: "https://discord.gg/yU6y8XMGaY", + "x.com": "https://x.com/everywherecomp", + }, + sidebar: [ + { label: "👋 Welcome", link: "/" }, + { label: "🤔 Why Choose It?", link: "/why-choose" }, + { label: "🤝 Who Participates?", link: "/who-participates" }, + { label: "🐇 Quick Start", link: "/quick-start" }, + { + label: "🧑‍💻 Every CLI", + autogenerate: { directory: "everycli" }, + }, + // { + // label: '🏗️ Manual Setup', + // autogenerate: { directory: 'manual-setup' }, + // }, + // { + // label: '🎛️ Control Panel', + // autogenerate: { directory: 'control-panel' }, + // }, + // { + // label: '🪡 Workflows', + // autogenerate: { directory: 'workflows' }, + // }, + { + label: "💫 Homestar", + autogenerate: { directory: "homestar" }, + }, + // { + // label: '🔌 Integrations', + // autogenerate: { directory: 'integrations' }, + // }, + // { + // label: '👥 Accounts', + // autogenerate: { directory: 'integrations' }, + // }, + ], + }), + ], }); diff --git a/src/content/docs/assets/quickstart-1.jpeg b/src/content/docs/assets/quickstart-1.jpeg new file mode 100644 index 0000000..f422dda Binary files /dev/null and b/src/content/docs/assets/quickstart-1.jpeg differ diff --git a/src/content/docs/assets/quickstart-2.jpeg b/src/content/docs/assets/quickstart-2.jpeg new file mode 100644 index 0000000..b8a83c7 Binary files /dev/null and b/src/content/docs/assets/quickstart-2.jpeg differ diff --git a/src/content/docs/config/homestar.md b/src/content/docs/config/homestar.md new file mode 100644 index 0000000..80c0f8d --- /dev/null +++ b/src/content/docs/config/homestar.md @@ -0,0 +1,89 @@ +--- +title: Default homestar.toml values +--- + +```toml +[node] +gc_interval = 1800 +shutdown_timeout = 20 + +[node.monitoring] +console_subscriber_port = 6669 +process_collector_interval = 5000 + +[node.network] +events_buffer_len = 1024 +poll_cache_interval = 1000 + +[node.network.libp2p] +announce_addresses = [] +idle_connection_timeout = 60 +listen_address = "/ip4/0.0.0.0/tcp/0" +max_connected_peers = 32 +max_announce_addresses = 10 +node_addresses = [] +transport_connection_timeout = 60 +dial_interval = 30 +bootstrap_interval = 30 + +[node.network.libp2p.dht] +enable_resolve_receipts_in_background = true +p2p_receipt_timeout = 500 +p2p_workflow_info_timeout = 500 +p2p_provider_timeout = 10000 +receipt_quorum = 2 +workflow_quorum = 3 + +[node.network.libp2p.quic] +enable = true + +[node.network.libp2p.mdns] +enable = true +enable_ipv6 = false +query_interval = 300 +ttl = 540 + +[node.network.libp2p.pubsub] +enable = true +duplication_cache_time = 1 +heartbeat = 60 +max_transmit_size = 10485760 +mesh_n_low = 1 +mesh_n_high = 10 +mesh_n = 2 +mesh_outbound_min = 1 + +[node.network.libp2p.rendezvous] +enable_client = true +enable_server = false +registration_ttl = 7200 +discovery_interval = 600 + +[node.network.metrics] +port = 4000 + +[node.network.rpc] +host = "::1" +max_connections = 10 +port = 3030 +server_timeout = 120 + +[node.network.keypair_config.random_seed] +key_type = "ed25519" | "secp256k1" +seed = "" + +[node.network.ipfs] +host = "127.0.0.1" +port = 5001 + +[node.network.webserver] +v4_host = "127.0.0.1" +v6_host = "[::1]" +port = 1337 +timeout = 120 +websocket_capacity = 2048 +websocket_sender_timeout = 30000 + +[node.db] +max_pool_size = 100 +``` diff --git a/src/content/docs/everycli/local-dev.mdx b/src/content/docs/everycli/local-dev.mdx index 38096a7..39b0dff 100644 --- a/src/content/docs/everycli/local-dev.mdx +++ b/src/content/docs/everycli/local-dev.mdx @@ -149,3 +149,38 @@ every cli dev --fn /hello.wasm By default the [every-cli](https://github.com/everywhere-computer/every-cli) will start a [CloudFlare tunnel](https://www.cloudflare.com/en-gb/products/tunnel/) for you. If you're familiar with [ngrok](https://ngrok.com/) or [tailscale](https://tailscale.com/), you can also use those to expose your local node server to the public Internet. + + +## Passing your own Homestar config + +By default the [every-cli](https://github.com/everywhere-computer/every-cli) will use the [default homestar.toml values](../../config/homestar) to specify configuration settings for your Homestar node. + +If you would like to specify your own `toml` file to be used as the configuration for Homestar, you can use the `--config` argument: + +```shell +every cli dev --fn /hello.wasm --config ../.toml +``` + +You can specify as many or as few values in your `toml` file as you like and the [every-cli](https://github.com/everywhere-computer/every-cli) will prioritize the values from your config over the default values. + +This means, if you only want to specify a different IPFS port, you simply need to create a `toml` file with +```toml +[node.network.ipfs] +port = 5002 +``` +and the [every-cli](https://github.com/everywhere-computer/every-cli) will upload your functions to IPFS on port `5002` and configure Homestar to use IPFS port `5002`, as well. + +If you have specified your own config file, the control panel will run locally so its `.env` file can be overwritten if necessary: + +```bash +✔ Functions parsed and compiled +✔ Homestar is running at http://127.0.0.1:8020 +✔ Control Panel is running at http://127.0.0.1:5178 + +◐ Starting cloudflared tunnel to http://127.0.0.1:3000/ + +... a QR code ... + +➜ Local: http://127.0.0.1:3000/ +➜ Tunnel: https://sometimes-comical-word-set.trycloudflare.com +``` \ No newline at end of file diff --git a/src/content/docs/quick-start.md b/src/content/docs/quick-start.md index 1b59c96..467b047 100644 --- a/src/content/docs/quick-start.md +++ b/src/content/docs/quick-start.md @@ -37,7 +37,7 @@ This should produce an output like the following in your terminal: ```bash ✔ Functions parsed and compiled ✔ Homestar is running at http://127.0.0.1:8020 -✔ Control Panel is running at http://127.0.0.1:4173 +✔ Control Panel is running at https://control.everywhere.computer ◐ Starting cloudflared tunnel to http://127.0.0.1:3000/ @@ -55,9 +55,9 @@ Everything is now ready to run your function: ### Run `hello` From The Control Panel -Visit your local Control Panel at [http://127.0.0.1:4173](http://127.0.0.1:4173). You should see the following interface: +Visit your local Control Panel at [https://control.everywhere.computer](https://control.everywhere.computer). You should see the following interface: -![The Control Panel](./assets/quickstart-1.jpg) +![The Control Panel](./assets/quickstart-1.jpeg) Enter a name and hit the "Run" button. You should see your first result! @@ -87,7 +87,7 @@ Let's construct a two task workflow to test this out. To do this, we'll instruct every dev --fn src/functions/hello.ts --fn src/functions/concat.ts ``` -![A Multi-Function Workflow](./assets/quickstart-2.jpg) +![A Multi-Function Workflow](./assets/quickstart-2.jpeg) ## Next Steps