Use this file to guide you through the setup process. There isn't much to do but if it's your first time, some concepts may be new, so please follow them carefully and reach out if you have any questions.
The instructions in this file are for you. It's important to distinguish the instructions in this file from the instructions in the other files in this folder, which are for Townie.
The prompts that you will enter into Townie are in blockquotes, like this:
I'm a prompt for Townie
When Townie shows you these, copy and paste them into Townie and run them. Townie will use them to build this Val from the ground up, through these layers and features of the Val:
- scaffolding
- Notion & val.town integration health endpoint
- user authentication
- dashboard
- webhook authentication
- caching
- React front end
- metrics collection
Once you're through this runbook, version 1 of this Val will be feature complete and you can add and experiment with new features til your heart's content.
To use this runbook, you'll need to have these things ready:
- A val.town account
- A Remix of this Val in your val.town account
- The environment variables imported into your Remix
Once your environment variables are saved to this Val (i.e., once you've imported vars.env
to your Remix), all of the environment variables are available to the Val and Townie, and val.town and Notion are connected to each other. (Note that environment variables are secret and secure on val.town.)
If you don't have the environment variables, contact your administrator.
This is a look at what the environment variables are, and what they do. (They are not the environment variables themselves; you'll need to get those from your administrator.)
The most important thing to understand about them is that they are required to connect val.town to Notion, and to connect this Val's code to the Notion databases that hold the demo content.
-
NOTION_API_KEY
- Your Notion integration API key -
NOTION_WEBHOOK_SECRET
- Matches the X-API-KEY custom header coming from Notion webhooks to /tasks/* endpoint(s) -
Database environment variables - the keys for the environment variables that hold the ids for the ids for your Notion databases:
project: findings databases: - `FINDINGS_TRANSCRIPTS_DB_ID` - `FINDINGS_QUESTIONS_DB_ID` - `FINDINGS_REPORTS_RAW_DB_ID`
Now that you're through setup, you can instruct Townie to build this Val by pasting prompts into Townie.
In Townie, select this Val, and prompt Townie with this line:
Scaffold this Val with what you see in
/_townie/01-scaffold.md
When Townie completes the scaffolding task, it will tell you what you need to do next. Have fun!
Add auth to this Val with what you see in
/_townie/02-auth.md
Add webhook auth to this Val with what you see in
/_townie/03-webhooks.md