diff --git a/.env.example b/.env.example index 57727ee9..5fed5898 100644 --- a/.env.example +++ b/.env.example @@ -1 +1 @@ -PORT=4000 \ No newline at end of file +PORT=4000 diff --git a/.gitignore b/.gitignore index ae0b8bfa..7855d3b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,28 @@ +# Misc .DS_Store + +# Dependencies node_modules/ + *.zip *.tgz license.config.json license-header.txt + +# Build Outputs dist/ -.vscode/ + +# VS Code IDE +.vscode/**/* +!.vscode/extensions.json +!.vscode/launch.json +!.vscode/settings.json +!.vscode/tasks.json + +# Local env files .env +!.env.example + # this is for jetbrain IDEs .idea/ /puter diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..58f080f4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "cSpell.words": [ + "dnsmasq", + "heyputer", + "Puter" + ] +} diff --git a/README.md b/README.md index f44bf775..3283ee35 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ an invalid setup. ```bash git clone https://github.com/HeyPuter/puter cd puter +cp .env.example .env npm install npm start ``` diff --git a/doc/self-hosters/domains.md b/doc/self-hosters/domains.md index 480342cf..2b7dc88c 100644 --- a/doc/self-hosters/domains.md +++ b/doc/self-hosters/domains.md @@ -1,4 +1,4 @@ -# Configurating Domains for Self-Hosted Puter +# Configuring Domains for Self-Hosted Puter ## Local Network Configuration @@ -51,7 +51,7 @@ Setting up a local DNS server on your network allows for flexible and scalable d - **Pi-hole**: Acts as both an ad-blocker and a DNS server. Ideal for easy setup and maintenance. - **BIND9**: Offers comprehensive DNS server capabilities for complex setups. -- **Dnsmasq**: Lightweight and suitable for smaller networks or those new to running a DNS server. +- **dnsmasq**: Lightweight and suitable for smaller networks or those new to running a DNS server. **contributors note:** feel free to add any software you're aware of which might help with this to the list. Also, feel free to add instructions here for specific software; our goal is for Puter to be easy to setup with tools you're already familiar with. @@ -60,7 +60,7 @@ which might help with this to the list. Also, feel free to add instructions here 1. Choose and install DNS server software on a device within your network. 2. Configure the DNS server to resolve `puter.local` and `api.puter.local` to the IP address of your Puter hosting device. -3. Update your router’s DHCP settings to distribute the DNS server's IP address to all devices on the network. +3. Update your router's DHCP settings to distribute the DNS server's IP address to all devices on the network. By setting up a local DNS server, you gain the most flexibility and control over your network's domain name resolution, ensuring that all devices can access Puter and its API without manual configuration. @@ -68,5 +68,5 @@ By setting up a local DNS server, you gain the most flexibility and control over Please note the self-hosting feature is still in alpha and a public production deployment is not recommended at this time. However, if you wish to host -publically you can do so following the same steps you normally would to configure +publicly you can do so following the same steps you normally would to configure a domain name and ensuring the `api` subdomain points to the server as well. diff --git a/packages/backend/doc/contributors/index.md b/packages/backend/doc/contributors/index.md index 32890ebf..c17fb0c3 100644 --- a/packages/backend/doc/contributors/index.md +++ b/packages/backend/doc/contributors/index.md @@ -55,8 +55,8 @@ If your answer is the second, you should find a way to In my experience, the harder I think about the correct way to implement something, the bigger a mistake I'm going to make; ***unless*** a big part of the reason I'm thinking so hard is because I want to find a solution -that reduces complexity and has the right maintanence trade-off. +that reduces complexity and has the right maintenance trade-off. There's no easy solution for this so just keep it in mind; there are some things we might write 2 times, 3 times, even more times over before we really get it right and *that's okay*; sometimes part of doing useful work is -doing the useless work that reveals what the useful work is. \ No newline at end of file +doing the useless work that reveals what the useful work is. diff --git a/packages/backend/exports.js b/packages/backend/exports.js index fec5b824..8ffa9869 100644 --- a/packages/backend/exports.js +++ b/packages/backend/exports.js @@ -20,7 +20,7 @@ const CoreModule = require("./src/CoreModule.js"); const { Kernel } = require("./src/Kernel.js"); const DatabaseModule = require("./src/DatabaseModule.js"); const LocalDiskStorageModule = require("./src/LocalDiskStorageModule.js"); -const SelfhostedModule = require("./src/SelfhostedModule.js"); +const SelfHostedModule = require("./src/SelfHostedModule.js"); const PuterDriversModule = require("./src/PuterDriversModule.js"); const { testlaunch } = require("./src/index.js"); const BaseService = require("./src/services/BaseService.js"); @@ -45,5 +45,5 @@ module.exports = { DatabaseModule, PuterDriversModule, LocalDiskStorageModule, - SelfhostedModule, + SelfHostedModule, }; diff --git a/packages/backend/packages/puter-js-common/README.md b/packages/backend/packages/puter-js-common/README.md index be19cc07..60753224 100644 --- a/packages/backend/packages/puter-js-common/README.md +++ b/packages/backend/packages/puter-js-common/README.md @@ -1,7 +1,7 @@ # Puter - Common Javascript Module This is a small module for javascript which you might call a -"langauge tool"; it adds some behavior to make javascript classes +"language tool"; it adds some behavior to make javascript classes more flexible, with an aim to avoid any significant complexity. Each class in this module is best described as an _idea_: @@ -9,7 +9,7 @@ Each class in this module is best described as an _idea_: ### BasicBase **BasicBase** is the idea that there should be a common way to -see the inheretence chain of the current instance, and obtain +see the inheritance chain of the current instance, and obtain merged objects and arrays from static members of these classes. ### TraitBase diff --git a/packages/backend/src/SelfhostedModule.js b/packages/backend/src/SelfhostedModule.js index 74a8f215..adc375d0 100644 --- a/packages/backend/src/SelfhostedModule.js +++ b/packages/backend/src/SelfhostedModule.js @@ -1,7 +1,7 @@ const { AdvancedBase } = require("@heyputer/puter-js-common"); const config = require("./config"); -class SelfhostedModule extends AdvancedBase { +class SelfHostedModule extends AdvancedBase { async install (context) { const services = context.get('services'); @@ -63,4 +63,4 @@ class SelfhostedModule extends AdvancedBase { } } -module.exports = SelfhostedModule; +module.exports = SelfHostedModule; diff --git a/run-selfhosted.js b/run-selfhosted.js index 5b2ef423..94db315b 100644 --- a/run-selfhosted.js +++ b/run-selfhosted.js @@ -29,7 +29,7 @@ const surrounding_box = (col, lines) => { // Keeping track of WHY certain versions don't work const ver_info = [ { under: 14, reasons: ['optional chaining is not available'] }, - { under: 16, reasons: ['diskusage package ABI mismatch'] }, + { under: 16, reasons: ['disk usage package ABI mismatch'] }, ]; const lowest_allowed = Math.max(...ver_info.map(r => r.under)); @@ -59,7 +59,7 @@ const main = async () => { DatabaseModule, PuterDriversModule, LocalDiskStorageModule, - SelfhostedModule + SelfHostedModule } = (await import('@heyputer/backend')).default; console.log('kerne', Kernel); @@ -68,7 +68,7 @@ const main = async () => { k.add_module(new DatabaseModule()); k.add_module(new PuterDriversModule()); k.add_module(new LocalDiskStorageModule()); - k.add_module(new SelfhostedModule()); + k.add_module(new SelfHostedModule()); k.boot(); };