@kravc/dos-dynamodb
v1.0.2
Published
CRUD interface for DynamoDB table to be used with @kravc/dos service.
Readme
@kravc/dos-dynamodb
DynamoDB-backed CRUD layer for @kravc/dos. Exposes Document and DocumentWithHashId classes that plug into the dos service: define a schema and partition/sort keys, then use create, get, update, delete, and index (with GSI/LSI support) against a DynamoDB table.
Examples (see example/):
- Asset —
Documentwith status filtering, archive/unarchive, and index queries (LSI/GSI). - Activity —
Documentusage with activity-specific attributes and indexing. - Organization —
DocumentWithHashIdwith a fixed partition, list/disable/enable andindexAll.
Install:
npm i --save @kravc/dos-dynamodbList supported DynamoDB table commands:
npx tableDevelopment
Tests require DynamoDB Local to be running on port 8000.
macOS — uses apple/container (requires macOS 26+):
Install container via Homebrew:
brew install apple/apple/containerThen start the service and run tests:
container system start
npm testTo start the container service automatically at login:
cat > ~/Library/LaunchAgents/com.apple.container.start.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apple.container.start</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/container</string>
<string>system</string>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOF
launchctl load ~/Library/LaunchAgents/com.apple.container.start.plistLinux — uses Docker:
npm testnpm run db:up starts the container (skips if already running). npm run db:down stops and removes it.
License
ISC
Revision: March 23, 2026 By: Oleksandr Kravets (@alexkravets)
