public function install() : ApplicationInterface
    {
        try{
            // resolve module dependencies
            $resolved_modules = (new ModuleDependencyResolver($this->required_modules))->resolve();

            // install modules
            $this->installModules($resolved_modules);

            return $this;
        }
        catch(\Throwable $e)
        {
            throw new ApplicationInstallationException(__METHOD__ . ' failed: ' . $e->getMessage() , $e);
        }
    }