-
Notifications
You must be signed in to change notification settings - Fork 79
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
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,9 @@ The API provides REST endpoints for the Web frontend. These endpoints include: u | |
|
||
## Get started | ||
|
||
In the `api` service, you'll want to ensure that you've configured your `.env` file and set up a database. Make sure you've created a Postgres databases that matches what's set in the `DATABASE_URL` key in your `.env` file. | ||
Duplicate `.env.sample` > `.env` in the `api` folder and enter the required environment variables. Make sure you've created a Postgres databases that matches what's set in the `DATABASE_URL` key in your `api/.env` file. | ||
|
||
_NOTE_: The `api/.env` and the `scribe/.env` are almost identical, and will share most values. | ||
|
||
Per the `.env`, you'll also need to be connected to an Algorand node, whether in development or production. | ||
|
||
|
@@ -35,7 +37,23 @@ To create an account: | |
./sandbox goal account export -a <ADDRESS> | ||
``` | ||
|
||
- Use the outputted mnemonic within the `.env` file within this project. | ||
- Use the outputted mnemonic as the value for the `FUNDING_MNEMONIC` variable in the `api/.env` and `scribe/.env` files in this project. | ||
|
||
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 | ||
``` | ||
Comment on lines
+42
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a very helpful addition, thank you. |
||
|
||
### Connect to the CMS | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ The purpose of the CMS is to provide content authors the ability to create and m | |
|
||
## Get started | ||
|
||
Once the environment variables have been added to the `.env` file, you'll want to create a new Postgres database with the name specified in the `DB_CONNECTION_STRING` in the `.env` file and create an appropriate schema for `DB_SEARCH_PATH`. You'll also want to set the `ADMIN_EMAIL` and `ADMIN_PASSWORD` values for the initial CMS admin user. | ||
Duplicate `.env.sample` > `.env` in the `cms` folder and enter the required environment variables. Next, you'll want to create a new Postgres database with the name specified in the `DB_CONNECTION_STRING` in the `.env` file and create an appropriate schema for `DB_SEARCH_PATH`. You'll also want to set the `ADMIN_EMAIL` and `ADMIN_PASSWORD` values for the initial CMS admin user. | ||
|
||
If using a single database, create the `cms` schema in your database before running the bootstrap scripts below. | ||
|
||
|
@@ -27,9 +27,11 @@ Start the server locally: | |
nx serve cms | ||
``` | ||
|
||
Optionally, you can seed the database (while the server is running) to generate dummy content: | ||
Optionally, you can seed the database to generate dummy content. | ||
|
||
```bash | ||
# While the server is runnning: | ||
|
||
Comment on lines
+30
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 👍 |
||
cd apps/cms | ||
npm run seed | ||
``` | ||
|
@@ -73,16 +75,16 @@ Running the seed should do this for you, but otherwise the steps are: | |
1. Click on Create Webhook (the round plus button) | ||
1. Enter Scribe Webhook details and click save. | ||
|
||
| Field | Value | | ||
| --------------- | ------------------------------------------------------------------------------------------------------------------------------- | | ||
| Name | `Scribe` (or any name you prefer) | | ||
| Method | `POST` | | ||
| URL | `SCRIBE_URL` + `/webhooks/directus` | | ||
| Status | `Active` | | ||
| Data | Check `Send Event Data` | | ||
| Request Headers | Empty | | ||
| Triggers | Check `Create`, `Update`, `Delete` | | ||
| Collections | Check `Application`, `Collections`, `Countries`, `Homepage`, `Languages`, `NFT Templates`, `Pack Templates`, `Rarities`, `Sets` | | ||
| Field | Value | | ||
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | ||
| Name | `Scribe` (or any name you prefer) | | ||
| Method | `POST` | | ||
| URL | `http://localhost:3002/webhooks/directus` (by default, this is based on the `HOST` and `PORT` variables in the scribe `.env` file) | | ||
| Status | `Active` | | ||
| Data | Check `Send Event Data` | | ||
| Request Headers | Empty | | ||
| Triggers | Check `Create`, `Update`, `Delete` | | ||
| Collections | Check `Application`, `Collections`, `Countries`, `Homepage`, `Languages`, `NFT Templates`, `Pack Templates`, `Rarities`, `Sets` | | ||
|
||
## Data Model Overview | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)