diff --git a/.env b/.env deleted file mode 100644 index 53f9a19..0000000 --- a/.env +++ /dev/null @@ -1,4 +0,0 @@ -REACT_APP_PUBLIC_URL="https://beadi.onrender.com/" -REACT_APP_BETA_PUBLIC_URL="https://stagingbeadi.onrender.com/" -# Will be overwritten in production -REACT_APP_BRANCH="staging" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4d29575..434a010 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies -/node_modules +node_modules /.pnp .pnp.js @@ -9,7 +9,7 @@ /coverage # production -/build +/app/build # misc .DS_Store @@ -21,3 +21,4 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +. \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..e7740ff --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "printWidth": 140 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cf205bf --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "auto-close-tag.disableOnLanguage": [ + "php", + "javascript", + "typescript", + "plaintext" + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a11a49..52530f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# Version 0.4 + +Oh wow! This is a big one! + +Large parts of the underlying engine were rewritten to make way for a new plugin-based architecture. + +TODO The rest of what changed. + # Version 0.3 This update brings the first draft of a mobile interface, so you aren't bound to your PC anymore and can take the fun anywhere. You can create your flows using the web-app on a PC as usual and then transfer them to your mobile device using an exported json file or by simply pressing a button to Export it to [litterbox.catbox.moe](https://litterbox.catbox.moe). diff --git a/app/.env b/app/.env new file mode 100644 index 0000000..ea2b80f --- /dev/null +++ b/app/.env @@ -0,0 +1,6 @@ +VITE_APP_REMOTE_SERVER_URL="wss://beadi-serve.onrender.com:6969/" +# REACT_APP_REMOTE_SERVER_URL="wss://stagingbeadi.onrender.com:6969/" +VITE_APP_PUBLIC_URL="https://beadi.onrender.com/" +VITE_APP_BETA_PUBLIC_URL="https://stagingbeadi.onrender.com/" +# Will be overwritten in production +VITE_APP_BRANCH="staging" \ No newline at end of file diff --git a/app/.eslintrc.cjs b/app/.eslintrc.cjs new file mode 100644 index 0000000..d6c9537 --- /dev/null +++ b/app/.eslintrc.cjs @@ -0,0 +1,18 @@ +module.exports = { + root: true, + env: { browser: true, es2020: true }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:react-hooks/recommended', + ], + ignorePatterns: ['dist', '.eslintrc.cjs'], + parser: '@typescript-eslint/parser', + plugins: ['react-refresh'], + rules: { + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, +} diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/app/README.md b/app/README.md new file mode 100644 index 0000000..1ebe379 --- /dev/null +++ b/app/README.md @@ -0,0 +1,27 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: + +- Configure the top-level `parserOptions` property like this: + +```js + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + project: ['./tsconfig.json', './tsconfig.node.json'], + tsconfigRootDir: __dirname, + }, +``` + +- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` +- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` +- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list diff --git a/app/index.html b/app/index.html new file mode 100644 index 0000000..e4b78ea --- /dev/null +++ b/app/index.html @@ -0,0 +1,13 @@ + + +
+ + + +TODO Error when loading file
; +}; diff --git a/app/src/editor/SaveSelector.tsx b/app/src/editor/SaveSelector.tsx new file mode 100644 index 0000000..e859931 --- /dev/null +++ b/app/src/editor/SaveSelector.tsx @@ -0,0 +1,43 @@ +import { Button, Typo } from "@beadi/components"; +import { FunctionComponent, useMemo } from "react"; + +//TODO Saves should really be in IndexedDB and not in localstorage + +type BeadiSaveFile = { + name: string; + content: string; +}; +type BeadiSaves = { + items: BeadiSaveFile[]; +}; + +function load(): BeadiSaves { + const item = localStorage.getItem("beadi_saves"); + if (item == null) { + return { items: [] }; + } + const parsed = JSON.parse(item); + return parsed; +} + +export type SaveSelectorProps = { + onSaveSelected: (fileName: string) => void; + onCreateNew: () => void; +}; +export const SaveSelector: FunctionComponentNext Generation Customization for Remote Sex Toy Control
+ {/* + Start Creating +
+ You can get started by taking a look at some of the examples below or just opening the{" "}
+
+ Drag in Input nodes to access sensors or remote control. Drag in Output nodes to write values to toys via
+ Intiface.
+
+ I am Luna the bat, and this is Beadi, a platform for visual, node-based, programming for{" "} + + Buttplug.io + {" "} + compatible Sextoys. +
+A collection of versatile Nodes enables you to create everything from simple waves up to complex event driven control flows
+Create Sliders, Buttons and switches to act as inputs for your graph
+Let other people remotely control your interfaces or even connect multiple graphs together to create a network of fun.
+
+ Access the sensors of your mobile phone or connect to
And many more to come!
+
+ One of my ("Mona Mayrhofer", "we", "our", "us", "I", "me", or "mine") main priorities with Beadi is to retain the privacy and
+ discretion of the visitors and I strive to minimize it to the absolute necessary minimum. This Privacy Policy will explain how we
+ use the personal data we collect from you when you use the website, at
+
If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us at:
+You directly provide most of the data we collect. We collect data and process data when you
+We collect your data so that we can:
++ We securely store your data in Linz, Austria and make sure to keep them to a bare minimum. We are aware of the possible risks that + come with storing user data and are committed to keep it safe. +
+ +Data associated with your user account will be stored until you delete you account.
+ +Data collected for analytical/statistical purposes will be anonymized as soon as we get it.
+ ++ Content that you publish to public areas of the service (chat, remote-control, etc.) will be shared with other users of the + service. +
++ In order to provide services to you we rely on others to provide us services. Certain Service providers (also known as + "processors") critical services, such as hosting (storing and delivering the webpage). We authorize such service providers to + use or disclose the Personal Information shared with them +
+We would like to make sure you are fully aware of all your data protection rights. Every user is entitled to the following:
++ If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us at + our email: lunathebat@proton.me +
+ ++ Cookies/localstorage/IndexedDB and similar technologies are a way, provided by your Browser, to store small amounts of data on your + PC. They are primarily used by us to enhance the function of our service (e.g enabling us to store settings/saves locally instead of + having to transfer them to our servers). They can also be used to track visitors and user behaviour. +
+For further information, visit allaboutcookies.org
+ +We use cookies/localstorage/IndexedDB exclusively to
+There are a number of different types of cookies, however our website ues:
++ You can set your browser not to accept cookies, and the website mentioned above will tell you how to remove cookies. However as most + of our functionality relies on cookies, the quality of our services may degrade. +
+ ++ The Beadi website contains links to other websites. This privacy policy only applies to our websites, so if you click a link to + another website, you should read their privacy policy. +
+ ++ We keep our privacy policy under regular review and place any updates on this website. This privacy policy was last updated on the + 16 August 2023 +
+