diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..de761ce --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,75 @@ +module.exports = { + root: true, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + ], + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + env: { + browser: true, + node: true, + es2022: true, + }, + parserOptions: { + sourceType: 'module', + ecmaVersion: 'latest', + }, + overrides: [ + // Astro files + { + files: ['*.astro'], + parser: 'astro-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser', + extraFileExtensions: ['.astro'], + }, + extends: [ + 'plugin:astro/recommended', + ], + rules: { + 'astro/no-conflict-set-directives': 'error', + 'astro/no-unused-define-vars-in-style': 'error', + }, + }, + // Svelte files + { + files: ['*.svelte'], + parser: 'svelte-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser', + }, + extends: [ + 'plugin:svelte/recommended', + ], + }, + // JavaScript/TypeScript files + { + files: ['*.js', '*.ts'], + rules: { + '@typescript-eslint/explicit-function-return-type': ['error', { + allowExpressions: true, + allowHigherOrderFunctions: true, + }], + '@typescript-eslint/no-unused-vars': ['error', { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + }], + }, + } + ], + rules: { + // Project-wide rules + 'no-console': ['warn', { allow: ['warn', 'error', 'info'] }], + 'prefer-const': 'error', + 'eqeqeq': ['error', 'smart'], + }, + ignorePatterns: [ + 'dist', + 'build', + 'node_modules', + '.astro', + '*.go', + 'backend/build', + ], +}; \ No newline at end of file diff --git a/.flox/.gitignore b/.flox/.gitignore deleted file mode 100644 index 8d21186..0000000 --- a/.flox/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -run/ -cache/ -lib/ -log/ -!env/ diff --git a/.flox/env.json b/.flox/env.json deleted file mode 100644 index a45dd53..0000000 --- a/.flox/env.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "open-graph-generate", - "version": 1 -} \ No newline at end of file diff --git a/.flox/env/manifest.lock b/.flox/env/manifest.lock deleted file mode 100644 index a4a482c..0000000 --- a/.flox/env/manifest.lock +++ /dev/null @@ -1,572 +0,0 @@ -{ - "lockfile-version": 1, - "manifest": { - "version": 1, - "install": { - "colima": { - "pkg-path": "colima" - }, - "go": { - "pkg-path": "go", - "version": "^1.23" - }, - "nerdctl": { - "pkg-path": "nerdctl", - "systems": [ - "aarch64-linux", - "x86_64-linux" - ] - }, - "nodejs": { - "pkg-path": "nodejs" - }, - "pnpm": { - "pkg-path": "pnpm" - } - }, - "hook": { - "on-activate": " # Autogenerated by Flox\n\n # Point GOENV to Flox environment cache\n export GOENV=\"$FLOX_ENV_CACHE/goenv\"\n\n # Install Go dependencies\n go get .\n\n # End autogenerated by Flox\n" - }, - "profile": {}, - "options": { - "systems": [ - "aarch64-darwin", - "aarch64-linux", - "x86_64-darwin", - "x86_64-linux" - ], - "allow": { - "licenses": [] - }, - "semver": {} - } - }, - "packages": [ - { - "attr_path": "colima", - "broken": false, - "derivation": "/nix/store/3sr5sg125q56grah5wx9n60w2pgpis32-colima-0.8.1.drv", - "description": "Container runtimes with minimal setup", - "install_id": "colima", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "colima-0.8.1", - "pname": "colima", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "0.8.1", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/ivlnc4zhss54wyjaim8zbk4z268c2crq-colima-0.8.1" - }, - "system": "aarch64-darwin", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "colima", - "broken": false, - "derivation": "/nix/store/vix8lkhrfsrhf7rx6x7kg04qy7i4b7k3-colima-0.8.1.drv", - "description": "Container runtimes with minimal setup", - "install_id": "colima", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "colima-0.8.1", - "pname": "colima", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "0.8.1", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/lkablvpv813mjl9wrjw7nqw9gr8w0fr6-colima-0.8.1" - }, - "system": "aarch64-linux", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "colima", - "broken": false, - "derivation": "/nix/store/phmm76lv86663d464ybk9mwfjz2kvpi3-colima-0.8.1.drv", - "description": "Container runtimes with minimal setup", - "install_id": "colima", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "colima-0.8.1", - "pname": "colima", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "0.8.1", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/nkfnsdnwwqbr2cbq4sklv3s8qd95kv5d-colima-0.8.1" - }, - "system": "x86_64-darwin", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "colima", - "broken": false, - "derivation": "/nix/store/h5mqqpk0j48bzhb99qnf5gcqaayw3mhi-colima-0.8.1.drv", - "description": "Container runtimes with minimal setup", - "install_id": "colima", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "colima-0.8.1", - "pname": "colima", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "0.8.1", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/52nb1wq9mwlz3hh8f1xmdjkn2z5c9z6j-colima-0.8.1" - }, - "system": "x86_64-linux", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "go", - "broken": false, - "derivation": "/nix/store/3rx89v4m5zawcv75zf4hvgixwpqqig5v-go-1.23.6.drv", - "description": "Go Programming language", - "install_id": "go", - "license": "BSD-3-Clause", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "go-1.23.6", - "pname": "go", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "1.23.6", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/yjqrp3d93mxa2g80j57whyk55xwxgl7r-go-1.23.6" - }, - "system": "aarch64-darwin", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "go", - "broken": false, - "derivation": "/nix/store/nr1f8hf0p4xfj8d492fzpsbglm1c5hqc-go-1.23.6.drv", - "description": "Go Programming language", - "install_id": "go", - "license": "BSD-3-Clause", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "go-1.23.6", - "pname": "go", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "1.23.6", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/8998mrpahiciqy699yxfwaw29r89pfrm-go-1.23.6" - }, - "system": "aarch64-linux", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "go", - "broken": false, - "derivation": "/nix/store/k2jg2hxgd41cj1vh4pvg1zviywh7vmnh-go-1.23.6.drv", - "description": "Go Programming language", - "install_id": "go", - "license": "BSD-3-Clause", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "go-1.23.6", - "pname": "go", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "1.23.6", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/65s6ymzbxsydbka49gr3jsv0lnybbzyc-go-1.23.6" - }, - "system": "x86_64-darwin", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "go", - "broken": false, - "derivation": "/nix/store/h8r2axj3z8fdb367cmrb044jw2s75ffs-go-1.23.6.drv", - "description": "Go Programming language", - "install_id": "go", - "license": "BSD-3-Clause", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "go-1.23.6", - "pname": "go", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "1.23.6", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/8zgc91q1igzgmg36mglxrk8qa1r2dvsd-go-1.23.6" - }, - "system": "x86_64-linux", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "nerdctl", - "broken": false, - "derivation": "/nix/store/3r6gbyh5kglsc10q0srmpjgcpfc73wsg-nerdctl-1.7.7.drv", - "description": "Docker-compatible CLI for containerd", - "install_id": "nerdctl", - "license": "Apache-2.0", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "nerdctl-1.7.7", - "pname": "nerdctl", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "1.7.7", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/idmx6qb3c65dgvmfdkc1dz788zaib72d-nerdctl-1.7.7" - }, - "system": "aarch64-linux", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "nerdctl", - "broken": false, - "derivation": "/nix/store/mgji3g8zhmwmdvnkjv009vzp1y94jj42-nerdctl-1.7.7.drv", - "description": "Docker-compatible CLI for containerd", - "install_id": "nerdctl", - "license": "Apache-2.0", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "nerdctl-1.7.7", - "pname": "nerdctl", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "1.7.7", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/mx6bf7naa5mpa430gg869b2g5if129mz-nerdctl-1.7.7" - }, - "system": "x86_64-linux", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "nodejs", - "broken": false, - "derivation": "/nix/store/nl4c43rbyv6mvb0a0y7p36wi928g1gib-nodejs-22.14.0.drv", - "description": "Event-driven I/O framework for the V8 JavaScript engine", - "install_id": "nodejs", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "nodejs-22.14.0", - "pname": "nodejs", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "22.14.0", - "outputs_to_install": [ - "out" - ], - "outputs": { - "libv8": "/nix/store/slffbl0q14qc93dslaynyzh005rd869s-nodejs-22.14.0-libv8", - "out": "/nix/store/91y8h7rysgi5cl8hsj2bmjd00dq2l9pk-nodejs-22.14.0" - }, - "system": "aarch64-darwin", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "nodejs", - "broken": false, - "derivation": "/nix/store/hh2siwhf3zxqnfgqa55kls2fz3v37l27-nodejs-22.14.0.drv", - "description": "Event-driven I/O framework for the V8 JavaScript engine", - "install_id": "nodejs", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "nodejs-22.14.0", - "pname": "nodejs", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "22.14.0", - "outputs_to_install": [ - "out" - ], - "outputs": { - "libv8": "/nix/store/zb1ly8w6vdw2pjxwkbm3vymyfxyy7af8-nodejs-22.14.0-libv8", - "out": "/nix/store/ji8zs96759g59b4q6kz94pbfq6gvlazx-nodejs-22.14.0" - }, - "system": "aarch64-linux", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "nodejs", - "broken": false, - "derivation": "/nix/store/ikl0p2wi3gvzp55kxjjqwj63msl6pnlf-nodejs-22.14.0.drv", - "description": "Event-driven I/O framework for the V8 JavaScript engine", - "install_id": "nodejs", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "nodejs-22.14.0", - "pname": "nodejs", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "22.14.0", - "outputs_to_install": [ - "out" - ], - "outputs": { - "libv8": "/nix/store/24z3qqnvs154idkbbbpjd55m11clidad-nodejs-22.14.0-libv8", - "out": "/nix/store/067kj1aav6z9jhqbkyapjwjjrgl38ihs-nodejs-22.14.0" - }, - "system": "x86_64-darwin", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "nodejs", - "broken": false, - "derivation": "/nix/store/ylk0rgvzaj618qj0g00cwm5909hp71f0-nodejs-22.14.0.drv", - "description": "Event-driven I/O framework for the V8 JavaScript engine", - "install_id": "nodejs", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "nodejs-22.14.0", - "pname": "nodejs", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "22.14.0", - "outputs_to_install": [ - "out" - ], - "outputs": { - "libv8": "/nix/store/3ympkr1v1z4r3vfyc6ikhx1chq5g464l-nodejs-22.14.0-libv8", - "out": "/nix/store/7l1wra7b87yci5dln0hm0k8rwww6f2xj-nodejs-22.14.0" - }, - "system": "x86_64-linux", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "pnpm", - "broken": false, - "derivation": "/nix/store/a2avz1wvjdv59k1zd53azhl91ph0c5zr-pnpm-10.5.2.drv", - "description": "Fast, disk space efficient package manager for JavaScript", - "install_id": "pnpm", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "pnpm-10.5.2", - "pname": "pnpm", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "10.5.2", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/4am7jn4i2zdbavf5wsvrnrch2g281clm-pnpm-10.5.2" - }, - "system": "aarch64-darwin", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "pnpm", - "broken": false, - "derivation": "/nix/store/6lh2fisgm6f6zn3blag3zgjd8mydbgv4-pnpm-10.5.2.drv", - "description": "Fast, disk space efficient package manager for JavaScript", - "install_id": "pnpm", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "pnpm-10.5.2", - "pname": "pnpm", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "10.5.2", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/czsnfk0q4kwinyyfknbvqj1nk65dxxhz-pnpm-10.5.2" - }, - "system": "aarch64-linux", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "pnpm", - "broken": false, - "derivation": "/nix/store/b6jkwj4w27sqdnc6kb81db3gf3118zwf-pnpm-10.5.2.drv", - "description": "Fast, disk space efficient package manager for JavaScript", - "install_id": "pnpm", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "pnpm-10.5.2", - "pname": "pnpm", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "10.5.2", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/3niwypwhxnry5awvq5j0vplqrx568l66-pnpm-10.5.2" - }, - "system": "x86_64-darwin", - "group": "toplevel", - "priority": 5 - }, - { - "attr_path": "pnpm", - "broken": false, - "derivation": "/nix/store/vgqcpkx0m21bba80vbja16hzh2qhicyb-pnpm-10.5.2.drv", - "description": "Fast, disk space efficient package manager for JavaScript", - "install_id": "pnpm", - "license": "MIT", - "locked_url": "https://github.com/flox/nixpkgs?rev=ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "name": "pnpm-10.5.2", - "pname": "pnpm", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", - "rev_count": 762036, - "rev_date": "2025-03-03T13:57:36Z", - "scrape_date": "2025-03-04T00:30:58Z", - "stabilities": [ - "unstable" - ], - "unfree": false, - "version": "10.5.2", - "outputs_to_install": [ - "out" - ], - "outputs": { - "out": "/nix/store/1zbxqw7ahsnpqd2kkwfmh6j3wrh7wp24-pnpm-10.5.2" - }, - "system": "x86_64-linux", - "group": "toplevel", - "priority": 5 - } - ] -} \ No newline at end of file diff --git a/.flox/env/manifest.toml b/.flox/env/manifest.toml deleted file mode 100644 index b1e0476..0000000 --- a/.flox/env/manifest.toml +++ /dev/null @@ -1,86 +0,0 @@ -## Flox Environment Manifest ----------------------------------------- -## -## _Everything_ you need to know about the _manifest_ is here: -## -## https://flox.dev/docs/concepts/manifest -## -## ------------------------------------------------------------------- -# Flox manifest version managed by Flox CLI -version = 1 - - -## Install Packages -------------------------------------------------- -## $ flox install gum <- puts a package in [install] section below -## $ flox search gum <- search for a package -## $ flox show gum <- show all versions of a package -## ------------------------------------------------------------------- -[install] -go = { pkg-path = "go", version = "^1.23" } -pnpm.pkg-path = "pnpm" -nodejs.pkg-path = "nodejs" -colima.pkg-path = "colima" -nerdctl.pkg-path = "nerdctl" -nerdctl.systems = ["aarch64-linux", "x86_64-linux"] - - -## Environment Variables --------------------------------------------- -## ... available for use in the activated environment -## as well as [hook], [profile] scripts and [services] below. -## ------------------------------------------------------------------- -[vars] -# INTRO_MESSAGE = "It's gettin' Flox in here" - - -## Activation Hook --------------------------------------------------- -## ... run by _bash_ shell when you run 'flox activate'. -## ------------------------------------------------------------------- -[hook] -on-activate = ''' - # Autogenerated by Flox - - # Point GOENV to Flox environment cache - export GOENV="$FLOX_ENV_CACHE/goenv" - - # Install Go dependencies - go get . - - # End autogenerated by Flox -''' - - -## Profile script ---------------------------------------------------- -## ... sourced by _your shell_ when you run 'flox activate'. -## ------------------------------------------------------------------- -[profile] -# common = ''' -# gum style \ -# --foreground 212 --border-foreground 212 --border double \ -# --align center --width 50 --margin "1 2" --padding "2 4" \ -# $INTRO_MESSAGE -# ''' -## Shell specific profiles go here: -# bash = ... -# zsh = ... -# fish = ... - - -## Services ---------------------------------------------------------- -## $ flox services start <- Starts all services -## $ flox services status <- Status of running services -## $ flox activate --start-services <- Activates & starts all -## ------------------------------------------------------------------- -[services] -# myservice.command = "python3 -m http.server" - - -## Other Environment Options ----------------------------------------- -[options] -# Systems that environment is compatible with -systems = [ - "aarch64-darwin", - "aarch64-linux", - "x86_64-darwin", - "x86_64-linux", -] -# Uncomment to disable CUDA detection. -# cuda-detection = false diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..1ff075c --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,28 @@ +module.exports = { + printWidth: 100, + tabWidth: 2, + useTabs: false, + semi: true, + singleQuote: true, + trailingComma: 'es5', + bracketSpacing: true, + bracketSameLine: false, + arrowParens: 'avoid', + proseWrap: 'always', + endOfLine: 'lf', + plugins: ['prettier-plugin-astro', 'prettier-plugin-svelte'], + overrides: [ + { + files: '*.astro', + options: { + parser: 'astro', + }, + }, + { + files: '*.svelte', + options: { + parser: 'svelte', + }, + }, + ], +}; \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..9ac2fd5 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,36 @@ +{ + "recommendations": [ + // Astro and Svelte + "astro-build.astro-vscode", + "svelte.svelte-vscode", + + // TypeScript/JavaScript + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + + // Go + "golang.go", + + // Testing + "rangav.vscode-thunder-client", + "Orta.vscode-jest", + + // Git + "eamodio.gitlens", + "mhutchie.git-graph", + + // Helpful utilities + "christian-kohler.path-intellisense", + "formulahendry.auto-rename-tag", + "aaron-bond.better-comments", + "streetsidesoftware.code-spell-checker", + "naumovs.color-highlight", + "mikestead.dotenv", + "yzhang.markdown-all-in-one", + "bierner.markdown-preview-github-styles", + + // SQL for database work + "mtxr.sqltools", + "mtxr.sqltools-driver-sqlite" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..bed449f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,82 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Frontend", + "type": "node", + "request": "launch", + "cwd": "${workspaceFolder}/frontend", + "runtimeExecutable": "pnpm", + "runtimeArgs": ["dev"], + "console": "integratedTerminal" + }, + { + "name": "Launch Backend", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "${workspaceFolder}/backend", + "args": ["-service"], + "env": { + "PORT": "8888", + "BASE_URL": "http://localhost:8888", + "ENABLE_CORS": "true" + } + }, + { + "name": "Debug Frontend Container", + "type": "node", + "request": "attach", + "address": "localhost", + "port": 9229, + "localRoot": "${workspaceFolder}/frontend", + "remoteRoot": "/app", + "preLaunchTask": "Run Frontend Container (Local)" + }, + { + "name": "Debug Backend Container", + "type": "go", + "request": "attach", + "mode": "remote", + "port": 2345, + "host": "127.0.0.1", + "preLaunchTask": "Run Backend Container (Local)" + }, + { + "name": "Launch Full Stack", + "type": "node", + "request": "launch", + "cwd": "${workspaceFolder}", + "runtimeExecutable": "pnpm", + "runtimeArgs": ["dev:all"], + "console": "integratedTerminal" + }, + { + "name": "Debug Frontend Tests", + "type": "node", + "request": "launch", + "cwd": "${workspaceFolder}/frontend", + "runtimeExecutable": "pnpm", + "runtimeArgs": ["test"], + "console": "integratedTerminal" + }, + { + "name": "Debug Backend Tests", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${workspaceFolder}/backend", + "args": ["-test.v"] + } + ], + "compounds": [ + { + "name": "Debug Full Stack", + "configurations": ["Launch Frontend", "Launch Backend"] + }, + { + "name": "Debug Containers", + "configurations": ["Debug Frontend Container", "Debug Backend Container"] + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 829824e..3d5ed1e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,39 +1,88 @@ { - "IDX.aI.enableInlineCompletion": true, - "IDX.aI.enableCodebaseIndexing": true, - "deno.enable": true, - "deno.lint": true, - "deno.unstable": false, - "deno.importMap": "./deno.json", - "deno.disablePaths": ["node_modules"], - "deno.suggest.imports.hosts": { - "https://deno.land": true, - "https://esm.sh": true, - "https://cdn.skypack.dev": true, - "https://cdn.jsdelivr.net": true - }, - "files.associations": { - "*.svelte": "svelte", - "*.astro": "astro" - }, - "typescript.tsdk": "node_modules/typescript/lib", - "typescript.enablePromptUseWorkspaceTsdk": true, - "[astro]": { - "editor.defaultFormatter": "astro-build.astro-vscode" - }, - "[svelte]": { - "editor.defaultFormatter": "svelte.svelte-vscode" - }, - "svelte.plugin.svelte.compilerWarnings": { - "missing-custom-element-compile-options": "ignore" - }, + // Format settings + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.fixAll": "explicit", + "source.organizeImports": "explicit" + }, + + // Language specific settings + "[astro]": { + "editor.defaultFormatter": "astro-build.astro-vscode" + }, + "[svelte]": { + "editor.defaultFormatter": "svelte.svelte-vscode" + }, + "[go]": { + "editor.defaultFormatter": "golang.go", + "editor.insertSpaces": false, "editor.formatOnSave": true, - "eslint.validate": [ - "javascript", - "javascriptreact", - "typescript", - "typescriptreact", - "svelte", - "astro" - ] -} \ No newline at end of file + "editor.codeActionsOnSave": { + "source.organizeImports": "explicit" + } + }, + + // File associations + "files.associations": { + "*.astro": "astro", + "*.svelte": "svelte", + "*.go": "go", + "docker-compose*.yml": "yaml", + "Dockerfile*": "dockerfile" + }, + + // ESLint configuration + "eslint.validate": ["javascript", "typescript", "astro", "svelte"], + + // TypeScript settings + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true, + + // Go settings + "go.useLanguageServer": true, + "go.lintTool": "golangci-lint", + "go.formatTool": "gofmt", + "go.toolsManagement.autoUpdate": true, + + // Test settings + "jest.autoRun": { + "watch": false, + "onSave": "test-file" + }, + + // Editor settings + "editor.rulers": [80, 100], + "editor.bracketPairColorization.enabled": true, + "editor.guides.bracketPairs": true, + "editor.wordWrap": "on", + "editor.tabSize": 2, + "editor.insertSpaces": true, + + // Files settings + "files.trimTrailingWhitespace": true, + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + + // Search settings + "search.exclude": { + "**/node_modules": true, + "**/dist": true, + "**/.turbo": true, + "**/.astro": true, + "**/coverage": true, + "**/build": true + }, + + // Git settings + "git.enableSmartCommit": true, + "git.confirmSync": false, + "git.autofetch": true, + + // Thunder Client settings + "thunder-client.saveToWorkspace": true, + "thunder-client.workspaceRelativePath": "./thunder-tests", + + // Spell checker settings + "cSpell.words": ["astro", "esbuild", "nerdctl", "ogdrip", "pnpm", "rancher", "svelte", "turbo"] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..4041c96 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,118 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Start Frontend", + "type": "shell", + "command": "pnpm", + "args": ["dev:frontend"], + "isBackground": true, + "problemMatcher": { + "pattern": { + "regexp": "^.*$", + "file": 1, + "location": 2, + "message": 3 + }, + "background": { + "activeOnStart": true, + "beginsPattern": ".*", + "endsPattern": "Local:.*(localhost|127.0.0.1):\\d+" + } + } + }, + { + "label": "Start Backend", + "type": "shell", + "command": "pnpm", + "args": ["dev:backend"], + "isBackground": true, + "problemMatcher": { + "pattern": { + "regexp": "^.*$", + "file": 1, + "location": 2, + "message": 3 + }, + "background": { + "activeOnStart": true, + "beginsPattern": ".*", + "endsPattern": "Starting Open Graph API service on port.*" + } + } + }, + { + "label": "Build Project", + "type": "shell", + "command": "pnpm", + "args": ["build"], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Run Tests", + "type": "shell", + "command": "pnpm", + "args": ["test"], + "group": { + "kind": "test", + "isDefault": true + } + }, + { + "label": "Build for Local Development", + "type": "shell", + "command": "pnpm", + "args": ["nerdctl:build"] + }, + { + "label": "Build Frontend (Local)", + "type": "shell", + "command": "pnpm", + "args": ["nerdctl:build:frontend"] + }, + { + "label": "Build Backend (Local)", + "type": "shell", + "command": "pnpm", + "args": ["nerdctl:build:backend"] + }, + { + "label": "Run Frontend Container (Local)", + "type": "shell", + "command": "pnpm", + "args": ["nerdctl:run:frontend"] + }, + { + "label": "Run Backend Container (Local)", + "type": "shell", + "command": "pnpm", + "args": ["nerdctl:run:backend"] + }, + { + "label": "Build Production Images", + "type": "shell", + "command": "docker-compose", + "args": ["-f", "docker-compose.production.yml", "build"] + }, + { + "label": "Start Production Stack", + "type": "shell", + "command": "docker-compose", + "args": ["-f", "docker-compose.production.yml", "up", "-d"] + }, + { + "label": "Stop Production Stack", + "type": "shell", + "command": "docker-compose", + "args": ["-f", "docker-compose.production.yml", "down"] + }, + { + "label": "Start Full Stack (Local)", + "dependsOn": ["Start Frontend", "Start Backend"], + "dependsOrder": "parallel" + } + ] +} diff --git a/backend/mymodule b/backend/mymodule index 592cf3d..0986a0b 100755 Binary files a/backend/mymodule and b/backend/mymodule differ diff --git a/backend/package.json b/backend/package.json index 2344400..dc10a37 100644 --- a/backend/package.json +++ b/backend/package.json @@ -13,9 +13,10 @@ "start:prod": "./build/ogdrip-backend -service", "clean": "rm -rf ./build && rm -rf .turbo", "lint": "go vet ./...", + "lint:go": "golangci-lint run", "test": "go test -v ./...", "test:coverage": "go test -v -coverprofile=coverage.out ./... && go tool cover -html=coverage.out -o coverage.html" }, "dependencies": {}, "devDependencies": {} -} \ No newline at end of file +} diff --git a/frontend b/frontend index 979fdc5..7a0f364 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit 979fdc5e406ec2a56c1c06bbad81420438614b4a +Subproject commit 7a0f364564d27cdc751c3505ed186f54e856f520 diff --git a/package.json b/package.json index f252fb2..836edb1 100644 --- a/package.json +++ b/package.json @@ -17,20 +17,6 @@ "setup:backend": "mkdir -p backend/build", "test": "turbo test", "test:coverage": "turbo test:coverage", - "brew:install:docker": "brew install docker docker-compose", - "brew:install:nerdctl": "brew install nerdctl", - "docker:build": "docker-compose build", - "docker:start": "docker-compose up", - "docker:clean": "docker-compose down -v && docker-compose build --no-cache && docker-compose up", - "docker:prod:build": "docker-compose -f docker-compose.production.yml build", - "docker:prod:start": "docker-compose -f docker-compose.production.yml up -d", - "docker:prod:stop": "docker-compose -f docker-compose.production.yml down", - "rancher:start": "./scripts/rancher-helper.sh start", - "rancher:stop": "./scripts/rancher-helper.sh stop", - "rancher:status": "./scripts/rancher-helper.sh status", - "rancher:build": "./scripts/rancher-helper.sh build .", - "rancher:run": "./scripts/rancher-helper.sh run", - "rancher:check": "./scripts/rancher-helper.sh check-nerdctl", "nerdctl:setup": "./scripts/setup-nerdctl.sh", "nerdctl:build": "nerdctl build .", "nerdctl:build:frontend": "nerdctl build -t ogdrip-frontend:local ./frontend", @@ -42,9 +28,17 @@ "nerdctl:compose:down": "nerdctl compose down" }, "devDependencies": { + "@typescript-eslint/eslint-plugin": "^8.26.0", + "@typescript-eslint/parser": "^8.26.0", + "eslint": "^9.21.0", + "eslint-plugin-astro": "^1.3.1", + "eslint-plugin-svelte": "^3.0.3", "husky": "^9.1.7", "lint-staged": "^15.4.3", "prettier": "^3.5.3", + "prettier-plugin-astro": "^0.14.1", + "prettier-plugin-svelte": "^3.3.3", + "svelte-eslint-parser": "^1.0.1", "turbo": "^2.4.4" }, "engines": { @@ -55,5 +49,14 @@ "*.{js,ts,tsx,svelte,astro,css,md,json}": [ "prettier --write" ] + }, + "pnpm": { + "overrides": { + "@sveltejs/vite-plugin-svelte": "^5.0.3" + }, + "onlyBuiltDependencies": [ + "esbuild", + "sharp" + ] } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a7093a8..4bfbd4d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,10 +4,28 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + '@sveltejs/vite-plugin-svelte': ^5.0.3 + importers: .: devDependencies: + '@typescript-eslint/eslint-plugin': + specifier: ^8.26.0 + version: 8.26.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0)(typescript@5.8.2))(eslint@9.21.0)(typescript@5.8.2) + '@typescript-eslint/parser': + specifier: ^8.26.0 + version: 8.26.0(eslint@9.21.0)(typescript@5.8.2) + eslint: + specifier: ^9.21.0 + version: 9.21.0 + eslint-plugin-astro: + specifier: ^1.3.1 + version: 1.3.1(eslint@9.21.0) + eslint-plugin-svelte: + specifier: ^3.0.3 + version: 3.0.3(eslint@9.21.0)(svelte@5.22.5) husky: specifier: ^9.1.7 version: 9.1.7 @@ -17,6 +35,15 @@ importers: prettier: specifier: ^3.5.3 version: 3.5.3 + prettier-plugin-astro: + specifier: ^0.14.1 + version: 0.14.1 + prettier-plugin-svelte: + specifier: ^3.3.3 + version: 3.3.3(prettier@3.5.3)(svelte@5.22.5) + svelte-eslint-parser: + specifier: ^1.0.1 + version: 1.0.1(svelte@5.22.5) turbo: specifier: ^2.4.4 version: 2.4.4 @@ -68,24 +95,9 @@ importers: '@types/node': specifier: ^22.13.9 version: 22.13.9 - '@typescript-eslint/eslint-plugin': - specifier: ^8.26.0 - version: 8.26.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0)(typescript@5.8.2))(eslint@9.21.0)(typescript@5.8.2) - '@typescript-eslint/parser': - specifier: ^8.26.0 - version: 8.26.0(eslint@9.21.0)(typescript@5.8.2) '@vitest/coverage-v8': specifier: ^3.0.7 version: 3.0.7(vitest@3.0.7(@types/debug@4.1.12)(@types/node@22.13.9)(jsdom@26.0.0)(yaml@2.7.0)) - eslint: - specifier: ^9.21.0 - version: 9.21.0 - eslint-plugin-astro: - specifier: ^1.3.1 - version: 1.3.1(eslint@9.21.0) - eslint-plugin-svelte: - specifier: ^3.0.3 - version: 3.0.3(eslint@9.21.0)(svelte@5.22.5) jsdom: specifier: ^26.0.0 version: 26.0.0 @@ -1049,7 +1061,7 @@ packages: resolution: {integrity: sha512-J/Nmb2Q2y7mck2hyCX4ckVHcR5tu2J+MtBEQqpDrrgELZ2uvraQcK/ioCV61AqkdXFgriksOKIceDcQmqnGhVw==} engines: {node: ^18.0.0 || ^20.0.0 || >=22} peerDependencies: - '@sveltejs/vite-plugin-svelte': ^5.0.0 + '@sveltejs/vite-plugin-svelte': ^5.0.3 svelte: ^5.0.0 vite: ^6.0.0 @@ -2673,6 +2685,16 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + prettier-plugin-astro@0.14.1: + resolution: {integrity: sha512-RiBETaaP9veVstE4vUwSIcdATj6dKmXljouXc/DDNwBSPTp8FRkLGDSGFClKsAFeeg+13SB0Z1JZvbD76bigJw==} + engines: {node: ^14.15.0 || >=16.0.0} + + prettier-plugin-svelte@3.3.3: + resolution: {integrity: sha512-yViK9zqQ+H2qZD1w/bH7W8i+bVfKrD8GIFjkFe4Thl6kCT9SlAsXVNmt3jCvQOCsnOhcvYgsoVlRV/Eu6x5nNw==} + peerDependencies: + prettier: ^3.0.0 + svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 + prettier@3.5.3: resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} engines: {node: '>=14'} @@ -2819,9 +2841,15 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + s.color@0.0.15: + resolution: {integrity: sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==} + safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + sass-formatter@0.7.9: + resolution: {integrity: sha512-CWZ8XiSim+fJVG0cFLStwDvft1VI7uvXdCNJYXhDvowiv+DsbD1nXLiQ4zrE5UBvj5DWZJ93cwN0NX5PMsr1Pw==} + saxes@6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} @@ -2951,6 +2979,9 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + suf-log@2.5.3: + resolution: {integrity: sha512-KvC8OPjzdNOe+xQ4XWJV2whQA0aM1kGVczMQ8+dStAO6KfEB140JEVQ9dE76ONZ0/Ylf67ni4tILPJB41U0eow==} + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -6459,6 +6490,17 @@ snapshots: prelude-ls@1.2.1: {} + prettier-plugin-astro@0.14.1: + dependencies: + '@astrojs/compiler': 2.10.4 + prettier: 3.5.3 + sass-formatter: 0.7.9 + + prettier-plugin-svelte@3.3.3(prettier@3.5.3)(svelte@5.22.5): + dependencies: + prettier: 3.5.3 + svelte: 5.22.5 + prettier@3.5.3: {} pretty-format@27.5.1: @@ -6663,8 +6705,14 @@ snapshots: dependencies: queue-microtask: 1.2.3 + s.color@0.0.15: {} + safer-buffer@2.1.2: {} + sass-formatter@0.7.9: + dependencies: + suf-log: 2.5.3 + saxes@6.0.0: dependencies: xmlchars: 2.2.0 @@ -6818,6 +6866,10 @@ snapshots: strip-json-comments@3.1.1: {} + suf-log@2.5.3: + dependencies: + s.color: 0.0.15 + supports-color@7.2.0: dependencies: has-flag: 4.0.0