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

Added some notes to README’s and .env.sample’s #466

Merged
merged 4 commits into from
May 11, 2022

Conversation

patnealcodes
Copy link
Contributor

Motivation: This PR updates some notes in the README files and adds some examples to the .env sample files to add more clarity around the setup process

Copy link

@brandonaaskov brandonaaskov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not close enough to the daily usage to approve or disapprove, just leaving some comments :)

Comment on lines 11 to 14
ALGOD_SERVER= ;e.g. http://localhost
ALGOD_PORT= ;e.g. 4001
ALGOD_TOKEN= ;e.g. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ALGOD_ENV= ;e.g. testnet

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone new to this might not realize that something like that ALGOD_TOKEN is actually valid (for dev). Is there a downside to just defining the dev defaults as opposed to showing the ;e.g.?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I'm aware and I'm happy to update if there are no objections

CMS_URL=http://localhost:8055

# Web app configuration
WEB_URL=http://localhost:3000

# Circle API configuration
CIRCLE_API_KEY=

CIRCLE_API_KEY= ;create a free circle account to generate a key
CIRCLE_URL=https://api-sandbox.circle.com

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we are already using dev defaults in some places. That's preferred IMO but that might just be a taste thing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CIRCLE_API_KEY has to be unique per project so we can't default one here, might suggest linking directly to the signup page where a sandbox key can be provisioned freely for development purposes (https://my-sandbox.circle.com/signup)


# Used for passphrase encryption
SECRET=

SECRET= ;any string

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we recommend a min length or maybe something obfuscated? This one seems important for something like that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing we frequently use to generate keys on the fly is:

$ openssl rand -hex 32 | pbcopy

Which will generate something like: 5f6a12942bb2c44eb70cf1b71ef1c211cc2d966981f76e6315bd086fe54cac16. Could be worth mentioning at the top of the .env file — or not. Just a good thing to be aware of!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's awesome, I'll definitely add that in!


# Used to generate blockchain assets
CREATOR_PASSPHRASE=

# Currency for application - needs to match the web env file and the CMS currency field.
CURRENCY=

CURRENCY= ;e.g. USD

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would one or two other options look like? Euros, pesos?

Comment on lines +42 to +56
Optionally, you can also fund your wallet from here to be able to perform transactions in the app:

- List the accounts that currently exist in your sandbox

```bash
./sandbox goal account list
```

- You should see several accounts, some with _microAlgos_, and the account with the address you created above likely having 0. You can run the following command to fund the account you just created with microAlgos

```bash
./sandbox goal clerk send -a <AMOUNT> -f <FROM_ADDRESS> -t <TO_ADDRESS>

# Note: Something like 1000000 microAlgos as the amount should be more than plenty to cover transactions
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very helpful addition, thank you.

Comment on lines +30 to +34
Optionally, you can seed the database to generate dummy content.

```bash
# While the server is runnning:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a subtle change but a good one. Most people go straight to the code and that's a good reminder 👍

Copy link
Contributor

@jakerainis jakerainis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff! Thank you for adding to this. It's always helpful to have a fresh set of eyes!

@patnealcodes patnealcodes merged commit aa16710 into main May 11, 2022
@patnealcodes patnealcodes deleted the patneal/update-startup-docs branch May 11, 2022 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants