Factory mode three-tier structure example project source code CodematicDemoF3