|
| 1 | +# DynamoDB Server Autoloop Goal |
| 2 | + |
| 3 | +## Goal |
| 4 | + |
| 5 | +Implement an Amazon DynamoDB compatible local server for `devcloud`, following `docs/design-dynamodb-compat.md`. |
| 6 | + |
| 7 | +## Why |
| 8 | + |
| 9 | +`devcloud` already has local Mail, S3, GCS, and dashboard foundations. DynamoDB compatibility should add a local AWS SDK / CLI target for table, item, expression, index, stream, transaction, and PartiQL workflows without reaching AWS or depending on DynamoDB Local. |
| 10 | + |
| 11 | +## Acceptance Criteria |
| 12 | + |
| 13 | +1. `devcloud up` starts a DynamoDB JSON API endpoint on the configured local port, defaulting to `127.0.0.1:8000`. |
| 14 | +2. DynamoDB low-level JSON protocol works with `POST /`, `Content-Type: application/x-amz-json-1.0`, and `X-Amz-Target: DynamoDB_20120810.{Operation}`. |
| 15 | +3. Table operations work: `CreateTable`, `DescribeTable`, `ListTables`, `UpdateTable` for supported metadata, and `DeleteTable`. |
| 16 | +4. Item operations work: `PutItem`, `GetItem`, `UpdateItem`, `DeleteItem`, `BatchGetItem`, and `BatchWriteItem`. |
| 17 | +5. `AttributeValue` supports `S`, `N`, `B`, `BOOL`, `NULL`, `M`, `L`, `SS`, `NS`, and `BS` with DynamoDB-compatible JSON response shapes. |
| 18 | +6. Expressions work for the documented MVP: `ConditionExpression`, `UpdateExpression`, `ProjectionExpression`, `FilterExpression`, and `KeyConditionExpression`. |
| 19 | +7. `Query` and `Scan` support `Limit`, `ExclusiveStartKey`, `LastEvaluatedKey`, sort ordering, filters, and projection for tested fixtures. |
| 20 | +8. GSI and LSI metadata, projection updates, and index `Query` / `Scan` work for tested fixtures. |
| 21 | +9. Strict SigV4 mode validates signed AWS SDK / CLI requests without logging credentials, signatures, canonical requests, or payloads. |
| 22 | +10. Existing Mail, S3, GCS, and dashboard behavior remains compatible; `go test ./...` passes. |
| 23 | +11. Dashboard service registry exposes DynamoDB, and `/api/dynamodb/*` can inspect tables, indexes, items, streams, and TTL state. |
| 24 | +12. `VERIFY_STAGE=full bash scripts/dynamodb-autoloop/verify.sh` passes. |
| 25 | + |
| 26 | +## Out of Scope for This Loop |
| 27 | + |
| 28 | +- Real AWS IAM, STS, CloudWatch, CloudTrail, KMS, or external AWS service calls. |
| 29 | +- DynamoDB Local, LocalStack, or other external emulator dependency. |
| 30 | +- DAX protocol. |
| 31 | +- Multi-region global table replication. |
| 32 | +- Real provisioned billing, adaptive capacity, and AWS-managed auto scaling. |
| 33 | +- Full Contributor Insights, Kinesis streaming destination, and S3 import/export behavior. |
| 34 | + |
| 35 | +## Implementation Guidance |
| 36 | + |
| 37 | +- Preserve existing Mail, S3, GCS, and dashboard behavior before broad storage refactors. |
| 38 | +- Prefer small vertical slices with tests. |
| 39 | +- Keep runtime data under `.devcloud/`. |
| 40 | +- Use Go standard library unless a dependency is clearly justified. |
| 41 | +- Keep DynamoDB protocol, service logic, expression parsing, and storage boundaries separate. |
| 42 | +- Do not log credentials, Authorization headers, signatures, canonical requests, item payloads, or other sensitive request bodies. |
| 43 | +- Treat `docs/design-dynamodb-compat.md` as the implementation contract. |
| 44 | + |
| 45 | +NEXUS_LOOP_STATUS: READY |
| 46 | +NEXUS_LOOP_SUMMARY: DynamoDB compatibility loop contract is ready. |
0 commit comments