|
1 | | -# 🌌 pluto |
| 1 | +# 🌌 supernova |
2 | 2 | a complete web OS |
| 3 | +> **Note:** Along with all the source code, this document is closed-source and private. If you find this document floating around the internet or if someone sends it to you, [contact me](https://pablogracia.net/contact). |
3 | 4 | ## About |
4 | | -Pluto is a close-sourced Web OS, similar to Windows93 or Windows96. It intends to be the most sophisticated, complete, and developer-friendly web OS. |
5 | | -Applications in open99 run under the 41worker environment, which is comparable to WRT for Windows 96. 41worker applications run in workers to improve speed, security, and convenience. To learn more, visit [the docs page](https://developers.pluto.stretch.wtf/learn/api/41worker). |
| 5 | +Supernova is an offline, close-sourced Web OS, similar to Windows93 or Windows96. It intends to be the most sophisticated, complete, and developer-friendly web OS. |
| 6 | +Supernova programs run under the program runtime (codename 41worker), which is comparable to WRT for Windows 96. These applications run in workers to improve speed, security, and convenience. To learn more, visit [the docs page](https://learn.d.pluto.pablogracia.net/api/41worker). |
| 7 | +## Installation |
| 8 | +> Make sure you have yarn installed. Supernova does not support npm/pnpm. |
| 9 | +1. Clone the repository locally. |
| 10 | +2. Copy the environment variables by running `cp .env.example .env`. |
| 11 | +3. Install the dependencies by running `yarn`. |
| 12 | +### Tauri Installation |
| 13 | +Supernova uses the Tauri framework to build the desktop application. |
| 14 | +This is not required for the web version. |
| 15 | +> Follow the instructions [here](https://tauri.app/v1/guides/getting-started/prerequisites) to install the required tools for building for desktop. |
6 | 16 | ## Usage |
7 | | -You can build pluto by running `npm run build`. This will build the OS and put it in the `/dist` folder. |
| 17 | +You can build Supernova by running `yarn build`. |
| 18 | +This will build the OS into the `/dist` folder. |
| 19 | +Because Supernova is a static application, it does not require any server-side shenanigans. |
| 20 | +Additionally, you may use `yarn start` to build and serve Supernova locally on port 8000. |
| 21 | +This enables the watch mode, meaning every time you save a file, the application will rebuild. |
| 22 | + |
| 23 | +To build Supernova on the global network, Cloudflare Pages, you must push to the RELEASE branch. |
| 24 | + |
| 25 | +### Build Mode |
| 26 | +Supernova requires for a build mode environment variable to be set. Currently, this can either be in `development` or `production` modes. |
| 27 | +This is declared using the NODE_ENV environment variable (yes, capitalized). |
| 28 | + |
| 29 | +Certain parts of the Supernova kernel rely on NODE_ENV (for example, anti-piracy, devtools detector, obfuscation, etc.). |
| 30 | +Code that references `process.env.NODE_ENV` is simplified at build, for both development and production modes. |
| 31 | + |
8 | 32 | ## Structure |
9 | | -`/installer_fs` gets built into `/public/assets/installer.zip` as a zip file. |
10 | | -`/target_fs` gets built into `/public/assets/rootfs.zip` as a zip file. |
11 | | -`/build` is the build scripts. |
12 | | -`/public` is static files. This includes CSS as well as images. |
13 | | -`/src` is the OS kernel and gets built to `/dist/index.js`. |
14 | | -`/dist` is your ready-to-run build of Pluto. |
| 33 | +### Directories |
| 34 | +* `/executables/installer/` gets built into `/dist/assets/installer.zip` as a zip file. |
| 35 | +* `/executables/root/` gets built into `/dist/assets/rootfs.zip` as a zip file. |
| 36 | +* `/scripts/` is the build scripts. |
| 37 | +* `/public/` is static files. This includes CSS as well as images. |
| 38 | +* `/src/` is the OS kernel and gets built to `/dist/index.js`. |
| 39 | +* `/src-tauri/` is the Tauri application code (contains rust and tauri config, mainly) |
| 40 | +* `/dist/` is your ready-to-run build of Supernova. |
| 41 | + |
| 42 | +## CLOC |
| 43 | +You may accurately count lines of code by running `cloc --exclude-dir="node_modules,src-tauri,dist,package-lock.json" --quiet .` in the root directory. |
0 commit comments