Architecture and overview
This article gives a brief overview of all of the different components that makes up MeeseOS.
Codebase
All of the source is written in ES6+. Dependencies are managed with npm.
Client-side scripts are written as ECMAScript Modules (ESM), transpiled with Babel and CSS is written in Sass. Finally bundled with Webpack.
The server-side scripts are written as CommonJS Modules and runs purely on Nodejs.
Testing is done with ESLint, Stylelint and Jest.
Overview
MeeseOS is a modular Web Desktop framework that consists of two parts: a client and a server.
The client can run independently from the server, but the server provides a lot of features like persistent settings, authentication and backend filesystems.
Server runs on Express and Nodejs (version 12 or later)
Features are implemented via service providers so you can extend, replace or remove most features on your own.
Simplified diagram of components and their relation.
These are the standard used core libraries:
- https://github.com/meeseOS/meeseOS/tree/master/backend/common - Base (used in both client & server)
- https://github.com/meeseOS/meeseOS/tree/master/frontend/client - Client Core & Services
- https://github.com/meeseOS/meeseOS/tree/master/backend/server - Server Core & Services
- https://github.com/meeseOS/meeseOS/tree/master/development/cli - CLI utilities
- https://github.com/meeseOS/meeseOS/tree/master/frontend/gui - GUI components
- https://github.com/meeseOS/meeseOS/tree/master/frontend/dialogs - GUI Dialogs
- https://github.com/meeseOS/meeseOS/tree/master/frontend/panels - GUI Panels
- https://github.com/meeseOS/meeseOS/tree/master/backend/event-emitter - EventEmitter implementation
- https://github.com/meeseOS/meeseOS/tree/master/development/eslint - ESLint configuration
- https://github.com/meeseOS/meeseOS/tree/master/development/stylelint - Stylelint configuration
All source-code follows the semantic versioning spesification.
Installation (Distribution)
The MeeseOS repository contains a boilerplate you can use to build and bundle your own installations and distributions.
It comes with the following structure, that you can modify as you see fit:
docker-compose.yml Docker Compose configuration
entrypoint.sh Docker execution entrypoint
webpack.config.js Webpack building configuration
package.json Dependency definitions
node_modules/ Dependencies (npm package)
dist/ Build output
vfs/ Filesystem storage
src/ Sources
packages/ Custom packages directory
client/
index.js Client bootstrap script
index.ejs Base HTML template
index.scss Base CSS template
config.js Configuration(s)
favicon.png Favicon
server/
index.js Server bootstrap script
config.js Configuration(s)
cli/
index.js CLI bootstrap script
Modules
Modules come in several forms and provides ways to extend base functionality.
See the official extensions for a list of available modules.
Packages
Packages also come in several types.
- Application
- Iframe Application (same as above, but different template)
- Theme
- Icons
The standard structure of a package looks like the following:
webpack.config.js Webpack building configuration
metadata.json Package information
package.json Dependency definitions
index.js Client source
index.scss Client styles
server.js Server source (applications only)
node_modules/ Dependencies (npm package)
dist/ Build output
See the official extensions for a list of available packages.
Webpack
Webpack is used to build and bundle the installation/distribution, modules and packages.
These are some of the plugins and loaders used throughout codebases:
- html-webpack-plugin
- copy-webpack-plugin
- mini-css-extract-plugin
- babel-loader
- file-loader
- sass-loader
- css-loader