We have to rely on the states, as there is no Federal means of tracking yahoos unless there is a terrorist threat that locals are required to report to the DOJ.
The states must be capable of maintaining reliable data for the purpose of background checks, and hold firearms and weapons dealers liable whenever they fail to deny purchases to statutorily unstable citizens, regardless of whether that person later uses that weapon in an illegal act.
The states also have to be able to share data seamlessly, as they try to do in the case of sex offenders. Wyoming has to have the same technological capacities as California, and Texas must have equivalent personnel capacity to keep track of unstable individuals as Rhode Island.
All of that said, we must remember that high-functioning citizens are still able to function in the workplace, without issue, every day.
Yet when they trip up, say, to the extent that they have to be carried out of the office kicking and screaming after getting terminated, the state and county social service agencies need to know about that, upfront.
Those persons making violent threats on social media? Rather than merely deleting their pages until they pop up with a new one, social media groups should be able to report that behavior to a Federal entity with whatever data they have (IP addresses and whatnot). The Feds, in turn, can help the states investigate to find those persons, so the states can determine what scale of social work is necessary for each individual.
Too often we wait until something bad happens and then work backward to find all the acorns along the trail. The states need to be our squirrels.