codes designing for developing smart cupboard application