Some way to enter a setup mode allowing to place pieces (probably dragged and dropped from somewhere, or click to toggle between all pieces) and then exiting the setup mode triggers a position validation and only allows to exit the setup/edit mode when the fen is legal.
With some component to help in clearing/emptying the board and to specify en passant square, castling rights, half/full move clocks, etc.
Some way to enter a setup mode allowing to place pieces (probably dragged and dropped from somewhere, or click to toggle between all pieces) and then exiting the setup mode triggers a position validation and only allows to exit the setup/edit mode when the fen is legal.
With some component to help in clearing/emptying the board and to specify en passant square, castling rights, half/full move clocks, etc.