Collection of tasks to add features or make changes to your app.
To use these, simply create a new task and copy over the title and the description and then hit "Start". Remember that you might have to make changes to the task title and description so the agent can understand how the task relates to your app.
Integrate with any APIs
Integrate with any external API and create an API in your app that reflects the external API which you can use in your app.
Show task content
Title
Set up integration for fetching X from the <api-name> API
Description
Research <link-to-API> and set up a working integration for fetching X from <api-name>
If you are unable to research the link, ask the user to copy-paste the content
or paste a screenshot of the relevant docs in the chat.
The API name should include provider name and resource and
should reflect the endpoint(s) defined in the article
and be well documented, including reference to the original URL.
Defintion of Done:
1. Credentials for the API has been configured and we have validated that we can connect with the API
2. A well-documented API has been created in our app for fetching X from <api-name>
3. The API endpoint has been tested and returns the expected output.
Finally: We should set the API to read-only to avoid changing it once it
has been stabilized.
Add file uploading of large files
Add a file upload form to the app that can handle small and large (> 1 GB) files by uploading files in chunks.
Show task content
Title
Create an reusable upload form that supports large files and saved them to
the internal storage
Description
Create an upload form that takes in a large file >100MB and uploads it to
the apps internal storage using the Databutton SDK.
The API is running on Cloud Run which has a limitation on 30 MB per
POST request which means that we need to make the upload in chunks.
The chunks should be stored in memory, while the final file should be
stored in the apps internal storage.
Definition of Done:
1. A form where I can upload large files
2. An endpoint that receives file chunks and builds up the file again
3. An endpoint for retrieving the file
Set up Slack OAuth flow
A task to set up basic Slack Oauth flow from your app so you can use the Slack APIs.
Show task content
Title
Implement Slack OAuth flow for retrieving an access token
Description
Our Slack app ID is: <app-id>
# Flow:
https://api.slack.com/authentication/oauth-v2
## Requesting scopes:
https://slack.com/oauth/v2/authorize?scope=incoming-webhook,commands&client_id=1722552209095.8657824327024
When requesting scopes, you also need to tell Slack where to send your temporary authorization code afterward. Include a redirect_uri parameter in the URL above. The redirect_uri is where Slack will send the user back to, along with the temporary authorization code, once the user okays your app. The redirect_uri must use HTTPS. Alternatively, you can configure a Redirect URL in the App Management page under OAuth & Permissions. A Redirect URL must also use HTTPS.
## Waiting for a user to approve your requested scopes
Prepare for the return of a user by listening for HTTP requests at whatever Redirect URL you specified.
## Exchanging a temporary authorization code for an access token
If all goes well, a user goes through the Slack app installation and okays your app with all the scopes it requests. Then, Slack redirects the user back to your specified Redirect URL.
Parse the HTTP request that lands at your Redirect URL for a code field. That's your temporary authorization code, which expires after ten minutes. Check the state parameter if you sent one along with your initial user redirect. If it doesn't match what you sent, consider the authorization a forgery.
Now, you just need to exchange the code for an access token. You'll do this by calling the oauth.v2.access method as follows:
```
curl -F code=1234 -F client_id=3336676.569200954261 -F client_secret=ABCDEFGH https://slack.com/api/oauth.v2.access
```
Once you complete your access call, Slack sends you an HTTP request response containing an access token. It looks something like this:
```
{
"ok": true,
"access_token": "xoxb-17653672481-19874698323-pdFZKVeTuE8sk7oOcBrzbqgy",
"token_type": "bot",
"scope": "commands,incoming-webhook",
"bot_user_id": "U0KRQLJ9H",
"app_id": "A0KRD7HC3",
"team": {
"name": "Slack Pickleball Team",
"id": "T9TK3CUKW"
},
"enterprise": {
"name": "slack-pickleball",
"id": "E12345678"
},
"authed_user": {
"id": "U1234",
"scope": "chat:write",
"access_token": "xoxp-1234",
"token_type": "user"
}
}
```
If you requested scopes for a user token, you'll find them with a user access token under the authed_user property.
Definition of done:
1. A modal that pops up with request to start the Slack Oauth flow
2. Waiting for Oauth flow to succeed
3. Store access token in local storage after completion