Code Monkey home page Code Monkey logo

Comments (3)

benadida avatar benadida commented on May 16, 2024 1

Cool, thanks for these pointers @MorganLove. I don't think we should try to make all of our UUIDs human-readable. That will make them much longer than we strictly need them to be for the purposes of someone typing them in.

Agree that we'll need some work on the backend to store and retrieve the human-readable tokens to UUID correspondences.

from arlo.

MorganLove avatar MorganLove commented on May 16, 2024

@benadida If we are redirecting from a human readable url like /auditboard/blue-elephant-spring to the actual url like /election/{uuid}/board/{uuid} we need to store those correlations in the database. And so we'd need to either generate them on the front end and pass it back when creating audit boards, or have them generated on the back end and returned in the jurisdictions array. And also we'll need to have an endpoint for getting the correlated /election/{uuid}/board/{uuid} url from POSTing a blue-elephant-spring type of token when someone navigates to /auditboard/{human_token}.

(List in original issue updated.)

from arlo.

MorganLove avatar MorganLove commented on May 16, 2024

@benadida I found a library that could generate these sorts of human readable uuids: https://github.com/linus/greg

Here is a port of it for python: https://gist.github.com/prschmid/4447660

Ideally, in order to guarantee that we do not have duplicates issued, they should be generated on the server side and checked to make sure they are unique in the database before being sent to the front end, just in case.

from arlo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.