-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support for uploading, viewing, and deleting files from cloudfl…
…are (#22) * git: update git ignore wildcard to only .env.local * config: add an example .env file * docs: add troubleshooting, script table, and updated installation steps * deps: S3 client, req presigner, and axios * db: add a new course material data model and migrate * ui: add sonner HOC <Toaster/> * aside: allow signing out of the application * ci: update environment vars in workflow build step * api: GET all files and DELETE a specific file * api: GET presigned url for file (allow reads) * api: upload a single pdf * cloudflare client: upload and delete methods * cloudflare client: init, check vars, and get presigned url * types: add pdf record and pdf upload schema w/ zod * ui: page for viewing all objects and deleting single files * ui: page for uploading files to cloudflare * ui: dialog for viewing individual PDFs
- Loading branch information
Showing
21 changed files
with
3,338 additions
and
805 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# To get these values, you can either: | ||
# - Message @Nyumat on Discord | ||
# - Create your own accounts and get the values from the respective services | ||
# - Pinecone: https://www.pinecone.io/ | ||
# - OpenAI: https://platform.openai.com/ | ||
# - Cloudflare R2: https://www.cloudflare.com/products/cloudflare-r2/ | ||
|
||
# Authentication Secrets | ||
AUTH_SECRET="" | ||
AUTH_GOOGLE_ID="" | ||
AUTH_GOOGLE_SECRET="" | ||
|
||
# Database Configuration | ||
DATABASE_URL="postgresql://<username>:<password>@<host>:<port>/<database_name>" | ||
|
||
# Pinecone Configuration | ||
PINECONE_API_KEY="" | ||
PINECONE_INDEX_NAME="" | ||
|
||
# OpenAI Configuration | ||
OPENAI_API_KEY="" | ||
|
||
# Cloudflare R2 Configuration | ||
R2_ACCOUNT_ID="" | ||
R2_TOKEN_VALUE="" | ||
R2_ACCESS_KEY_ID="" | ||
R2_SECRET_ACCESS_KEY="" | ||
R2_URL="https://<account_id>.r2.cloudflarestorage.com" | ||
R2_BUCKET_NAME="" | ||
R2_TOKEN_NAME="" |
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
Oops, something went wrong.