This page is about contributing code, for other types of contribution (non technical) see this page. If you want to get involved we can also chat!
Silex is free and open source since 2009, it is up to us to keep it alive and competitive. Contribute to Silex today, give it exposure, help test the beast, add features or fix bugs. Get help from the team on the forums and community chat
Useful links:
To contribute code (features, bug fixes, design changes, etc.) to the Silex code base, you'll need to complete a few steps to get a local working copy of our repository. Below are the steps you'll need to fork, clone, branch, and create a pull request.
Please be sure to conform to the coding standards used throughout our project and bear in mind that, by contributing to this project, you agree to our Code of Conduct.
By contributing to Silex or any related project, you accept that your contribution is licenced with the same licence as the project you contribute to.
Silex is licensed under the AGPL-3.0 and will remain 100% free/libre software.
No CLA, no copyright transfer
By contributing, you keep full ownership of your code.
Silex does not require you to sign a Contributor License Agreement (CLA), and we do not ask for any copyright assignment.
Your contributions are accepted under the AGPL-3.0 license - or the license of the project you are contributing to under the silexlabs organisation, to ensure everyone benefits equally from the software — forever.
In order to keep Silex free/libre we may include or depend on third-party code under these licenses:
MIT
BSD-2-Clause / BSD-3-Clause
ISC
Zlib
Apache-2.0 (only if compatible with AGPL)
These are all compatible with AGPL-3.0 and respect user freedom.
Let's avoid to include or recommend code or plugins that:
Are GPLv2-only (not compatible with AGPL)
Are proprietary, or use a non-commercial clause
Use a Creative Commons license (except CC0)
Rely on a closed-source API or service without a libre self-hosted option
Follow an "open core" model (free tier with locked features, upsell, or SaaS-only logic)
When in doubt, open a discussion in the forums or community chat.
You'll find the main Silex repo in Silex meta repository. This repo has submodules which are also npm workspaces. These submodules are of 3 types
silexlabs/silex-lib
, which is published as an npm package of the same name. It can be included in Javascript or TypeScript projects as an npm dependency, or used as a CLI with npx, more about that in the page Getting started with self hostingsilexlabs/silex-platform
, silexlabs/silex-desktop
, silexlabs/silex-puter
are user-facing apps that are deployed respectiveley to Silex official instance, Silex desktop release page (coming soon) and Silex puter appYou'll find a table recap of the differences between
silexlabs/silex-platform
andsilexlabs/silex-lib
on silexlabs/silex-platform README
User facing apps prereleases (for testing) use versions like 3.7.0-1
. They are automatically deployed:
Stable releases share the same version across all user facing apps (e.g. 3.7.0
)
v3.silex.me
, etc.) by a github actionCore libraries and plugins have independent versions created from their respective repos
The client-side is primarily handled by the files in the src/ts/client
directory. The main entry point is defined in index.ts
, which initializes the Silex application. The config.ts
file contains the SilexConfig
class that holds the configuration for the client-side application, including the GrapesJS editor configuration and the client config URL. The grapesjs
directory contains the GrapesJS editor configuration and plugins. The utils.ts
file contains utility functions.
The server-side is primarily handled by the files in the src/ts/server
directory. The main entry point is defined in index.ts
, which initializes the server-side application. The config.ts
file contains the ServerConfig
class that holds the configuration for the server-side application. The express.ts
file sets up the Express.js application and starts the server. The cli.ts
file handles the command-line interface for the server, parsing command-line arguments and setting environment variables accordingly. The events.ts
file defines events for the startup process.
There are also several useful plugins that never got taken out as separate repo. Check them out in src/ts/plugins
.
Fork the meta repo
This repo holds all Silex code, including the plugins and optional libraries we maintain.
Open the Silex meta repository in GitHub. Click Fork
in the upper right corner of the window. This adds a copy of the Silex repository to your GitHub account.
Clone the fork of the meta repo
Now you'll make a local copy of the repository. Check the instructions in the README file, in the "installation" section.
Fork the project you need to modify
Let's say you want to change some code in the silexlabs/silex-lib
repo (Silex core)
Open the Silex Project in GitHub. Click Fork
in the upper right corner of the window. This adds a copy of the Silex repository to your GitHub account.
Set the upstream repository
Assign Silex as the upstream repository. Setting the upstream repository tells Git where to pull from when you use the pull command (which you'll do in the next step).
cd packages/Silex
git remote add upstream https://github.com/<your-github-id>/silex-lib.git
Run the project
Before running Silex, you might need to build the project.
npm run build
npm start
This will build and start the Silex server, Silex will be available on http://localhost:6805
.
Or better, use npm run watch
instead of npm run build
to keep rebuilding the project when you edit a file.
For other projects, there my be different npm scripts, just run npm run
to see what script to use to build and start the project.
Make your changes
Once changes are complete, use one of the following commands to stage the changes to be committed.
git add <file-name>
Once your changes are ready and all files you wish to commit have been added (step #5), you'll create your commit.
git commit -m "This is a short message about the change made in this commit"
Rebase the upstream branch into your local branch(es)
Do this from time to time to keep your local repository up to date with the latest changes in the upstream repository. This is especially important before you start making changes.
This assumes that your local folder is "clean", that all your work is committed.
git pull --rebase upstream dev
Push your local branch up to your fork
git push origin dev
Create a pull request
Head here to submit your code for review: https://github.com/<your-github-id>/silex-lib/compare
or check this doc on how to create your pull request, making sure the title is as clear and descriptive as possible.