implement the basic architecture of memedai