Repository navigation
feat(api): LocalStack S3 testing, path-style storage, dist boot + JWT TTL fixes - #55
Merged
Merged
Conversation
…treat numeric JWT TTLs as seconds
This was referenced Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Test the self-hosted LocalStack (AWS simulator) against apps/api and fix what it surfaced.
LocalStack storage (6e8b526)
R2_FORCE_PATH_STYLEenv →forcePathStyleon the S3 client — required because every client defaults to virtual-host addressing, which DNS-fails against LocalStack (R2 unaffected, default staysfalse)webdevstudios-storage(waswebdevstudios, matching no app config); dropped SQS/SNS/DynamoDB/SecretsManager seeds — nothing in any app consumes them; compose scoped toSERVICES=s3bun run smoke:localstack— boots the real StorageService (put → get → delete) against LocalStackBugs found by the HTTP boot smoke (4e6478e)
bun run startcrashed on main (Nest can't resolve CartService deps): tsc keeps@/*specifiers in emitted JS; bun resolved them fromsrc/via the dev tsconfig while Nest registered providers fromdist/— two class identities, DI explosion. The Dockerfile already worked around this with a runtime tsconfig; local scripts never got the fix. Nowbuildwritesdist/tsconfig.json(aliases resolve intodist, same mechanism as the image),start= build +bun dist/main.js,dev/start:debug=bun --watch src/main.ts. (tsc-alias was evaluated and rejected: it mangles the@prisma/clientmapping.)jsonwebtokenparses bare numeric strings as milliseconds, soJWT_ACCESS_TOKEN_EXPIRES_IN=3600meant 3.6s. Numeric config now means seconds;5m/7d-style values pass through unchanged. Regression spec added.Verified end-to-end
bun run start(compiled dist) → csrf → login →PATCH /v1/users/avatar(PNG → sharp → WebP) → object visible viaawslocal s3 lson LocalStack → persisted public URL fetches 200. Token TTL now 3600s. Pre-commit hook: api 215 / axum 45 / elysia 39 / effect 39 / infra 9 tests green.Local repro
127.0.0.1:4566(any creds), bucketwebdevstudios-storageapps/api/.env:R2_ENDPOINT=http://127.0.0.1:4566,R2_FORCE_PATH_STYLE=true, dummyR2_*keyssmoke:localstack