Skip to content

Commit

Permalink
chore(docs): moving tutorials and quick starts around, spinning off c…
Browse files Browse the repository at this point in the history
…odespaces page
  • Loading branch information
signorecello committed May 30, 2024
1 parent 69d90c4 commit f5c3239
Show file tree
Hide file tree
Showing 16 changed files with 118 additions and 507 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/scripts/onCreateCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ if ! grep -q "PXE_URL" ~/.bashrc; then
fi

if ! grep -q "alias sandbox" ~/.bashrc; then
echo "alias sandbox=\"npx create-aztec-app sandbox\"" >> ~/.bashrc
echo "alias sandbox=\"npx aztec-app sandbox\"" >> ~/.bashrc
fi

source ~/.bashrc
yes | npx create-aztec-app -t $TYPE -n $NAME -s
yes | npx aztec-app -t $TYPE -n $NAME -s
mv $NAME/* $NAME/.* .
rm -rf $NAME

Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/scripts/postAttachCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NAME=$2
apt install gh
gh codespace ports visibility 8080:public -c $CODESPACE_NAME

npx create-aztec-app sandbox start
npx aztec-app sandbox start

r=$(tput sgr0) # Reset color
bold=$(tput bold) # Bold text
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/aztec/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Aztec",
"position": 0,
"position": 1,
"collapsible": true,
"collapsed": true
}
31 changes: 9 additions & 22 deletions docs/docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,30 @@
title: Quickstart
---

The easiest way to start developing on Aztec is simply to click on one of these buttons:
The easiest way to start developing on Aztec locally is through `npx aztec-app`. This is a convenient way of installing the development environment (A.K.A. Sandbox) and starting new projects from a boilerplate.

[![One-Click React Starter](/img/codespaces_badges/react_cta_badge.svg)](https://codespaces.new/AztecProtocol/aztec-packages?devcontainer_path=.devcontainer%2Freact%2Fdevcontainer.json) [![One-Click HTML/TS Starter](/img/codespaces_badges/vanilla_cta_badge.svg)](https://codespaces.new/AztecProtocol/aztec-packages?devcontainer_path=.devcontainer%2Fvanilla%2Fdevcontainer.json) [![One-Click Token Starter](/img/codespaces_badges/token_cta_badge.svg)](https://codespaces.new/AztecProtocol/aztec-packages?devcontainer_path=.devcontainer%2Ftoken%2Fdevcontainer.json)
If you'd like to develop remotely (for example, if you're on Windows or have trouble working with Docker), follow the [codespaces guide](./getting_started/codespaces.md).

That's it!

This creates a codespace with a prebuilt image containing one of the "Aztec Boxes" and a development network (sandbox).
- You can develop directly on the codespace, push it to a repo, make yourself at home.
- You can also just use the sandbox that comes with it. The URL will be logged, you just need to use it as your `PXE_URL`.

## Develop Locally

The above method uses Aztec boxes to install the sandbox and clone the repo. You can use it too to get started on your own machine and use your own IDE.

You can also [install the sandbox manually](/reference/sandbox_reference).

### Prerequisites
## Prerequisites

- Node.js >= v18 (recommend installing with [nvm](https://github.com/nvm-sh/nvm))
- Docker (visit [this page of the Docker docs](https://docs.docker.com/get-docker/) on how to install it)

### Run the `npx` script

With the node installation, you now should have `npm` and be able to run `npx` scripts. You can do that by running:
Thanks to Node, you can run the recommended `npx script`:

```bash
npx create-aztec-app
npx aztec-app
```

And follow the instructions. If all goes well, you should now have a development environment running locally on your machine.

You can run `npx create-aztec-app sandbox -h` to start, stop, update and output logs from the sandbox.
This script gives you some options to bootstrap a new project, start/stop the sandbox, or see the logs. Run `npx aztec-app -h` for a list of options.

## What's next?

To deploy a smart contract to your sandbox and interact with it using Aztec.js, go to the [next page](getting_started/aztecjs-getting-started.md).
Now you have a development network running,, so you're ready to start coding your first app with Aztec.nr and Aztec.js!

To skip this and write your first smart contract, go to the [Aztec.nr getting started page](getting_started/aztecnr-getting-started.md).
To follow the series of tutorials, start with the private voting contract [here](./tutorials/contract_tutorials/private_voting_contract.md).

If you want to just keep learning, you can read about the high level architecture on the [Core Components page](./aztec/concepts/state_model/index.md) and [the lifecycle of a transaction](./aztec/concepts/transactions.md).

Loading

0 comments on commit f5c3239

Please sign in to comment.