lib shared from frontend to backend