Repository: os-js/OS.js
Branch: master
Commit: 0aa874455e1c
Files: 20
Total size: 29.4 KB
Directory structure:
gitextract_uwb8vc1n/
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ ├── node.yml
│ └── test.yml
├── .gitignore
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE
├── README.md
├── docker-compose.yml
├── entrypoint.sh
├── package.json
├── src/
│ ├── cli/
│ │ └── index.js
│ ├── client/
│ │ ├── config.js
│ │ ├── index.ejs
│ │ ├── index.js
│ │ └── index.scss
│ ├── packages/
│ │ └── .gitignore
│ └── server/
│ ├── config.js
│ └── index.js
└── webpack.config.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: andersevenrud
patreon: andersevenrud
open_collective: osjs
liberapay: os-js
custom: https://paypal.me/andersevenrud
================================================
FILE: .github/workflows/node.yml
================================================
name: Node tests
on:
push:
branches:
- master
pull_request:
jobs:
build:
strategy:
matrix:
version: [12, 13, 14, 15, 16]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.version }}
- run: npm ci
- run: npm run package:discover
- run: npm run build
================================================
FILE: .github/workflows/test.yml
================================================
name: Lint tests
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Lint tests (node latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '13.x'
- run: npm install
- run: npm run eslint
- run: npm run stylelint
================================================
FILE: .gitignore
================================================
.swp
.tern-*
node_modules
/packages.json
/sessions
/.env*
/session-store.db
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
If you want to contribute, but not sure what to do, here's a list of things that I always need help with:
* Translations
* Bug-hunting
* Finding security problems
* Themes and general graphics
* Website design (like the homepage and manuals)
* Documentation
If you need help, or just up for some general discussion, head into the [community forums](https://community.os-js.org/) or [community chat](https://gitter.im/os-js/OS.js).
See [manual](https://manual.os-js.org/v3/development/) for more information.
You can view all open issues on github, which is usually a good starting point if you want to start contributing:
https://github.com/search?q=org%3Aos-js+is%3Aopen+is%3Aissue+archived%3Afalse&type=Issues
# Support
You can also donate or become a patreon, which helps out covering server costs and potentially make it possible to put out bounties:
* **Sponsor on [Github](https://github.com/sponsors/andersevenrud)**
* **Become a [Patreon](https://www.patreon.com/user?u=2978551&ty=h&u=2978551)**
* **Support on [Open Collective](https://opencollective.com/osjs)**
* Donate via [Liberapay](https://liberapay.com/os-js/)
* Donate via [PayPal](https://paypal.me/andersevenrud)
Or via Bitcoin: bc1q8wd9e9xlppr7nft09n4guz89j0cp9gepl606s0
<img src="https://manual.os-js.org/wallet.png" alt="bitcoin qr code" width="177" height="177">
# Members
If you are a member of the official OS.js developer Team:
* [Discussions](http://community.os-js.org/c/team)
* [Tasks](https://trello.com/osjs)
* [Chat](https://gitter.im/os-js/OS.js/teams)
================================================
FILE: Dockerfile
================================================
#
# OS.js - JavaScript Cloud/Web Desktop Platform
#
# Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @author Anders Evenrud <andersevenrud@gmail.com>
# @licence Simplified BSD License
#
# THIS IS ONLY INTENDED FOR DEVELOPMENT USAGE
FROM node:10
RUN npm install -g nodemon
WORKDIR /usr/src/osjs
COPY entrypoint.sh .
CMD ./entrypoint.sh
================================================
FILE: LICENSE
================================================
BSD 2-Clause License
OS.js - JavaScript Cloud/Web Desktop Platform
Copyright (c) Anders Evenrud <andersevenrud@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: README.md
================================================
<p align="center">
<img alt="OS.js Logo" src="https://raw.githubusercontent.com/os-js/gfx/master/logo-big.png" />
</p>
# OS.js
[OS.js](https://www.os-js.org/) is an [open-source](https://raw.githubusercontent.com/os-js/OS.js/master/LICENSE) web desktop platform with a window manager, application APIs, GUI toolkit, filesystem abstractions and much more.
**Backing/Donations:**
[Github sponsorship](https://github.com/sponsors/andersevenrud),
[Patreon](https://www.patreon.com/user?u=2978551&ty=h&u=2978551),
[OpenCollective](https://opencollective.com/osjs),
[LibrePay](https://liberapay.com/os-js/),
[PayPal](https://paypal.me/andersevenrud),
[Bitcoin](https://manual.os-js.org/wallet.png)
**Support:**
[Chat](https://gitter.im/os-js/OS.js),
[Forums](https://community.os-js.org/),
[Twitter](https://twitter.com/osjsorg),
[Facebook](https://www.facebook.com/os.js.org)
## Introduction
This is the OS.js base repository that you can use as a template to make your own distributions, installations and development environments.
## Try it yourself
Visit the [official demo](https://demo.os-js.org/) for a preview version. Please note that some features are disabled and might be outdated or unavailable at times.

## Documentation
See the [official manuals](https://manual.os-js.org/) for articles, tutorials and guides.
There's also a [contribution guide](https://github.com/os-js/OS.js/blob/master/CONTRIBUTING.md) if you want to contribute to this project.
## Installation
> OS.js runs on `http://localhost:8000` by default.
### Using a pre-made image
You can use the official Docker base image to run OS.js without downloading this repository.
This image is based on this source code and comes with a minimal setup.
```bash
docker run -p 8000:8000 osjs/osjs:latest
```
### Using this repository
Clone the master branch:
> You can also download an archived version (ex. zip file) instead of using git.
```bash
git clone -b master --single-branch https://github.com/os-js/OS.js.git
cd OS.js
```
#### Docker Compose installation
The easiest way to install is to use Docker Compose. This allows you to run a single command
to set everything up:
```bash
docker-compose up
```
#### Local installation
You can also install this directly onto your system by using the following set of commands.
> **NOTE:** Requires Node v10 (or later. **[node 17 not currently supported without workaround](https://github.com/os-js/OS.js/issues/785)**).
```bash
# Install dependencies
npm install
# It's recommended that you update dependencies
npm update
# Optionally install extra packages:
# For a list of packages, see https://manual.os-js.org/resource/official/
npm install @osjs/example-application
# Discover installed packages
npm run package:discover
# Build client
npm run build
# Start serving
npm run serve
```
================================================
FILE: docker-compose.yml
================================================
#
# OS.js - JavaScript Cloud/Web Desktop Platform
#
# Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @author Anders Evenrud <andersevenrud@gmail.com>
# @licence Simplified BSD License
#
# THIS IS ONLY INTENDED FOR DEVELOPMENT USAGE
version: '3'
services:
osjs:
user: node
build:
context: .
volumes:
- .:/usr/src/osjs
ports:
- "${OSJS_NODE_PORT:-8000}:8000"
================================================
FILE: entrypoint.sh
================================================
#!/bin/bash
#
# OS.js - JavaScript Cloud/Web Desktop Platform
#
# Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @author Anders Evenrud <andersevenrud@gmail.com>
# @licence Simplified BSD License
#
# THIS IS ONLY INTENDED FOR DEVELOPMENT USAGE
npm install
npm run build
npm run package:discover
npx nodemon --watch package-lock.json --watch src/server --watch package.json --watch src/packages src/server/index.js
================================================
FILE: package.json
================================================
{
"name": "@osjs/osjs",
"version": "3.1.12",
"description": "OS.js",
"main": "index.js",
"scripts": {
"test": "npm run eslint && npm run stylelint",
"eslint": "eslint 'src/client/**/*.js' 'src/server/**/*.js'",
"stylelint": "stylelint 'src/client/*.scss'",
"serve": "node src/server/index.js",
"build:manifest": "osjs-cli package:discover",
"package:discover": "osjs-cli package:discover",
"package:create": "osjs-cli package:create",
"make:auth": "osjs-cli make:auth",
"make:settings": "osjs-cli make:settings",
"make:vfs": "osjs-cli make:vfs",
"make:application": "osjs-cli make:application",
"make:iframe-application": "osjs-cli make:iframe-application",
"make:provider": "osjs-cli make:provider",
"build": "webpack",
"watch": "webpack --watch"
},
"keywords": [
"osjs"
],
"author": "Anders Evenrud <andersevenrud@gmail.com>",
"license": "BSD-2-Clause",
"devDependencies": {
"@osjs/dev-meta": "^2.1.0",
"html-webpack-plugin": "^3.2.0",
"source-map-loader": "^0.2.4"
},
"dependencies": {
"@osjs/calculator-application": "^1.2.8",
"@osjs/cli": "^3.1.3",
"@osjs/client": "^3.7.1",
"@osjs/dialogs": "^3.1.0",
"@osjs/draw-application": "^1.2.12",
"@osjs/filemanager-application": "^1.6.2",
"@osjs/freedesktop-sounds": "^3.0.3",
"@osjs/gnome-icons": "^4.0.5",
"@osjs/gui": "^4.0.36",
"@osjs/htmlviewer-application": "^1.2.6",
"@osjs/musicplayer-application": "^1.2.8",
"@osjs/panels": "^3.0.31",
"@osjs/preview-application": "^1.1.17",
"@osjs/server": "^3.2.3",
"@osjs/settings-application": "^1.1.8",
"@osjs/standard-theme": "^4.0.9",
"@osjs/textpad-application": "^1.2.7",
"hyperapp": "^1.2.10",
"typeface-roboto": "0.0.75"
},
"repository": {
"type": "git",
"url": "git+https://github.com/osjs/OS.js.git"
},
"bugs": {
"url": "https://github.com/osjs/OS.js/issues"
},
"homepage": "https://www.os-js.org",
"engines": {
"node": ">=10.0.0"
},
"eslintConfig": {
"env": {
"browser": true,
"node": true
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 8
},
"extends": "@osjs/eslint-config"
},
"stylelint": {
"extends": "@osjs/stylelint-config"
},
"babel": {
"presets": [
[
"@babel/preset-env",
{}
]
],
"plugins": [
"@babel/plugin-transform-runtime"
]
}
}
================================================
FILE: src/cli/index.js
================================================
/*!
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Anders Evenrud <andersevenrud@gmail.com>
* @licence Simplified BSD License
*/
const path = require('path');
//
// This is where you can place your custom CLI tasks
// https://manual.os-js.org/guide/cli/
// https://manual.os-js.org/resource/official/
//
module.exports = {
discover: [
path.resolve(__dirname, '../packages') // OS.js/src/packages
],
tasks: []
};
================================================
FILE: src/client/config.js
================================================
/*
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Anders Evenrud <andersevenrud@gmail.com>
* @licence Simplified BSD License
*/
//
// This is the client configuration tree.
// Guide: https://manual.os-js.org/config/#client
// Complete config tree: https://github.com/os-js/osjs-client/blob/master/src/config.js
//
export default {
auth: {
login: {
username: 'demo',
password: 'demo'
}
}
};
================================================
FILE: src/client/index.ejs
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!--
OS.js - Copyright (c) 2011-2020
Anders Evenrud (andersevenrud@gmail.com)
https://github.com/os-js/
-->
<meta name="google" content="notranslate" />
<meta name="description" content="OS.js - JavaScript Cloud/Web Desktop Platform" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
</body>
</html>
================================================
FILE: src/client/index.js
================================================
/*!
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Anders Evenrud <andersevenrud@gmail.com>
* @licence Simplified BSD License
*/
//
// This is the client bootstrapping script.
// This is where you can register service providers or set up
// your libraries etc.
//
// https://manual.os-js.org/guide/provider/
// https://manual.os-js.org/install/
// https://manual.os-js.org/resource/official/
//
import {
Core,
CoreServiceProvider,
DesktopServiceProvider,
VFSServiceProvider,
NotificationServiceProvider,
SettingsServiceProvider,
AuthServiceProvider
} from '@osjs/client';
import {PanelServiceProvider} from '@osjs/panels';
import {GUIServiceProvider} from '@osjs/gui';
import {DialogServiceProvider} from '@osjs/dialogs';
import config from './config.js';
import './index.scss';
const init = () => {
const osjs = new Core(config, {});
// Register your service providers
osjs.register(CoreServiceProvider);
osjs.register(DesktopServiceProvider);
osjs.register(VFSServiceProvider);
osjs.register(NotificationServiceProvider);
osjs.register(SettingsServiceProvider, {before: true});
osjs.register(AuthServiceProvider, {before: true});
osjs.register(PanelServiceProvider);
osjs.register(DialogServiceProvider);
osjs.register(GUIServiceProvider);
osjs.boot();
};
window.addEventListener('DOMContentLoaded', () => init());
================================================
FILE: src/client/index.scss
================================================
/*!
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Anders Evenrud <andersevenrud@gmail.com>
* @licence Simplified BSD License
*/
//
// This is the client base stylesheet.
// This is where you add all your dependent styles and override any
// OS.js defaults.
//
@import "~typeface-roboto/index.css";
@import "~@osjs/client/dist/main.css";
@import "~@osjs/gui/dist/main.css";
@import "~@osjs/dialogs/dist/main.css";
@import "~@osjs/panels/dist/main.css";
body,
html {
width: 100%;
height: 100%;
}
================================================
FILE: src/packages/.gitignore
================================================
================================================
FILE: src/server/config.js
================================================
/*
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Anders Evenrud <andersevenrud@gmail.com>
* @licence Simplified BSD License
*/
//
// This is the server configuration tree.
// Guide: https://manual.os-js.org/config/#server
// Complete config tree: https://github.com/os-js/osjs-server/blob/master/src/config.js
//
const path = require('path');
const root = path.resolve(__dirname, '../../');
module.exports = {
root,
port: 8000,
public: path.resolve(root, 'dist')
};
================================================
FILE: src/server/index.js
================================================
/*
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @author Anders Evenrud <andersevenrud@gmail.com>
* @licence Simplified BSD License
*/
//
// This is the server bootstrapping script.
// This is where you can register service providers or set up
// your libraries etc.
//
// https://manual.os-js.org/guide/provider/
// https://manual.os-js.org/install/
// https://manual.os-js.org/resource/official/
//
const {
Core,
CoreServiceProvider,
PackageServiceProvider,
VFSServiceProvider,
AuthServiceProvider,
SettingsServiceProvider
} = require('@osjs/server');
const config = require('./config.js');
const osjs = new Core(config, {});
osjs.register(CoreServiceProvider, {before: true});
osjs.register(PackageServiceProvider);
osjs.register(VFSServiceProvider);
osjs.register(AuthServiceProvider);
osjs.register(SettingsServiceProvider);
const shutdown = signal => (error) => {
if (error instanceof Error) {
console.error(error);
}
osjs.destroy(() => process.exit(signal));
};
process.on('SIGTERM', shutdown(0));
process.on('SIGINT', shutdown(0));
process.on('exit', shutdown(0));
osjs.boot().catch(shutdown(1));
================================================
FILE: webpack.config.js
================================================
const path = require('path');
const mode = process.env.NODE_ENV || 'development';
const minimize = mode === 'production';
const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const {DefinePlugin} = webpack;
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const npm = require('./package.json');
const plugins = [];
if (mode === 'production') {
plugins.push(new OptimizeCSSAssetsPlugin({
cssProcessorOptions: {
discardComments: true,
map: {
inline: false
}
},
}));
}
module.exports = {
mode,
devtool: 'source-map',
entry: {
osjs: path.resolve(__dirname, 'src/client/index.js')
},
performance: {
maxEntrypointSize: 500 * 1024,
maxAssetSize: 500 * 1024
},
optimization: {
minimize,
splitChunks: {
chunks: 'all'
}
},
plugins: [
new DefinePlugin({
OSJS_VERSION: npm.version
}),
new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'src/client/index.ejs'),
favicon: path.resolve(__dirname, 'src/client/favicon.png'),
title: 'OS.js'
}),
new MiniCssExtractPlugin({
filename: '[name].css'
}),
...plugins
],
module: {
rules: [
{
test: /\.(svg|png|jpe?g|gif|webp)$/,
use: [
{
loader: 'file-loader'
}
]
},
{
test: /\.(eot|svg|ttf|woff|woff2)$/,
include: /typeface/,
use: {
loader: 'file-loader',
options: {
name: 'fonts/[name].[ext]'
}
}
},
{
test: /\.(sa|sc|c)ss$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
sourceMap: true
}
},
{
loader: 'sass-loader',
options: {
sourceMap: true
}
}
]
},
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
},
{
test: /\.js$/,
enforce: 'pre',
use: {
loader: 'source-map-loader'
}
}
]
}
};
gitextract_uwb8vc1n/ ├── .github/ │ ├── FUNDING.yml │ └── workflows/ │ ├── node.yml │ └── test.yml ├── .gitignore ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── README.md ├── docker-compose.yml ├── entrypoint.sh ├── package.json ├── src/ │ ├── cli/ │ │ └── index.js │ ├── client/ │ │ ├── config.js │ │ ├── index.ejs │ │ ├── index.js │ │ └── index.scss │ ├── packages/ │ │ └── .gitignore │ └── server/ │ ├── config.js │ └── index.js └── webpack.config.js
Condensed preview — 20 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (32K chars).
[
{
"path": ".github/FUNDING.yml",
"chars": 171,
"preview": "# These are supported funding model platforms\n\ngithub: andersevenrud\npatreon: andersevenrud\nopen_collective: osjs\nlibera"
},
{
"path": ".github/workflows/node.yml",
"chars": 455,
"preview": "name: Node tests\non:\n push:\n branches:\n - master\n pull_request:\njobs:\n build:\n strategy:\n matrix:\n "
},
{
"path": ".github/workflows/test.yml",
"chars": 361,
"preview": "name: Lint tests\non:\n push:\n branches:\n - master\n pull_request:\njobs:\n build:\n name: Lint tests (node late"
},
{
"path": ".gitignore",
"chars": 76,
"preview": ".swp\n.tern-*\nnode_modules\n/packages.json\n/sessions\n/.env*\n/session-store.db\n"
},
{
"path": "CONTRIBUTING.md",
"chars": 1565,
"preview": "# Contributing\n\nIf you want to contribute, but not sure what to do, here's a list of things that I always need help with"
},
{
"path": "Dockerfile",
"chars": 1663,
"preview": "#\n# OS.js - JavaScript Cloud/Web Desktop Platform\n#\n# Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com>\n"
},
{
"path": "LICENSE",
"chars": 1392,
"preview": "BSD 2-Clause License\n\nOS.js - JavaScript Cloud/Web Desktop Platform\n\nCopyright (c) Anders Evenrud <andersevenrud@gmail.c"
},
{
"path": "README.md",
"chars": 2889,
"preview": "<p align=\"center\">\n <img alt=\"OS.js Logo\" src=\"https://raw.githubusercontent.com/os-js/gfx/master/logo-big.png\" />\n</p>"
},
{
"path": "docker-compose.yml",
"chars": 1722,
"preview": "#\n# OS.js - JavaScript Cloud/Web Desktop Platform\n#\n# Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.com>\n"
},
{
"path": "entrypoint.sh",
"chars": 1742,
"preview": "#!/bin/bash\n#\n# OS.js - JavaScript Cloud/Web Desktop Platform\n#\n# Copyright (c) 2011-2020, Anders Evenrud <andersevenrud"
},
{
"path": "package.json",
"chars": 2478,
"preview": "{\n \"name\": \"@osjs/osjs\",\n \"version\": \"3.1.12\",\n \"description\": \"OS.js\",\n \"main\": \"index.js\",\n \"scripts\": {\n \"tes"
},
{
"path": "src/cli/index.js",
"chars": 1838,
"preview": "/*!\n * OS.js - JavaScript Cloud/Web Desktop Platform\n *\n * Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail."
},
{
"path": "src/client/config.js",
"chars": 1830,
"preview": "/*\n * OS.js - JavaScript Cloud/Web Desktop Platform\n *\n * Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.c"
},
{
"path": "src/client/index.ejs",
"chars": 524,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <!--\n OS.js - Copyright (c) 2011-2020\n "
},
{
"path": "src/client/index.js",
"chars": 2776,
"preview": "/*!\n * OS.js - JavaScript Cloud/Web Desktop Platform\n *\n * Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail."
},
{
"path": "src/client/index.scss",
"chars": 1916,
"preview": "/*!\n * OS.js - JavaScript Cloud/Web Desktop Platform\n *\n * Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail."
},
{
"path": "src/packages/.gitignore",
"chars": 0,
"preview": ""
},
{
"path": "src/server/config.js",
"chars": 1890,
"preview": "/*\n * OS.js - JavaScript Cloud/Web Desktop Platform\n *\n * Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.c"
},
{
"path": "src/server/index.js",
"chars": 2542,
"preview": "/*\n * OS.js - JavaScript Cloud/Web Desktop Platform\n *\n * Copyright (c) 2011-2020, Anders Evenrud <andersevenrud@gmail.c"
},
{
"path": "webpack.config.js",
"chars": 2313,
"preview": "const path = require('path');\nconst mode = process.env.NODE_ENV || 'development';\nconst minimize = mode === 'production'"
}
]
About this extraction
This page contains the full source code of the os-js/OS.js GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 20 files (29.4 KB), approximately 7.6k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.