Scaffold h4ckath0n OneShot app, implement secure one-time upload flow, and relocate app to repo root - #2
Merged
MinecraftFuns merged 3 commits intoMar 24, 2026
Conversation
Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com> Agent-Logs-Url: https://github.com/BTreeMap/OneShot/sessions/8e83952b-880d-4a32-8e75-27e2d4ec59da
Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com> Agent-Logs-Url: https://github.com/BTreeMap/OneShot/sessions/8e83952b-880d-4a32-8e75-27e2d4ec59da
Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com> Agent-Logs-Url: https://github.com/BTreeMap/OneShot/sessions/8e83952b-880d-4a32-8e75-27e2d4ec59da
Copilot created this pull request from a session on behalf of
MinecraftFuns
March 24, 2026 02:57
View session
MinecraftFuns
marked this pull request as ready for review
March 24, 2026 02:59
MinecraftFuns
approved these changes
Mar 24, 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.
This PR scaffolds the OneShot full-stack app from the
h4ckath0ntemplate and implements the secure one-time upload architecture end-to-end. It also relocates the generated project fromoneshot-app/into repository root (api/,web/) and fixes CI path assumptions accordingly.Backend: ID generation + schema for one-shot uploads
api/app/rng.pywith:new_file_id()(32-char base32,fprefix)new_oneshot_token_id()(32-char base32,tprefix)is_file_id()/is_oneshot_token_id()validatorsapi/app/uploads/models.py:OneShotToken(id,is_used,created_by_id, optionaltarget_email)FileMetadata(id,original_filename,mime_type,size_bytes, uniquetoken_id)Backend: secure API flow
api/app/uploads/router.pyand mounted under/api.POST /api/admin/oneshot-tokens:require_admin)target_emailPOST /api/oneshot/upload:UPDATE ... WHERE is_used = false ... RETURNINGLOCAL_UPLOAD_DIR / <new_file_id>with 1MB chunks and no extensionFileMetadatatied to tokenFrontend: OneShot public upload page
web/src/pages/OneShotUpload.tsx.window.location.hash(#token=...) on client only.IDLE | UPLOADING | SUCCESS | ERROR_INVALID_TOKEN | ERROR_UPLOAD_FAILEDFormDatato/api/oneshot/uploadwith `Authorization: ******/oneshotand exported via pages index.Tests for required adversarial/security behavior
api/tests/test_oneshot.py:new_file_id()formatweb/src/pages/__tests__/OneShotUpload.test.tsx:Authorizationheader in upload requestCI + repository layout alignment
.github/workflows/ci.ymljobs for:uv run pytestinapi/npm run testinweb/oneshot-app/to root-levelapi/andweb/to match repository expectations; updated CI working directories and cache paths accordingly.