Skip to content

Latest commit

 

History

History

www

PhyloPic Webapp

This Next.js application allows users to find and download freely reusable silhouette images of organisms.

The app is hosted at https://www.phylopic.org and will eventually move to https://www.phylopic.org.

Getting started

See instructions in the PhyloPic project README for setting up the monorepo project.

Environment variables

The following environment variables are required. They may be stored in .env.local in the root of this project.

Variable Name Description
NEXT_PUBLIC_API_URL Root URL of the PhyloPic API (https://api.phylopic.org)
NEXT_PUBLIC_CONTACT_CONTRIBUTOR_UUID UUID for the contributing user that is also the site's contact point (060f03a9-fafd-4d08-81d1-b8f82080573f)
NEXT_PUBLIC_CONTRIBUTE_URL Root URL of the PhyloPic: Contribute website (https://contribute.phylopic.org)
NEXT_PUBLIC_ROOT_UUID ID for the root phylogenetic node (8f901db5-84c1-4dc0-93ba-2300eeddf4ab)
NEXT_PUBLIC_WWW_URL Root URL of the main PhyloPic website (https://www.phylopic.org)
REVALIDATE_TOKEN Secret key for Next.js on-demand revalidation
S3_ACCESS_KEY_ID Amazon Web Services S3 access key ID
S3_REGION Amazon Web Services S3 region
S3_SECRET_ACCESS_KEY Amazon Web Services S3 secret access key

The following environment variables are optional:

Variable Name Description
NEXT_PUBLIC_EOL_API_KEY Encyclopedia of Life API key
NEXT_PUBLIC_GOOGLE_MEASUREMENT_ID Measurement ID for Google Analytics

Linting

To clean up formatting for source files:

yarn lint

Running locally

To run a development version on your local machine, on port 3000:

yarn dev

Then run the production version locally, on port 3000:

yarn build && yarn start

Deploying

To deploy to www.phylopic.org, use Git to set the @phylopic/www/prod branch to the desired commit, then push to origin.

git push origin @phylopic/www/prod

The app will deploy through Vercel.

Authors

License

This project is licensed under the MIT License.