Skip to content

Silex for hosting providers

Alex Hoyau edited this page May 6, 2019 · 18 revisions

This page is a work in progress, please contribute!

Before reading this, start with the page "How to Host An Instance of Silex".

Context

This documentation is dedicated to developers who want to provide a website builder to their users, white labeled or not. It is also about how to provide the users with a hosting, i.e. do not use Dropbox or FTP or Github, etc. but your hosting instead.

This is a work in progress and will make it possible to use Silex as any other website builder (Wix or squarespace...), so that your users do not need an FTP account or a Github account.

Links

As @godzone talked about it, hosting companies need to have their users save their websites to their purchased space at the hosting company.

Integrate Silex with your infrastructure

The idea we have is to offer hosting to your Silex users and not offer the other ways to store data such as Github or dropbox. For that you can create a Unifile service which wraps a Unifile service and changes the authentication and the read/write operations to use your infrastructure.

We have considered wrapping the fs service to write to a mounted drive on the silex server, and @JbIPS is working on a secured service which writes with the user access rigths. SFTP seems the easier to integrate Silex without security issue - the host, port, encryption would be hard coded in this wrapper and the user would need to know their credentials of their ftp account.

Please check the page Integrate Silex with your infrastructure for details on how to achieve that.

Add custom components

You can add/remove components to the "+" menu of Silex for your users to use. For example an agency may want specific integrations, forms which work with a CRM, animated components...

Please check the page about Silex components here.

Add custom templates

You can add your own templates, for your users only. Please check the page about Silex templates here.

Ways to customize Silex

For light cusomization such as activate/deactivate Unifile service, you can use the env vars.

For more advanced customization such as adding custom hosting provider, the best way to go is to have a separate repository, with Silex as a npm dependency. This is described here:

package.json

...
  "dependencies": {
    "silex": "github:silexlabs/Silex#master",
    "myunifileconnector": "github:you/yourunifileconnector#master"
  }
...

index.js file:

const SilexServer = require('./silex');
const config = require('silex/EnvVarsConfig');
const silex = new SilexServer(config);
// add unifile connectors
silex.ceRouter.addService(...)
// add custom routes
silex.app.get(...)

Add

WARNING: Support for Silex v2 has stopped. Try Silex v3 alpha, Read about it, Subscribe to the newsletter

Clone this wiki locally