Skip to content

amirardalan/synapsekit.com

Repository files navigation

An NFT Gallery built with Next.js and OpenSea. Designed, built, and maintained by @amirardalan

Built with:

Next.js
Emotion
OpenSea
SWR
react-swipeable


Local Development:

  1. Create an .env file for local environment variables. Start with the Site URL and updating updating your timezone:
# Site URL
NEXT_PUBLIC_SITE_URL=http:https://localhost:3000

# OpenSea
OPENSEA_API_KEY=your_api_key_here
OPENSEA_WALLET_ADDRESS=your_wallet_address_here

Add additional local environment variables as needed. Create a version of this for your staging and production environments as needed, these are usually stored on your server.

  1. Install depencies by running yarn

  2. Run the development server:

yarn dev

Open http:https://localhost:3000

Optionally, create a local copy of a production build. (useful for testing generateSitemap.mjs configuration):

yarn build

Obtaining an OpenSea API Key

  • Note: It is no longer a manual request process. You can generate an API Key in the Developer section of your profile.
  • OpenSea Documentation

Testing

  • Jest is configured in jest.config.ts and included in the package.json build script.
  • React Testing Library is included in jest.setup.ts.
  • Verbose test suites will be run and logged at build time.

Run Jest manually:
yarn test