From a27aeedf58febf3ba774006de97c2d18de90eba3 Mon Sep 17 00:00:00 2001 From: Deepak Mallubhotla Date: Mon, 6 Oct 2025 12:50:53 -0500 Subject: [PATCH] initial commit with claude's skeleton --- .gitattributes | 1 + .gitignore | 28 +++++++++++++++++ README.md | 6 ++++ flake.lock | 62 ++++++++++++++++++++++++++++++++++++++ flake.nix | 45 +++++++++++++++++++++++++++ frontend/package.json | 16 ++++++++++ frontend/public/index.html | 13 ++++++++ frontend/src/App.svelte | 36 ++++++++++++++++++++++ frontend/src/app.css | 49 ++++++++++++++++++++++++++++++ frontend/src/main.js | 8 +++++ frontend/vite.config.js | 10 ++++++ justfile | 46 ++++++++++++++++++++++++++++ treefmt.nix | 21 +++++++++++++ 13 files changed, 341 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 README.md create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 frontend/package.json create mode 100644 frontend/public/index.html create mode 100644 frontend/src/App.svelte create mode 100644 frontend/src/app.css create mode 100644 frontend/src/main.js create mode 100644 frontend/vite.config.js create mode 100644 justfile create mode 100644 treefmt.nix diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d945ccb --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +.direnv/ +.envrc + +# Frontend +frontend/node_modules +frontend/dist +frontend/dist-ssr +frontend/*.local + +# Logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + diff --git a/README.md b/README.md new file mode 100644 index 0000000..9c27ba2 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +Taiga + +--- + +Frontend tester for trygo app + diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..e2196a6 --- /dev/null +++ b/flake.lock @@ -0,0 +1,62 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1758690382, + "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e643668fd71b949c53f8626614b21ff71a07379d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1754340878, + "narHash": "sha256-lgmUyVQL9tSnvvIvBp7x1euhkkCho7n3TMzgjdvgPoU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "cab778239e705082fe97bb4990e0d24c50924c04", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "treefmt-nix": "treefmt-nix" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1758728421, + "narHash": "sha256-ySNJ008muQAds2JemiyrWYbwbG+V7S5wg3ZVKGHSFu8=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "5eda4ee8121f97b218f7cc73f5172098d458f1d1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f94ac30 --- /dev/null +++ b/flake.nix @@ -0,0 +1,45 @@ +{ + description = "Basic flake and files - change me"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + treefmt-nix.url = "github:numtide/treefmt-nix"; + }; + + outputs = + { nixpkgs, ... }@inputs: + let + supportedSystems = [ "x86_64-linux" ]; + pkgsFor = + system: + nixpkgs.legacyPackages.${system}.extend ( + nixpkgs.lib.composeManyExtensions ([ ]) + # nixpkgs.lib.composeManyExtensions ([ ] ++ builtins.attrValues self.overlays) + ); + eachSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f (pkgsFor system)); + + treefmtEval = eachSystem (pkgs: inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix); + in + { + # nix fmt formatter + formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper); + + # default devshell + + devShells = eachSystem (pkgs: { + default = pkgs.mkShell { + packages = with pkgs; [ + just + nodejs + nodePackages.pnpm + ]; + + # Will be executed before entering the shell + # or running a command + shellHook = '' + echo "Dev env ready" + ''; + }; + }); + }; +} diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 0000000..ef4e682 --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,16 @@ +{ + "name": "taiga-frontend", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "svelte": "^4.2.7", + "vite": "^5.0.8" + } +} \ No newline at end of file diff --git a/frontend/public/index.html b/frontend/public/index.html new file mode 100644 index 0000000..b6dc863 --- /dev/null +++ b/frontend/public/index.html @@ -0,0 +1,13 @@ + + + + + + + Taiga Frontend + + +
+ + + \ No newline at end of file diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte new file mode 100644 index 0000000..7489879 --- /dev/null +++ b/frontend/src/App.svelte @@ -0,0 +1,36 @@ + + +
+

Hello {name}!

+

Welcome to your Svelte frontend for Taiga

+

This is a skeleton structure ready for your web app development.

+
+ + \ No newline at end of file diff --git a/frontend/src/app.css b/frontend/src/app.css new file mode 100644 index 0000000..68eaba8 --- /dev/null +++ b/frontend/src/app.css @@ -0,0 +1,49 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } +} \ No newline at end of file diff --git a/frontend/src/main.js b/frontend/src/main.js new file mode 100644 index 0000000..e2b2c33 --- /dev/null +++ b/frontend/src/main.js @@ -0,0 +1,8 @@ +import './app.css' +import App from './App.svelte' + +const app = new App({ + target: document.getElementById('app'), +}) + +export default app \ No newline at end of file diff --git a/frontend/vite.config.js b/frontend/vite.config.js new file mode 100644 index 0000000..b739263 --- /dev/null +++ b/frontend/vite.config.js @@ -0,0 +1,10 @@ +import { defineConfig } from 'vite' +import { svelte } from '@sveltejs/vite-plugin-svelte' + +export default defineConfig({ + plugins: [svelte()], + server: { + port: 5173, + host: true + } +}) \ No newline at end of file diff --git a/justfile b/justfile new file mode 100644 index 0000000..e60fc65 --- /dev/null +++ b/justfile @@ -0,0 +1,46 @@ +# by default list all just commands +default: + just --list + +# run all tests +test: + #!/usr/bin/env bash + set -euxo pipefail + + # would love test: fmt to make sure formatting happens but in WSL formatting is slow... + # poor filesystem access performance + + echo "testing..." + nix flake check + # uv run ruff check src tests + +# + +# format code +fmt: + #!/usr/bin/env bash + set -euxo pipefail + nix fmt + +# frontend development commands +dev-frontend: + #!/usr/bin/env bash + set -euxo pipefail + cd frontend + pnpm install + pnpm run dev + +# build frontend +build-frontend: + #!/usr/bin/env bash + set -euxo pipefail + cd frontend + pnpm install + pnpm run build + +# install frontend dependencies +install-frontend: + #!/usr/bin/env bash + set -euxo pipefail + cd frontend + pnpm install diff --git a/treefmt.nix b/treefmt.nix new file mode 100644 index 0000000..aa39100 --- /dev/null +++ b/treefmt.nix @@ -0,0 +1,21 @@ +# treefmt.nix +{ ... }: +{ + projectRootFile = "treefmt.nix"; + settings.global.excludes = [ + "*.toml" + "*.txt" + ".gitattributes" + "CLAUDE.md" + ".python-version" + ]; + + programs.deadnix.enable = true; + programs.mdsh.enable = true; + programs.nixfmt.enable = true; + programs.shellcheck.enable = true; + programs.shfmt.enable = true; + programs.yamlfmt.enable = true; + programs.just.enable = true; + +}