This repo has the contracts which interact with Chainlink VRF (Verifiable Random Function) that creates a random number and the contract parse the digits of the random number.
Please consider checking Crylot Frontend
That project is the frontend of this contract made it with React.