Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
chore(tauri): fix vite cache and add docs (#194)
Sean Aye51960ba1c0b3
diff --git a/js/app/README.md b/js/app/README.mdnew file mode 100644index 0000000000..4f89e5d0ca--- /dev/null+++ b/js/app/README.md@@ -0,0 +1,45 @@+# Macro App Frontend++This is the root directory for the [solidjs](https://www.solidjs.com/) frontend application known as _Macro_++We use the [bun](https://bun.sh/) as a javascript package manager and runtime for the [vite](https://vite.dev/) development server.++The production application is compiled down to a static javascript bundle using a traditional SPA-like architecture.++### Toolchain Management++If you have the [nix](https://nixos.org/learn/) package manager installed on your system then you can drop into a nix shell where everything you need is installed for you.++`nix develop`+++## Tauri 🤝 Macro++We are currently in the process of bundling the frontend javascript application as a [Tauri](https://tauri.app/) app.+You will need the following dependencies installed on your system to develop in this environment.++1. The [rust programming language](https://rust-lang.org/tools/install/)+1. The [Tauri CLI](https://v2.tauri.app/reference/cli/)+1. The [bun](https://bun.sh/) runtime+1. *For Android Development* The [Android Studio IDE](https://developer.android.com/studio)+1. *For iOS Development* [XCode](https://developer.apple.com/xcode/) for MacOS++If you do not want to manage these dependencies manually, it is recommended to use `nix develop`+++### Running Tauri++After the dependencies are installed you can use the tauri cli to run the app.+Note the first command should be substituted with the package manager you used to install the cli e.g. cargo, bun, etc.+In the nix shell the cli is installed for the cargo package manager.+++Run the Desktop App for your host operating system+ > `cargo tauri dev`++Run the Android App+ > `cargo tauri android dev`++Run the iOS App (note: I haven't had the chance to test this yet)+ > `cargo tauri ios dev`+diff --git a/js/app/flake.lock b/js/app/flake.locknew file mode 100644index 0000000000..68f215286d--- /dev/null+++ b/js/app/flake.lock@@ -0,0 +1,100 @@+{+ "nodes": {+ "fenix": {+ "inputs": {+ "nixpkgs": [+ "nixpkgs"+ ],+ "rust-analyzer-src": "rust-analyzer-src"+ },+ "locked": {+ "lastModified": 1763361733,+ "narHash": "sha256-ka7dpwH3HIXCyD2wl5F7cPLeRbqZoY2ullALsvxdPt8=",+ "owner": "nix-community",+ "repo": "fenix",+ "rev": "6c8d48e3b0ae371b19ac1485744687b788e80193",+ "type": "github"+ },+ "original": {+ "owner": "nix-community",+ "repo": "fenix",+ "type": "github"+ }+ },+ "flake-utils": {+ "inputs": {+ "systems": "systems"+ },+ "locked": {+ "lastModified": 1731533236,+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",+ "owner": "numtide",+ "repo": "flake-utils",+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",+ "type": "github"+ },+ "original": {+ "owner": "numtide",+ "repo": "flake-utils",+ "type": "github"+ }+ },+ "nixpkgs": {+ "locked": {+ "lastModified": 1763283776,+ "narHash": "sha256-Y7TDFPK4GlqrKrivOcsHG8xSGqQx3A6c+i7novT85Uk=",+ "owner": "NixOS",+ "repo": "nixpkgs",+ "rev": "50a96edd8d0db6cc8db57dab6bb6d6ee1f3dc49a",+ "type": "github"+ },+ "original": {+ "owner": "NixOS",+ "ref": "nixos-unstable",+ "repo": "nixpkgs",+ "type": "github"+ }+ },+ "root": {+ "inputs": {+ "fenix": "fenix",+ "flake-utils": "flake-utils",+ "nixpkgs": "nixpkgs"+ }+ },+ "rust-analyzer-src": {+ "flake": false,+ "locked": {+ "lastModified": 1762860488,+ "narHash": "sha256-rMfWMCOo/pPefM2We0iMBLi2kLBAnYoB9thi4qS7uk4=",+ "owner": "rust-lang",+ "repo": "rust-analyzer",+ "rev": "2efc80078029894eec0699f62ec8d5c1a56af763",+ "type": "github"+ },+ "original": {+ "owner": "rust-lang",+ "ref": "nightly",+ "repo": "rust-analyzer",+ "type": "github"+ }+ },+ "systems": {+ "locked": {+ "lastModified": 1681028828,+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",+ "owner": "nix-systems",+ "repo": "default",+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",+ "type": "github"+ },+ "original": {+ "owner": "nix-systems",+ "repo": "default",+ "type": "github"+ }+ }+ },+ "root": "root",+ "version": 7+}diff --git a/js/app/flake.nix b/js/app/flake.nixnew file mode 100644index 0000000000..e91923c17b--- /dev/null+++ b/js/app/flake.nix@@ -0,0 +1,112 @@+{+ inputs = {+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";+ flake-utils.url = "github:numtide/flake-utils";+ fenix.url = "github:nix-community/fenix";+ fenix.inputs.nixpkgs.follows = "nixpkgs";+ };++ outputs =+ {+ self,+ nixpkgs,+ flake-utils,+ fenix,+ }:+ flake-utils.lib.eachDefaultSystem (+ system:+ let+ pkgs = import nixpkgs {+ system = system;+ config.allowUnfree = true;+ config.android_sdk.accept_license = true;+ };++ android_sdk =+ (pkgs.androidenv.composeAndroidPackages {+ platformVersions = [+ "34"+ "36"+ ];+ buildToolsVersions = [+ "35.0.0"+ ];+ ndkVersions = [ "26.3.11579264" ];+ includeNDK = true;+ useGoogleAPIs = false;+ useGoogleTVAddOns = false;+ includeEmulator = true;+ includeSystemImages = true;+ systemImageTypes = [ "google_apis_playstore" ];+ abiVersions = [ "x86_64" ];+ includeSources = false;+ }).androidsdk;++ packages = with pkgs; [+ curl+ wget+ pkg-config++ bun+ biome+ nodejs_24+ typescript-language-server+ cargo-tauri+ cargo-info+ cargo-udeps+ pulumi+ pulumiPackages.pulumi-nodejs+ pulumiPackages.pulumi-aws-native++ gst_all_1.gstreamer+ gst_all_1.gst-plugins-base+ gst_all_1.gst-plugins-good+ gst_all_1.gst-plugins-bad++ (+ with fenix.packages.${system};+ combine [+ complete.rustc+ complete.rust-src+ complete.cargo+ complete.clippy+ complete.rustfmt+ complete.rust-analyzer+ targets.aarch64-linux-android.latest.rust-std+ targets.armv7-linux-androideabi.latest.rust-std+ targets.i686-linux-android.latest.rust-std+ targets.x86_64-linux-android.latest.rust-std+ ]+ )++ android_sdk+ jdk+ ];++ libraries = with pkgs; [+ gtk3+ libsoup_3+ webkitgtk_4_1+ cairo+ gdk-pixbuf+ glib+ dbus+ openssl+ librsvg+ lsb-release # without this single instance can fail on nixos+ ];+ in+ {+ devShell = pkgs.mkShell {+ buildInputs = packages ++ libraries;++ LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath libraries}:$LD_LIBRARY_PATH";+ XDG_DATA_DIRS = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS";+ ANDROID_HOME = "${android_sdk}/libexec/android-sdk";+ NDK_HOME = "${android_sdk}/libexec/android-sdk/ndk/26.3.11579264";+ GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${android_sdk}/libexec/android-sdk/build-tools/35.0.0/aapt2";+ GIO_MODULE_DIR = "${pkgs.glib-networking}/lib/gio/modules/";+ };+ }+ );+}diff --git a/js/app/packages/app/vite.config.ts b/js/app/packages/app/vite.config.tsindex 6b273e5e42..4efe8a2f0f 100644--- a/js/app/packages/app/vite.config.ts+++ b/js/app/packages/app/vite.config.ts@@ -66,7 +66,6 @@ export default defineConfig(({ command, mode }) => {emptyOutDir: true,minify: !NO_MINIFY,rollupOptions: {- preserveSymlinks: true,input: {app: resolve(__dirname, 'index.html'),},@@ -129,6 +128,12 @@ export default defineConfig(({ command, mode }) => {usePolling: true,interval: 100,},+ fs: {+ allow: [+ // Allow serving files from the workspace root+ resolve(__dirname, '../../'),+ ],+ },},};});