https://github.com/mark-pitblado/dwca-router
Find a digital DwC occurrence record no matter where it lives
https://github.com/mark-pitblado/dwca-router
biodiversity-informatics darwin-core
Last synced: 8 months ago
JSON representation
Find a digital DwC occurrence record no matter where it lives
- Host: GitHub
- URL: https://github.com/mark-pitblado/dwca-router
- Owner: mark-pitblado
- License: apache-2.0
- Created: 2024-10-04T23:44:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-15T15:47:36.000Z (over 1 year ago)
- Last Synced: 2025-09-26T21:33:26.913Z (8 months ago)
- Topics: biodiversity-informatics, darwin-core
- Language: TypeScript
- Homepage: https://dwca.net
- Size: 421 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# DwCA Router
Find an occurrence, no matter where it lives.
## Introduction
This application resolves various URL structures used by aggregators and collection management systems so you don't have to. Rather, you encode a *single* piece of information into a QR code and place it next to the specimen. Instead of having to worry about whether a given URL is going to stand the test of time, you pick a router that you would like to use.
### What is the purpose of the router?
The router is simply a hostname that you are designating to be a long-term contact point for occurrence records to reach out to first. This could be through a QR code, or links could be embedded in some way with an occurrence record. It takes in an dwc::occurrenceId and routes it to the appropriate place. There is a public router you can use at , however the application really shines when it is forked and configured for a particular institution. The `dwca.net` resolver needs to ask for various inputs that can be configured as the defaults to speed up the progress greatly if you know what they are.
### Configuration
The application is meant to be configurable with default values, so that the user has to input as few things as possible. For example, if your institution has a Specify instance, you would configure the domain of that instance so that the application does not need to ask. These configurations are placed in `config.ts`.
```typescript
// The values in this file are what are used in dwca.net by default.
export const config = {
resolverDomain: "https://dwca.net",
specifyDomain: "https://sp7demofish.specifycloud.org",
symbiotaDomain: "https://bryophyteportal.org",
qrCodeSize: "150",
qrErrorCorrection: "M",
qrCodeFormat: "png",
};
```
### QR Code Generation
You can generate QR codes using any method, including through label making within an existing Collection Management System. Whichever method you choose for the generation, the code itself should point to the **root** of the router for that particular occurrence.
Template: `{router}/r/{occurrenceId}`
Example: `https://dwca.net/r/4c906ce8-a2bf-425f-8d50-82197e918028`
The `r` is important, and it separates the dynamic route from the root, which can cause increases in loading times if browsers reach out to `/favicon.ico` by default. Bots may also spam the root path for various things.
## Installation
### Clone the repository
```
git clone https://github.com/mark-pitblado/dwca-router
cd dwca-router
```
### Install packages
```
npm install
```
### Run development server
```
npm run dev
```
### Licenses
The code in this repository is released under the Apache-2.0 License. The dwca-router logo `assets/logo` is licensed to Mark Pitblado from the Noun Project under a Royalty-Free License.