#429 [RegistrationCertificateFr] feat: add carte grise creation from JSON and AI photo scan#434
Open
evarisk-kilyan wants to merge 1 commit into
Open
Conversation
…n from JSON and AI photo scan Allow creating a registration certificate from a carte grise JSON whose keys are the official rubric codes (A, B, C.1, ..., Z.4): - REST API endpoint POST dolicar/registrationcertificates/fromjson - degraded mode on the quick creation page (JSON file upload) - AI scan on the quick creation page: send a carte grise photo to the configured AI vision model, get the rubrics JSON back and create the card - fill-from-JSON panel on the card edit form (client-side, user reviews then saves) Rubric values are mapped and sanitized (dates, numbers with units, C.4a owner mention, C.4.1 number or name) and an existing draft for the same plate is completed and validated instead of creating a duplicate. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #429
Allow creating a registration certificate from a carte grise JSON whose keys are the official rubric codes (A, B, C.1, ..., Z.4). Rubric A (registration number) is mandatory, null values and unknown rubrics are ignored, and if a draft already exists for the plate it is completed and validated instead of creating a duplicate.
POST dolicar/registrationcertificates/fromjsontaking the carte grise JSON as bodyDOLICAR_AI_VISION_MODEL), the rubrics JSON is extracted and the card is created automaticallyRubric values are sanitized on mapping: dates in
dd/mm/yyyy,dd-mm-yyyyoryyyy-mm-dd, numbers extracted without absorbing units ("1199 cm3" → 1199), C.4a owner mention parsed to boolean, C.4.1 stored as number or name depending on its content.🤖 Generated with Claude Code