https://github.com/datadavev/arkr
Minimal ARK NAAN resolver with introspection
https://github.com/datadavev/arkr
identifier
Last synced: about 1 year ago
JSON representation
Minimal ARK NAAN resolver with introspection
- Host: GitHub
- URL: https://github.com/datadavev/arkr
- Owner: datadavev
- License: apache-2.0
- Created: 2023-04-18T15:36:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-29T18:57:11.000Z (almost 3 years ago)
- Last Synced: 2025-02-02T09:27:41.089Z (over 1 year ago)
- Topics: identifier
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ARKR
A simple ARK NAAN resolver service.
ARKR is a minimalist ARK NAAN resolver service that supports redirection to
registered NAAN targets or introspection (inflection) of a NAAN public record.
Requires a JSON copy of the NAAN public registry information, such as produced
by `naan_reg_json`.
## Operation
To run ARKR locally, setup your python virtual environment then:
```
pip install -r backend/requirements.txt
```
Retrieve the NAAN records as json (currently requires a local copy of `main_naans`):
```
python ../naan_reg_json/naan_reg_json.py -p -f backend/naans ../naan_reg_priv/main_naans
```
Then run the service:
```
cd backend
uvicorn main:app
```
The service may be deployed to any service supporting python WSGI such as Vercel. For example:
```
vercel deploy
```
An example of the service running on Vercel is available at: https://arkr.vercel.app/
## Service Endpoints
| Path | Description |
|--------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`/docs`](https://arkr.vercel.app/docs) | API documentation |
| `/diag/{IDENTIFIER}` | Presents some diagnostics of request processing. E.g. [diag/ark:/12148/bpt6k10733944](https://arkr.vercel.app/diag/ark:/12148/bpt6k10733944) |
| `/{IDENTIFIER}` | Redirects to supplied ARK.
* [`/ark:/12148/bpt6k10733944`](https://arkr.vercel.app/ark:/12148/bpt6k10733944)
* [`/ark:12148/bpt6k10733944`](https://arkr.vercel.app/ark:12148/bpt6k10733944)
* [`/12148/bpt6k10733944`](https://arkr-1-v3111276.deta.app/12148/bpt6k10733944) |
| `/{NAAN}[/][?? \| ?info]` | Returns metadata about the NAAN. Note that if characters beyond a terminating "/" are included then the response is a redirect to the registered location with the provided inflection request.
* [`/ark:/12148/?info`](https://arkr.vercel.app/ark:/12148/?info)
* [`/ark:12148??`](https://arkr.vercel.app/ark:12148??)
* [`/12148/?info`](https://arkr.vercel.app/12148??) |