Based on the answers that citizens give to the apps, provided by Alibaba and Tencent, algorithms will try to decide whether or not the person is likely to have coronavirus. The apps then assign a red, yellow or green code to the person, depending on their risk of having the virus, according to Nikkei. If you get a red code, you have to self-quarantine or be quarantined in a facility for 14 days.
And citizens can't lie, because all of the answers they provide about things like hotel stays and travel are cross checked with the government's data and smartphone location data.
Several provinces also have "social credit" systems where people who lie (as well as smoke, jaywalk, etc.) wind up with lower "social credit scores". More provinces are expected to implement similar systems soon.