Skip to content

Free decentralized storage and bandwidth for NFTs on IPFS and Filecoin BETA.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENCE-APACHE
MIT
LICENCE-MIT
Notifications You must be signed in to change notification settings

Manik-Jain/nft.storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nft.storage

Unlimited storage of NFT data on IPFS, backed by Filecoin and provided free to NFTHack participants during the hackathon.

Table of Contents

site Setup

Cloudflare Workers CLI

yarn global add @cloudflare/wrangler
wrangler login
# when using personal accounts you may need to manually change the `account_id` inside `wrangler.toml` 

Auth0 account

Go to auth0.com create an account and create two "REGULAR WEB APPLICATION" applications one for dev and another for production. In the settings of each application you will find the secrets needed to complete the initial setup.

Cloudflare Workers initial setup:

This only needs to be ran once when setting up from scratch.

Development Setup

Open wrangler.toml and delete everything inside the root kv_namespaces array so wrangler doesn't get confused.

cd site
yarn install
# dev and preview KVs
wrangler kv:namespace create USERS --preview
# cli output something like: `{ binding = "USERS", preview_id = "7e441603d1bc4d5a87f6cecb959018e4" }`
# but you need to put `{ binding = "USERS", preview_id = "7e441603d1bc4d5a87f6cecb959018e4", id = "7e441603d1bc4d5a87f6cecb959018e4" }` inside the `kv_namespaces`.
wrangler kv:namespace create SESSION --preview
# same as above
wrangler kv:namespace create CSRF --preview
# same as above
wrangler kv:namespace create NFTS --preview
# same as above

Go to /site/src/constants.js uncomment the first line and run wrangler publish.

# dev and preview secrets
wrangler secret put AUTH0_DOMAIN # Get from auth0 account
wrangler secret put AUTH0_CLIENT_ID # Get from auth0 account
wrangler secret put AUTH0_CLIENT_SECRET # Get from auth0 account
wrangler secret put SALT # open `https://csprng.xyz/v1/api` in the browser and use the value of `Data`
wrangler secret put PINATA_JWT # Get from Pinata

Go to /site/src/constants.js comment the first line and run wrangler publish.

Production Setup [env.production]

# production KVs
wrangler kv:namespace create USERS --env production
# Follow the instructions from the cli output
wrangler kv:namespace create SESSION --env production
# Follow the instructions from the cli output
wrangler kv:namespace create CSRF --env production
# Follow the instructions from the cli output
wrangler kv:namespace create NFTS --env production
# Follow the instructions from the cli output
wrangler secret put AUTH0_DOMAIN --env production # Get from auth0 account
wrangler secret put AUTH0_CLIENT_ID --env production # Get from auth0 account
wrangler secret put AUTH0_CLIENT_SECRET --env production # Get from auth0 account
wrangler secret put SALT --env production # open `https://csprng.xyz/v1/api` in the browser and use the value of `Data`
wrangler secret put PINATA_JWT --env production # Get from Pinata
wrangler publish --env production

site Usage

Local development

cd site
yarn install
yarn start

Deploy

yarn deploy

About

Free decentralized storage and bandwidth for NFTs on IPFS and Filecoin BETA.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENCE-APACHE
MIT
LICENCE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.6%
  • TypeScript 1.5%
  • Shell 1.3%
  • Other 1.6%