Skip to content

Commit 57c12b1

Browse files
committed
Merge branch 'main' into copilot/fix-53
2 parents d8d1bd0 + b48e6f9 commit 57c12b1

56 files changed

Lines changed: 4610 additions & 5807 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/CLAUDE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to AI assistants when working with code in this repository.
4+
5+
## Project Overview
6+
7+
RERUM API v1 is an open source Node.js/Express RESTful API server for the RERUM digital object repository. It stores any valid JSON object but prefers JSON-LD objects such as Web Annotations (https://www.w3.org/TR/annotation-model/) and IIIF Presentation API (https://iiif.io/api/presentation/3.0/) resources. The system emphasizes open access, attribution, versioning, and compliance with Linked Data standards. It's responses follow RESTful best practices (https://restfulapi.net/http-status-codes/). It is maintained by the Research Computing Group at Saint Louis University (https://www.slu.edu/research/faculty-resources/research-computing/index.php).
8+
9+
## Common Gotchas
10+
11+
1. **Semicolons:** This codebase avoids unnecessary semicolons—follow existing style
12+
2. **Guard clauses:** Prefer early returns over nested if/else for clarity
13+
3. **Optional chaining:** Use `?.` and `??` operators when appropriate
14+
4. **Node version:** Requires Node.js 22.20.0+ (specified in package.json engines). Prefer to use active Node LTS release.
15+
5. **ES2015 syntax:** Uses modern ES2015 javascript sytax
16+
5. **Import statements:** Uses ES6 modules (`import`), not CommonJS (`require`)
17+
6. **Controller returns:** Controllers call `next(err)` for errors and `res.json()` for success—don't mix both
18+
7. **Version chains:** History and since queries follow bidirectional version relationships through prime, previous, and next properties
19+
20+
## Additional Resources
21+
22+
- Project homepage: https://rerum.io
23+
- Public production instance: https://store.rerum.io
24+
- Public development Instance: https://devstore.rerum.io
25+
- RERUM API Document: https://store.rerum.io/API.html
26+
- Repository: https://github.com/CenterForDigitalHumanities/rerum_server_nodejs
27+
- Auth0 setup: Contact research.computing@slu.edu
28+
29+
## Additional Developer Preferences for AI Assistant Behavior
30+
31+
1. Do not automatically commit or push code. Developers prefer to do this themselves when the time is right.
32+
- Make the code changes as requested.
33+
- Explain what changed and why.
34+
- Stop before committing. The developer will decide at what point to commit changes on their own. You do not need to keep track of it.
35+
2. No auto compacting. We will compact ourselves if the context gets too big.
36+
3. When creating documentation do not add Claude as an @author.
37+
4. Preference using current libraries and native javascript/ExpressJS/Node capabilities instead of installing new npm packages to solve a problem.
38+
- However, we understand that sometimes we need a package or a package is perfectly designed to solve our problem. Ask if we want to use them in these cases.
39+
5. We like colors in our terminals! Be diverse and color text in the terminal for the different purposes of the text. (ex. errors red, success green, logs bold white, etc.)
40+
6. We like to see logs from running code, so expose those logs in the terminal logs as much as possible.
41+
7. Use JDoc style for code documentation. Cleanup, fix, or generate documentation for the code you work on as you encounter it.
42+
8. We use `npm start` often to run the app locally. However, do not make code edits based on this assumption. Production and development load balance in the app with pm2, not by using `npm start`

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RERUM API v1 is a NodeJS web service for interaction with the RERUM digital obje
2828
3. **Create .env configuration file** (required for operation):
2929
```bash
3030
# Create .env file in repository root
31-
RERUM_API_VERSION=1.0.0
31+
RERUM_API_VERSION=1.1.0
3232
RERUM_BASE=http://localhost:3005
3333
RERUM_PREFIX=http://localhost:3005/v1/
3434
RERUM_ID_PREFIX=http://localhost:3005/v1/id/

.github/workflows/cd_dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Setup Node.js
2626
uses: actions/setup-node@master
2727
with:
28-
node-version: "22"
28+
node-version: "24"
2929
- name: Cache node modules
3030
uses: actions/cache@master
3131
env:
@@ -50,7 +50,7 @@ jobs:
5050
strategy:
5151
matrix:
5252
node-version:
53-
- 22
53+
- 24
5454
machines:
5555
- vlcdhp02
5656
runs-on: ${{ matrix.machines }}

.github/workflows/cd_prod.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Node.js
1313
uses: actions/setup-node@master
1414
with:
15-
node-version: "22"
15+
node-version: "24"
1616

1717
# Speed up subsequent runs with caching
1818
- name: Cache node modules
@@ -36,7 +36,7 @@ jobs:
3636
strategy:
3737
matrix:
3838
node-version:
39-
- 22
39+
- 24
4040
machines:
4141
- vlcdhprdp02
4242
runs-on: ${{ matrix.machines }}

.github/workflows/claude.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Claude Code
2+
on:
3+
issues:
4+
types: [opened]
5+
issue_comment:
6+
types: [created]
7+
pull_request_review:
8+
types: [submitted]
9+
pull_request_review_comment:
10+
types: [created]
11+
12+
jobs:
13+
claude:
14+
if: |
15+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
16+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
18+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
pull-requests: write
23+
issues: write
24+
id-token: write
25+
actions: read
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v5
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Run Claude Code
33+
id: claude
34+
uses: anthropics/claude-code-action@v1
35+
with:
36+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
37+
show_full_output: true
38+
# trigger_phrase: "claude do the needful"

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ npm install
3939
Create a file named `.env` in the root folder. In the above example, the root is `/code_folder/rerum_api`. `/code_folder/rerum_api/.env` looks like this:
4040

4141
```shell
42-
RERUM_API_VERSION = 1.0.0
42+
RERUM_API_VERSION = 1.1.0
4343
COLLECTION_ACCEPTEDSERVER = acceptedServer
4444
COLLECTION_V0 = annotation
4545
AUDIENCE = http://rerum.io/api

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ npm install
6161
```
6262

6363
#### Create the Configuration File
64-
Create a file named `.env` in the root folder. In the above example, the root is `/code_folder/tiny_things`. `/code_folder/tiny_things/.env` looks like this:
64+
Create a file named `.env` in the root folder. In the above example, the root is `/code_folder/rerum_api`. `/code_folder/rerum_api/.env` looks like this:
6565

6666
```shell
67-
RERUM_API_VERSION = 1.0.0
67+
RERUM_API_VERSION = 1.1.0
6868
RERUM_BASE = URL_OF_YOUR_DEPLOYMENT
6969
RERUM_PREFIX = URL_OF_YOUR_DEPLOYMENT/v1/
7070
RERUM_ID_PREFIX = URL_OF_YOUR_DEPLOYMENT/v1/id/

0 commit comments

Comments
 (0)