
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.
@citydna/experience
Advanced tools
@citydna/experienceThis package contains common code shared between the app-townhall-experience, app-aboriginal-melbourne-app, and app-melbourne-historical-map apps. There are many common functions & patterns between the two of them. They are centralised here:
AuthQRCodeA QR code generator that hooks into the Amplify API and generates auth tokens. These auth tokens are passed via URL in the QR code, along with other information such as experience, websocket channel, and the stack the user should join.
AvatarAn avatar that generally shows the icon and colour assigned to the anonymous user.
/commonThis contains artifacts common to the experiences and, such as websocket event names, icons used, and helper functions to parse data into the correct shape.
These icons can be auto-converted to TypeScript react components by running the yarn build:icons script when in this folder.
ConfigProviderProvides config for a given experience based on the experience passed in the URL. Config for the apps are stored in the citydna-configs-bucket. These control things such as;
A local copy of these is kept in /apps/citydna-app-townhall-public/public/config.
FeaturePropertiesAccessorProviderContext wrapper to wrap mini-applications that takes a callback that consumes fetched data and returns an object with appropriate parameters.
/hooksblurHashToURL - Helper function that will return a blurhash imageuseBuildProjectionImage - builds an object containing content for the City DNA projection map in Town HalluseCardStack - listens to websocket events and manages a queue of content to display.useRemoteConfig - downloads and stores config, mainly used by ConfigProvider.useEsriModules - a react-friendly wrapper for esri-loader to load in arcgis-js modules.useFeatureLayers - pass in feature layer URLs and get back esri FeatureLayer instances.useImage - a flexible, lazy-loader for images that can handle IIIF, blurhashes, S3 and regular https image URLsuseIsIdle - toggles state to indicate that a timeout length has been exceededuseLoadFullCardFromAgol - often just an ID is provided. This hook loads the remaining information for a card.useMouseIsIdle - toggles state to indicate that the mouse has been idle for a prescribed amount of timeuseRandomFeature - collates a list of IDs on a feature layer and randomly loads one of them.Components shared across the Aboriginal Melbourne and Melbourne Historical Map Town Hall experiences.
TourCardThe small card that pops up when a user taps a content item in citydna-app-townhall-* apps.
TourCardStackA managed stack of TourCards that uses useCardStack to track and visualise content waiting in a queue.
FAQs
Common components for the Melbourne Town Hall CityDNA experience
We found that @citydna/experience demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.