Arctos Developers Guide

Tips, tricks, and conventions for developing Arctos code

CSP

Write code as if Arctos had a very restrictive Content Security Policy.

Database Connection

Do not write (or make significant updates to) application UI which connects directly to the database; all UI interaction should go through an API.

Displaying Attributes

When possible, attribute UI components should be displayed in the order:

  1. attribute_type
  2. attribute_value
  3. attribute_units
  4. attribute_determiner
  5. attribute_method
  6. attribute_date
  7. attribute_remark

(ref: https://github.com/ArctosDB/arctos/issues/9637)

Attributes as JSON should also use these keys. All are text except attribute_determiner, which is an object built with function getAgentJSON() and consisting of keys:

NOTE: Some CSV tools will not maintain suggested order, and Arctos JSON (PG datatype JSONB) has no “column order.” We can do no more that attempt to suggest order in many cases.

URLS

Includes

Files in /images and /includes are cached on the proxy. To force refresh, use a new URL eg src="/includes/file.js?v1

CSS

Component Loaders

(ref: https://github.com/ArctosDB/dev/issues/110)

Identifier Convention

Expand Select

This toggles MULTIPLE for a SELECT of id “accn_status”:

<span data-ctl="accn_status" class="ui-icon ui-icon-arrow-4-diag expandoSelect"></span>

Button + HREF

<a href="somepage.cfm"><input type="button" class="lnkBtn" value="Some Text"></a>

Code Table Definer

<span class="infoLink" onclick="getCtDocVal('cttaxon_name_type','taxon_name_type');">Define</span>

where cttaxon_name_type is the relevant code table and taxon_name_type is the ID of the element being defined.

Or as a label

<label class="likeLink" onclick="getCtDocVal('ctcataloged_item_type','cataloged_item_type');" for="cataloged_item_type">
   Catalog Item Type
</label>

Pick/select Inputs

Color Codes

Colors are defined in style.css. Use variables in code - background-color: var(--arctoslightblue); not background-color: #F6F8FC;

Logos

Logos are in the images folder of the /ArctosDB/arctos-assets/ repository.

last_usr and last_chg

Some tables have a lastuser and lastdate field, which generally exist to be picked up by subsequent actions particularly when a script is running on behalf of a user. These should default to meaningful values when a human is pushing buttons, but PG’s environment can be a little wonky (and the test and prod DBs occasonally do not share settings). Best practice is to provide these values explicitly:

Updated: 2026-10-13
Contributors: Dusty L. McDonald