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.
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.
The following environment variables need to be created:
PINATA_JWT
PINATA_GATEWAY
OPENAI_API_KEY
NEXT_PUBLIC_SUPABASE_URL
NEXT_PUBLIC_SUPABASE_ANON_KEY
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.