Coder Social home page Coder Social logo

amt-front-end's Introduction

ALBINA COMMUNITY ARCHIVE - Public-Facing Front End

This is a Next.js project bootstrapped with create-next-app.

This interactive and complete archive is accessible to the public and utilizes the API at https://github.com/spbovarnick/amt-admin-1.0.

Local Development

Locally this app runs on port 3333; amt-admin-1.0, which runs on port 3000, also needs to be running to hydrate amt-front-end with data.

Your .env file should include the following variables:

  • NEXT_PUBLIC_DEV_API_URL
  • NEXT_PUBLIC_DEV_API_URL
  • NEXT_PUBLIC_DEV_API_URL
  • NEXT_PUBLIC_S3_BUCKET
  • NEXT_PUBLIC_PROD_CLOUDFRONT_DISTRO
  • NEXT_PUBLIC_DOMAIN
  • NEXT_PUBLIC_TARGET_DB

This project's NEXT_PUBLIC_TARGET_DB need to match the value of amt-admin-1.0's to operate correctly in development.

Start the server with npm run dev

NOTE:

In the event that the CloudFront or AWS URLs change, those values need to be updated in both .env and remotePatterns next.config.js. Because this project utilizes Next's Image component, external images need to be validated in this config value.

Deployment

Pushes to main automatically builds new deployments in Vercel. Pushes to other branches will build preview deployments. As such, it's important to be mindful of code pushed to main.

Production loads can be tested by replacing NEXT_PUBLIC_TARGET_DB=localhost with NEXT_PUBLIC_TARGET_DB=production in this project's .env and updating amt-admin-1.0's ENV['TARGET_DB'] environment variable to production in that project's local_env_vars.rb.

Full functionality and production environment behavior of non-main branches can be tested by adding the preview URL to the allowed origins in amt-admin-1.0's config/initializers/cors.rb file.

Third Party Tools

react-responsive-masonry (https://github.com/cedricdelpoux/react-responsive-masonry)[https://github.com/cedricdelpoux/react-responsive-masonry]

classnames (https://github.com/JedWatson/classnames)[https://github.com/JedWatson/classnames]

react-select https://github.com/JedWatson/react-select/tree/master

Axios
Used for API queries.
https://github.com/axios/axios

google-map-react
Used to render custom Google Maps and markers.
https://github.com/google-map-react/google-map-react

use-supercluster
Used with peer dependency supercluster to render marker clusters within the google-map-react component.
https://github.com/leighhalliday/use-supercluster

react-window
Used to create a custom built timeline. react-window virtualizes the large array of rendered timeline items without crashing the browser during interaction.
https://github.com/bvaughn/react-window

react-intersection-observer
React implementation of the Intersection Observer API. Used within the Timeline.jsx component to detect when a timeline card is centered in its scrolling parent and render the card's year information.
https://github.com/thebuilder/react-intersection-observer#readme

zoom-pan-pinch
Used to give users greater access to image file types in the archive modal.
https://github.com/BetterTyped/react-zoom-pan-pinch/tree/master

amt-front-end's People

Contributors

spbovarnick avatar

Watchers

Lee Ritter avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.