Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions apps/canva-app/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
CANVA_FRONTEND_PORT=8081
CANVA_BACKEND_PORT=3002
CANVA_BACKEND_HOST=http://localhost:3002 # TODO: replace this with your production URL before submitting your app
CANVA_APP_ID=# TODO: Add your app's ID here from the Canva Developer Portal
CANVA_APP_ORIGIN=# TODO: Add your app's origin here from the "Developer Portal -> Settings -> Security" to enable HMR
CANVA_HMR_ENABLED=FALSE # TODO: set to TRUE to enable HMR

# Effect AI (task-poster) connection
EFFECT_URL=http://localhost:3001
EFFECT_AUTH_KEY="0"
EFFECT_DATASET_ID=# TODO: Add your dataset ID from the Effect AI task poster
EFFECT_FETCHER_INDEX_CLARITY=# TODO: Add the fetcher index for Clarity checks
EFFECT_FETCHER_INDEX_CLICKABILITY=# TODO: Add the fetcher index for Clickability checks
EFFECT_FETCHER_INDEX_COMPARE=# TODO: Add the fetcher index for Compare Versions checks

# How often (ms) the backend refreshes the results CSV from Effect AI
# Lower = fresher results for users, higher = less load on the task-poster
EFFECT_POLL_INTERVAL_MS=60000

# Path to the KV database file for task history persistence
DB_FILE=mydatabase.db

# Canva review only. When TRUE, submissions still rehost images on IPFS but skip
# the Effect task-poster import and auto-complete with synthetic results after
# REVIEW_COMPLETE_DELAY_MS, so a reviewer sees the full submit -> pending ->
# complete flow without real workers. NEVER set TRUE in production (it fakes
# results). Turn off and restart before the app goes public.
REVIEW_MODE=false
REVIEW_COMPLETE_DELAY_MS=10000
11 changes: 11 additions & 0 deletions apps/canva-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.DS_Store
.env
.env.local
.env.prod
.idea
.ssl
*.log*
*.db
**/*/db.json
dist
node_modules
2 changes: 2 additions & 0 deletions apps/canva-app/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true
@jsr:registry=https://npm.jsr.io
1 change: 1 addition & 0 deletions apps/canva-app/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/krypton
21 changes: 21 additions & 0 deletions apps/canva-app/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"singleAttributePerLine": false,
"bracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false,
"embeddedLanguageFormatting": "auto",
"experimentalTernaries": false
}
48 changes: 48 additions & 0 deletions apps/canva-app/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# A message from Canva

By making these software components available to you, our goal is to give you
the right to use the components to build your apps for Canva's ecosystem. See
below for the specific licence terms that apply to your use.

# Licence

Canva Pty Ltd (ACN 158 929 938) ("Canva") owns the copyright in the software and
associated documentation files to which this Licence relates (each a "Software
Component"). Canva reserves all of its rights.

Permission is hereby granted, free of charge, to any person obtaining a copy of
the Software Components ("You"), to use the Software Components, but strictly
subject to the following restrictions and conditions:

1. You must only use the Software Components and any Derivative on the Canva
Platform.

2. You must only use the Software Components and any Derivative for the purpose
of building or updating Permitted Apps, and for no other purpose.

3. You must include a copy of this Licence in all copies of any Software
Component and Derivative.

4. To the fullest extent permitted by law, the Software Components are provided
"as is", without warranty of any kind, express or implied, including but not
limited to the warranties of merchantability, fitness for a particular
purpose and non-infringement. To the fullest extent permitted by law, in no
event shall the authors or copyright holders be liable for any claim,
damages or other liability, whether in an action of contract, tort or
otherwise, arising from, out of or in connection with the Software Components
or any Derivative, or the use of or other dealings in the Software Components
or any Derivative.

5. In this Licence:

(a) "Canva Platform" means the visual communications platform owned and
operated by Canva that is made available on Canva.com (as well as any
sub-domains and international versions) and via mobile applications, desktop
applications, and in other forms provided or made available by Canva;

(b) "Derivative" means any software, document or other material that: (i)
contains any Software Component; and/or (ii) comprises or contains a
derivative, adaptation or substantial part of any Software Component; and

(c) "Permitted App" means a software application that is solely offered to
end-users on the Canva Platform.
Loading