image-thing
This is a Next.js project bootstrapped with create-next-app
.
This project was created for the Pinata Challenge; it's an app which combines Pinata's file storage APIs with OpenAI's LLMs to provide unique features tailored towards image files.
See the submission for the challenge here.
Technology
- Pinata
- OpenAI
- Supabase
- NextJS
Getting Started
Database
One must first set up a database. This application uses Supabase. A table needs to be set up with the following columns:
id int8
created_at timestamptz
upload jsonb
hash text
user_id uuid
is_pinned bool
pinata_id text
pinata_cid_private text
pinata_cid_public text
After that, policies need to be created for SELECT
, UPDATE
, INSERT
, and DELETE
to allow only authorized users
to access rows in the table. The table should have row-level security (RLS) enabled.
Environment Variables
The following environment variables need to be created:
PINATA_JWT
PINATA_GATEWAY
OPENAI_API_KEY
NEXT_PUBLIC_SUPABASE_URL
NEXT_PUBLIC_SUPABASE_ANON_KEY
Starting the App
First, run…