diff --git a/distribution/build.gradle.kts b/distribution/build.gradle.kts index 7abe644..8571056 100644 --- a/distribution/build.gradle.kts +++ b/distribution/build.gradle.kts @@ -4,6 +4,16 @@ // together into a bootable Spring Boot application. It is referenced by // the Dockerfile (stage 1) which produces the shipping image documented // in the architecture spec, sections 10 and 11. +// +// **Web SPA bundling.** The `:web` subproject is a Gradle wrapper around +// the Vite/React build. We declare a `webStaticBundle` consumer +// configuration against it; the `bundleWebStatic` Sync task copies +// the dist/ directory into `${buildDir}/web-static/static/` and that +// parent directory is added to the main resources source set so Spring +// Boot's `classpath:/static/**` resource resolver picks the SPA up at +// runtime. The result is a single fat-jar containing both the JVM +// backend and the SPA — no nginx, no separate static-file server, no +// CORS. plugins { alias(libs.plugins.kotlin.jvm) @@ -89,4 +99,45 @@ tasks.bootRun { // /plugins-dev/, not /distribution/plugins-dev/. workingDir = rootProject.layout.projectDirectory.asFile dependsOn(":reference-customer:plugin-printing-shop:installToDev") + // Make sure the SPA dist/ is staged into the classpath before + // Spring Boot starts; otherwise an in-IDE bootRun with no prior + // build serves a 404 at the root path. processResources already + // depends on bundleWebStatic, but listing it explicitly here + // makes the relationship visible to anyone reading bootRun. + dependsOn("bundleWebStatic") +} + +// ─── Web SPA bundling ──────────────────────────────────────────────── +// +// Resolvable configuration that pulls the `webStaticBundle` artifact +// from `:web`. The `:web` subproject's outgoing configuration declares +// the dist/ directory as its single artifact, built by the npmBuild +// Exec task. We don't need attribute matchers because there's only +// one artifact in the configuration. +val webStaticBundle: Configuration by configurations.creating { + isCanBeConsumed = false + isCanBeResolved = true +} + +dependencies { + webStaticBundle(project(mapOf("path" to ":web", "configuration" to "webStaticBundle"))) +} + +// Stage the SPA dist into ${buildDir}/web-static/static/ so the +// directory layout matches Spring Boot's classpath:/static/ convention. +// Adding the parent dir as a resource source set is what then makes +// the JAR's classpath include those files at the right path. +val bundleWebStatic by tasks.registering(Sync::class) { + group = "build" + description = "Stage the :web SPA bundle into the distribution resources tree." + from({ webStaticBundle }) + into(layout.buildDirectory.dir("web-static/static")) +} + +sourceSets.named("main") { + resources.srcDir(layout.buildDirectory.dir("web-static")) +} + +tasks.named("processResources") { + dependsOn(bundleWebStatic) } diff --git a/distribution/src/main/kotlin/org/vibeerp/demo/DemoSeedRunner.kt b/distribution/src/main/kotlin/org/vibeerp/demo/DemoSeedRunner.kt new file mode 100644 index 0000000..5c22898 --- /dev/null +++ b/distribution/src/main/kotlin/org/vibeerp/demo/DemoSeedRunner.kt @@ -0,0 +1,253 @@ +package org.vibeerp.demo + +import org.slf4j.LoggerFactory +import org.springframework.boot.CommandLineRunner +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty +import org.springframework.stereotype.Component +import org.springframework.transaction.annotation.Transactional +import org.vibeerp.pbc.catalog.application.CreateItemCommand +import org.vibeerp.pbc.catalog.application.ItemService +import org.vibeerp.pbc.catalog.domain.ItemType +import org.vibeerp.pbc.inventory.application.CreateLocationCommand +import org.vibeerp.pbc.inventory.application.LocationService +import org.vibeerp.pbc.inventory.application.StockBalanceService +import org.vibeerp.pbc.inventory.domain.LocationType +import org.vibeerp.pbc.orders.purchase.application.CreatePurchaseOrderCommand +import org.vibeerp.pbc.orders.purchase.application.PurchaseOrderLineCommand +import org.vibeerp.pbc.orders.purchase.application.PurchaseOrderService +import org.vibeerp.pbc.orders.sales.application.CreateSalesOrderCommand +import org.vibeerp.pbc.orders.sales.application.SalesOrderLineCommand +import org.vibeerp.pbc.orders.sales.application.SalesOrderService +import org.vibeerp.pbc.partners.application.CreatePartnerCommand +import org.vibeerp.pbc.partners.application.PartnerService +import org.vibeerp.pbc.partners.domain.PartnerType +import org.vibeerp.platform.persistence.security.PrincipalContext +import java.math.BigDecimal +import java.time.LocalDate + +/** + * One-shot demo data seeder, gated behind `vibeerp.demo.seed=true`. + * + * **Why this exists.** Out-of-the-box, vibe_erp boots against an + * empty Postgres and the SPA dashboard shows zeros for every PBC. + * Onboarding a new operator (or running a tomorrow-morning demo) + * needs a couple of minutes of clicking to create items, + * locations, partners, and a starting inventory before the + * interesting screens become useful. This runner stages a tiny + * but representative dataset on first boot so the moment the + * bootstrap admin lands on `/`, every page already has rows. + * + * **Opt-in by property.** `@ConditionalOnProperty` keeps this + * bean entirely absent from production deployments — only the + * dev profile (`application-dev.yaml` sets `vibeerp.demo.seed: + * true`) opts in. A future release can ship a `--demo` CLI flag + * or a one-time admin "Load demo data" button that flips the + * same property at runtime; for v1 the dev profile is enough. + * + * **Idempotent.** The runner checks for one of its own seeded + * item codes and short-circuits if already present. Restarting + * the dev server is a no-op; deleting the demo data has to + * happen via SQL or by dropping the DB. Idempotency on the + * sentinel item is intentional (vs. on every entity it creates): + * a half-seeded DB from a crashed first run will *not* recover + * cleanly, but that case is exotic and we can clear and retry + * in dev. + * + * **All seeded data shares the `DEMO-` prefix.** Items, partners, + * locations, and order codes all start with `DEMO-`. This makes + * the seeded data trivially distinguishable from anything an + * operator creates by hand later — and gives a future + * "delete demo data" command an obvious filter. + * + * **System principal.** Audit columns need a non-blank + * `created_by`; `PrincipalContext.runAs("__demo_seed__")` wraps + * the entire seed so every row carries that sentinel. The + * authorization aspect (`@RequirePermission`) lives on + * controllers, not services — calling services directly bypasses + * it cleanly, which is correct for system-level seeders. + * + * **Why CommandLineRunner.** Equivalent to `ApplicationRunner` + * here — there are no command-line args this seeder cares about. + * Spring runs every CommandLineRunner once, after the application + * context is fully initialized but before serving traffic, which + * is exactly the right window: services are wired, the schema is + * applied, but the first HTTP request hasn't arrived yet. + * + * **Lives in distribution.** This is the only module that + * already depends on every PBC, which is what the seeder needs + * to compose. It's gated behind a property the production + * application.yaml never sets, so its presence in the fat-jar + * is dormant unless explicitly opted in. + */ +@Component +@ConditionalOnProperty(prefix = "vibeerp.demo", name = ["seed"], havingValue = "true") +class DemoSeedRunner( + private val itemService: ItemService, + private val locationService: LocationService, + private val stockBalanceService: StockBalanceService, + private val partnerService: PartnerService, + private val salesOrderService: SalesOrderService, + private val purchaseOrderService: PurchaseOrderService, +) : CommandLineRunner { + + private val log = LoggerFactory.getLogger(DemoSeedRunner::class.java) + + @Transactional + override fun run(vararg args: String?) { + if (itemService.findByCode(SENTINEL_ITEM_CODE) != null) { + log.info("Demo seed: data already present (sentinel item {} found); skipping", SENTINEL_ITEM_CODE) + return + } + + log.info("Demo seed: populating starter dataset…") + PrincipalContext.runAs("__demo_seed__") { + seedItems() + seedLocations() + seedPartners() + seedStock() + seedSalesOrder() + seedPurchaseOrder() + } + log.info("Demo seed: done") + } + + // ─── Items ─────────────────────────────────────────────────────── + + private fun seedItems() { + item(SENTINEL_ITEM_CODE, "A4 paper, 80gsm, white", ItemType.GOOD, "sheet") + item("DEMO-INK-CYAN", "Cyan offset ink", ItemType.GOOD, "kg") + item("DEMO-INK-MAGENTA", "Magenta offset ink", ItemType.GOOD, "kg") + item("DEMO-CARD-BIZ", "Business cards, 100/pack", ItemType.GOOD, "pack") + item("DEMO-BROCHURE-A5", "Folded A5 brochure", ItemType.GOOD, "ea") + } + + private fun item(code: String, name: String, type: ItemType, baseUomCode: String) { + itemService.create( + CreateItemCommand( + code = code, + name = name, + description = null, + itemType = type, + baseUomCode = baseUomCode, + active = true, + ), + ) + } + + // ─── Locations ─────────────────────────────────────────────────── + + private fun seedLocations() { + location("DEMO-WH-RAW", "Raw materials warehouse") + location("DEMO-WH-FG", "Finished goods warehouse") + } + + private fun location(code: String, name: String) { + locationService.create( + CreateLocationCommand( + code = code, + name = name, + type = LocationType.WAREHOUSE, + active = true, + ), + ) + } + + // ─── Partners ──────────────────────────────────────────────────── + + private fun seedPartners() { + partner("DEMO-CUST-ACME", "Acme Print Co.", PartnerType.CUSTOMER, "ap@acme.example") + partner("DEMO-CUST-GLOBE", "Globe Marketing", PartnerType.CUSTOMER, "ops@globe.example") + partner("DEMO-SUPP-PAPERWORLD", "Paper World Ltd.", PartnerType.SUPPLIER, "sales@paperworld.example") + partner("DEMO-SUPP-INKCO", "InkCo Industries", PartnerType.SUPPLIER, "orders@inkco.example") + } + + private fun partner(code: String, name: String, type: PartnerType, email: String) { + partnerService.create( + CreatePartnerCommand( + code = code, + name = name, + type = type, + email = email, + active = true, + ), + ) + } + + // ─── Initial stock ─────────────────────────────────────────────── + + private fun seedStock() { + val rawWh = locationService.findByCode("DEMO-WH-RAW")!! + val fgWh = locationService.findByCode("DEMO-WH-FG")!! + + stockBalanceService.adjust(SENTINEL_ITEM_CODE, rawWh.id, BigDecimal("5000")) + stockBalanceService.adjust("DEMO-INK-CYAN", rawWh.id, BigDecimal("50")) + stockBalanceService.adjust("DEMO-INK-MAGENTA", rawWh.id, BigDecimal("50")) + + stockBalanceService.adjust("DEMO-CARD-BIZ", fgWh.id, BigDecimal("200")) + stockBalanceService.adjust("DEMO-BROCHURE-A5", fgWh.id, BigDecimal("100")) + } + + // ─── Open sales order (DRAFT — ready to confirm + ship) ────────── + + private fun seedSalesOrder() { + salesOrderService.create( + CreateSalesOrderCommand( + code = "DEMO-SO-0001", + partnerCode = "DEMO-CUST-ACME", + orderDate = LocalDate.now(), + currencyCode = "USD", + lines = listOf( + SalesOrderLineCommand( + lineNo = 1, + itemCode = "DEMO-CARD-BIZ", + quantity = BigDecimal("50"), + unitPrice = BigDecimal("12.50"), + currencyCode = "USD", + ), + SalesOrderLineCommand( + lineNo = 2, + itemCode = "DEMO-BROCHURE-A5", + quantity = BigDecimal("20"), + unitPrice = BigDecimal("4.75"), + currencyCode = "USD", + ), + ), + ), + ) + } + + // ─── Open purchase order (DRAFT — ready to confirm + receive) ──── + + private fun seedPurchaseOrder() { + purchaseOrderService.create( + CreatePurchaseOrderCommand( + code = "DEMO-PO-0001", + partnerCode = "DEMO-SUPP-PAPERWORLD", + orderDate = LocalDate.now(), + expectedDate = LocalDate.now().plusDays(7), + currencyCode = "USD", + lines = listOf( + PurchaseOrderLineCommand( + lineNo = 1, + itemCode = SENTINEL_ITEM_CODE, + quantity = BigDecimal("10000"), + unitPrice = BigDecimal("0.04"), + currencyCode = "USD", + ), + ), + ), + ) + } + + companion object { + /** + * The seeder uses the presence of this item as the + * idempotency marker — re-running the seeder against a + * Postgres that already contains it short-circuits. The + * choice of "the very first item the seeder creates" is + * deliberate: if the seed transaction commits at all, this + * row is in the DB; if it doesn't, nothing is. + */ + const val SENTINEL_ITEM_CODE: String = "DEMO-PAPER-A4" + } +} diff --git a/distribution/src/main/resources/application-dev.yaml b/distribution/src/main/resources/application-dev.yaml index 752cea8..da7677f 100644 --- a/distribution/src/main/resources/application-dev.yaml +++ b/distribution/src/main/resources/application-dev.yaml @@ -21,6 +21,14 @@ vibeerp: directory: ./plugins-dev files: local-path: ./files-dev + demo: + # Opt in to the one-shot DemoSeedRunner (in distribution/.../demo/) + # which stages a tiny but representative dataset on first boot. + # Idempotent — the runner checks for its own sentinel item before + # creating anything, so restarting the dev server is a no-op once + # the seed has been applied. Production deployments leave this + # property unset and the @ConditionalOnProperty bean never loads. + seed: true logging: level: diff --git a/gradle.properties b/gradle.properties index d2007e3..1a0f62e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,6 +19,6 @@ kotlin.incremental=true # api/api-v1/build.gradle.kts. # Bump this line in lockstep with PROGRESS.md's "Latest version" # row when shipping a new working surface. -vibeerp.version=0.28.0-SNAPSHOT +vibeerp.version=0.29.0-SNAPSHOT vibeerp.api.version=1.0.0-SNAPSHOT vibeerp.group=org.vibeerp diff --git a/platform/platform-bootstrap/src/main/kotlin/org/vibeerp/platform/bootstrap/web/SpaController.kt b/platform/platform-bootstrap/src/main/kotlin/org/vibeerp/platform/bootstrap/web/SpaController.kt new file mode 100644 index 0000000..d200536 --- /dev/null +++ b/platform/platform-bootstrap/src/main/kotlin/org/vibeerp/platform/bootstrap/web/SpaController.kt @@ -0,0 +1,89 @@ +package org.vibeerp.platform.bootstrap.web + +import org.springframework.stereotype.Controller +import org.springframework.web.bind.annotation.GetMapping + +/** + * Static SPA fallback controller. + * + * **The problem.** The vibe_erp Web SPA (the `:web` Gradle subproject) + * uses React Router's HTML5 history mode for client-side routing. + * When a user hits `http://host/sales-orders` directly — by typing + * the URL, refreshing the page, or clicking a deep link — Spring + * Boot's static resource handler tries to serve a file at + * `static/sales-orders` and returns 404 because no such file + * exists. The actual routing for `/sales-orders` lives inside the + * SPA's compiled JavaScript, so we need the server to return + * `static/index.html` for every SPA route and let React Router + * take over once the bundle has loaded. + * + * **Why an explicit list, not a catch-all.** Spring Security needs + * to permit the same paths the SPA uses, and a catch-all + * `@GetMapping` with a wildcard path matcher would also intercept + * legitimate 404s for typoed API URLs under the api-v1 prefix + * (turning them into "here's the SPA's 404 page" instead of an + * honest server-side 404). Listing the SPA's known top-level routes + * here keeps the seam explicit: adding a new sidebar item to + * AppLayout.tsx requires adding the route here. The list is small + * (12 entries) so the maintenance cost is trivial; if it ever + * passes ~25 entries we can revisit with a single regex matcher. + * + * **Forward, not redirect.** `forward:/index.html` is an internal + * RequestDispatcher.forward — the URL bar still shows + * `/sales-orders` and Spring Security still sees the original + * request path. Redirecting (`redirect:/index.html`) would lose + * the deep link entirely and break the back button. + * + * **The "/" entry.** Without it, hitting the root would also fall + * through to the static resource handler, which DOES correctly + * serve `static/index.html` for `/`. We list it explicitly anyway + * so the route table is self-explanatory. + * + * **API paths are NOT in this list.** Anything under the api-v1 + * prefix matches a `@RestController` mapping registered higher up + * in the request-mapping chain, so the SPA fallback is never + * reached for an authentic API request. For an UNKNOWN API path, + * the absence of a controller match returns a real 404, which is + * what we want. + * + * **Where this controller is in the build.** Lives in + * `platform-bootstrap` rather than `:distribution` because it is + * a `@Controller` that needs to be picked up by Spring's component + * scan, and `platform-bootstrap` is the only module with the + * `@SpringBootApplication`. Putting it in `:distribution` would + * require adding a Spring scan to a module that has zero Kotlin + * sources of its own. + */ +@Controller +class SpaController { + + @GetMapping( + value = [ + // Root + auth + "/", + "/login", + + // Catalog & partners + "/items", "/items/", "/items/**", + "/uoms", "/uoms/", "/uoms/**", + "/partners", "/partners/", "/partners/**", + + // Inventory + "/locations", "/locations/", "/locations/**", + "/balances", "/balances/", "/balances/**", + "/movements", "/movements/", "/movements/**", + + // Orders + "/sales-orders", "/sales-orders/", "/sales-orders/**", + "/purchase-orders", "/purchase-orders/", "/purchase-orders/**", + + // Production + "/work-orders", "/work-orders/", "/work-orders/**", + "/shop-floor", "/shop-floor/", "/shop-floor/**", + + // Finance + "/journal-entries", "/journal-entries/", "/journal-entries/**", + ], + ) + fun spa(): String = "forward:/index.html" +} diff --git a/platform/platform-security/src/main/kotlin/org/vibeerp/platform/security/SecurityConfiguration.kt b/platform/platform-security/src/main/kotlin/org/vibeerp/platform/security/SecurityConfiguration.kt index 4d0d313..868f00c 100644 --- a/platform/platform-security/src/main/kotlin/org/vibeerp/platform/security/SecurityConfiguration.kt +++ b/platform/platform-security/src/main/kotlin/org/vibeerp/platform/security/SecurityConfiguration.kt @@ -37,6 +37,15 @@ class SecurityConfiguration { .cors { } // default; tighten in v0.4 once the React SPA exists .sessionManagement { it.sessionCreationPolicy(SessionCreationPolicy.STATELESS) } .authorizeHttpRequests { auth -> + // ─── Public API endpoints ─────────────────────────── + // + // The framework's API surface is split into a tiny + // public allowlist and a much larger authenticated + // surface. Listing the public bits explicitly first + // (and authenticating /api/** as a whole afterwards) + // keeps the matcher precedence honest: a typo in a + // public path can never accidentally permit an + // authenticated endpoint. auth.requestMatchers( // Public actuator probes "/actuator/health", @@ -46,17 +55,65 @@ class SecurityConfiguration { // Auth endpoints themselves cannot require auth "/api/v1/auth/login", "/api/v1/auth/refresh", - // OpenAPI / Swagger UI — public because it describes the - // API surface, not the data. The *data* still requires a - // valid JWT: an unauthenticated "Try it out" call from - // the Swagger UI against a pbc endpoint returns 401 just - // like a curl does. Exposing the spec is the first step - // toward both the future R1 web SPA (OpenAPI codegen) - // and the A1 MCP server (discoverable tool catalog). + // OpenAPI / Swagger UI — public because it describes + // the API surface, not the data. The *data* still + // requires a valid JWT: an unauthenticated "Try it + // out" call against a pbc endpoint returns 401. "/v3/api-docs/**", "/swagger-ui/**", "/swagger-ui.html", ).permitAll() + + // Every other /api/** call requires a Bearer JWT. + // This MUST come before the SPA permitAll below; the + // permit-all rule for "/" + static assets uses + // anyRequest() and would otherwise swallow API calls + // too. The order preserves the framework's "API is + // always authenticated" invariant even as the SPA + // moves into the same fat-jar. + auth.requestMatchers("/api/**").authenticated() + + // ─── Web SPA (the :web React+TS bundle) ───────────── + // + // Static asset paths the Vite build produces. + // Permitted because the SPA itself is just HTML+CSS+JS + // — every secret is fetched from /api/** which is + // already gated above. A user without a valid JWT + // sees the login page instead of a forbidden screen, + // which is the correct UX. + auth.requestMatchers( + "/", + "/index.html", + "/favicon.svg", + "/favicon.ico", + "/manifest.json", + "/assets/**", + "/static/**", + ).permitAll() + + // SPA route paths handled by the SpaController in + // platform-bootstrap (which forwards them to + // /index.html so React Router can take over). The + // controller and this list MUST stay in sync — adding + // a sidebar entry to AppLayout.tsx implies updating + // both. See SpaController for the rationale. + auth.requestMatchers( + "/login", + "/items", "/items/**", + "/uoms", "/uoms/**", + "/partners", "/partners/**", + "/locations", "/locations/**", + "/balances", "/balances/**", + "/movements", "/movements/**", + "/sales-orders", "/sales-orders/**", + "/purchase-orders", "/purchase-orders/**", + "/work-orders", "/work-orders/**", + "/shop-floor", "/shop-floor/**", + "/journal-entries", "/journal-entries/**", + ).permitAll() + + // Anything else — return 401 so a typoed deep link + // doesn't accidentally serve the SPA shell. auth.anyRequest().authenticated() } .oauth2ResourceServer { rs -> diff --git a/settings.gradle.kts b/settings.gradle.kts index 99d1eed..3f25077 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -89,6 +89,16 @@ project(":pbc:pbc-production").projectDir = file("pbc/pbc-production") include(":reference-customer:plugin-printing-shop") project(":reference-customer:plugin-printing-shop").projectDir = file("reference-customer/plugin-printing-shop") +// ─── Web SPA ──────────────────────────────────────────────────────── +// +// `:web` is a Gradle wrapper around an npm build. It produces a +// `dist/` directory of static assets that `:distribution` consumes +// at processResources time. See `web/build.gradle.kts` for the +// rationale (no Kotlin/JVM source set, no node-gradle plugin — +// just Exec tasks against system npm). +include(":web") +project(":web").projectDir = file("web") + // ─── Distribution (assembles the runnable image) ──────────────────── include(":distribution") project(":distribution").projectDir = file("distribution") diff --git a/web/.gitignore b/web/.gitignore new file mode 100644 index 0000000..7ddcb4e --- /dev/null +++ b/web/.gitignore @@ -0,0 +1,10 @@ +node_modules/ +dist/ +.vite/ +*.log +.DS_Store +*.tsbuildinfo +# Compiled outputs from `tsc -b` for the project reference +# (vite.config.ts → vite.config.d.ts + vite.config.js). +vite.config.d.ts +vite.config.js diff --git a/web/build.gradle.kts b/web/build.gradle.kts new file mode 100644 index 0000000..fc69765 --- /dev/null +++ b/web/build.gradle.kts @@ -0,0 +1,92 @@ +// vibe_erp web SPA — Gradle wrapper around the npm build. +// +// **Why no Kotlin/JVM source set.** This subproject has zero JVM +// code: every artifact under src/ is TypeScript/React. The Gradle +// presence is purely so `./gradlew build` runs the npm build as +// part of the standard build pipeline, and so :distribution can +// declare a normal project dependency on the produced static +// bundle instead of a fragile path reference. +// +// **Tasks.** +// - `npmInstall` → runs `npm install` in web/. Inputs: +// package.json + package-lock.json. Output: node_modules/. +// - `npmBuild` → runs `npm run build` in web/. Inputs: +// src/**, index.html, vite.config.ts, tsconfig*.json, +// tailwind.config.js, postcss.config.js. Output: dist/. +// - `assemble` → wired to depend on npmBuild so a normal +// `./gradlew :web:build` produces dist/. +// +// **No npm/node Gradle plugin.** I deliberately avoided +// `com.github.node-gradle.node` to keep the dep surface minimal — +// every plugin is one more thing to keep current with Gradle and +// JDK upgrades. Exec tasks are stable and the inputs/outputs +// declarations give Gradle the same up-to-date checking the plugin +// would. +// +// **Where the bundle goes.** Read by `:distribution` as a normal +// project artifact via the `webStaticBundle` configuration below; +// the consuming module copies dist/ into the Spring Boot +// classpath under `static/` at processResources time so the +// bootJar contains the entire SPA. + +import org.gradle.api.tasks.Exec + +plugins { + base +} + +description = "vibe_erp web SPA — Vite + React + TS, served by Spring Boot at the root path." + +// Resolve npm against the system PATH. Same approach as the +// reference plug-in's installToDev task — keeps developer setup +// simple ("you must have node + npm on PATH"). +val npmCommand: String = if (org.gradle.internal.os.OperatingSystem.current().isWindows) "npm.cmd" else "npm" + +val npmInstall by tasks.registering(Exec::class) { + group = "build" + description = "Run `npm install` in web/." + workingDir = projectDir + commandLine(npmCommand, "install", "--no-audit", "--no-fund", "--silent") + + inputs.file("package.json") + inputs.file("package-lock.json").optional() + outputs.dir("node_modules") +} + +val npmBuild by tasks.registering(Exec::class) { + group = "build" + description = "Run `npm run build` in web/. Produces dist/." + workingDir = projectDir + commandLine(npmCommand, "run", "build") + + dependsOn(npmInstall) + + inputs.dir("src") + inputs.file("index.html") + inputs.file("vite.config.ts") + inputs.file("tsconfig.json") + inputs.file("tsconfig.node.json") + inputs.file("tailwind.config.js") + inputs.file("postcss.config.js") + inputs.file("package.json") + + outputs.dir("dist") +} + +tasks.named("assemble") { + dependsOn(npmBuild) +} + +// Outgoing configuration so :distribution can consume the dist +// directory as a normal Gradle artifact. Using a single-element +// `artifacts` block keeps the consumer side trivial. +val webStaticBundle: Configuration by configurations.creating { + isCanBeConsumed = true + isCanBeResolved = false +} + +artifacts { + add(webStaticBundle.name, file("dist")) { + builtBy(npmBuild) + } +} diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..9672f87 --- /dev/null +++ b/web/index.html @@ -0,0 +1,14 @@ + + + + + + + + vibe_erp + + +
+ + + diff --git a/web/package-lock.json b/web/package-lock.json new file mode 100644 index 0000000..9d195ae --- /dev/null +++ b/web/package-lock.json @@ -0,0 +1,2765 @@ +{ + "name": "vibe-erp-web", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "vibe-erp-web", + "version": "0.0.0", + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-router-dom": "^6.28.0" + }, + "devDependencies": { + "@types/node": "^25.5.2", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.3", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.49", + "tailwindcss": "^3.4.15", + "typescript": "^5.6.3", + "vite": "^5.4.11" + } + }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", + "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", + "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@remix-run/router": { + "version": "1.23.2", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.2.tgz", + "integrity": "sha512-Ic6m2U/rMjTkhERIa/0ZtXJP17QUi2CbWE7cqx4J58M8aA3QTfW+2UlQ4psvTX9IO1RfNVhK3pcpdjej7L+t2w==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.1.tgz", + "integrity": "sha512-d6FinEBLdIiK+1uACUttJKfgZREXrF0Qc2SmLII7W2AD8FfiZ9Wjd+rD/iRuf5s5dWrr1GgwXCvPqOuDquOowA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.1.tgz", + "integrity": "sha512-YjG/EwIDvvYI1YvYbHvDz/BYHtkY4ygUIXHnTdLhG+hKIQFBiosfWiACWortsKPKU/+dUwQQCKQM3qrDe8c9BA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.1.tgz", + "integrity": "sha512-mjCpF7GmkRtSJwon+Rq1N8+pI+8l7w5g9Z3vWj4T7abguC4Czwi3Yu/pFaLvA3TTeMVjnu3ctigusqWUfjZzvw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.1.tgz", + "integrity": "sha512-haZ7hJ1JT4e9hqkoT9R/19XW2QKqjfJVv+i5AGg57S+nLk9lQnJ1F/eZloRO3o9Scy9CM3wQ9l+dkXtcBgN5Ew==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.1.tgz", + "integrity": "sha512-czw90wpQq3ZsAVBlinZjAYTKduOjTywlG7fEeWKUA7oCmpA8xdTkxZZlwNJKWqILlq0wehoZcJYfBvOyhPTQ6w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.1.tgz", + "integrity": "sha512-KVB2rqsxTHuBtfOeySEyzEOB7ltlB/ux38iu2rBQzkjbwRVlkhAGIEDiiYnO2kFOkJp+Z7pUXKyrRRFuFUKt+g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.1.tgz", + "integrity": "sha512-L+34Qqil+v5uC0zEubW7uByo78WOCIrBvci69E7sFASRl0X7b/MB6Cqd1lky/CtcSVTydWa2WZwFuWexjS5o6g==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.1.tgz", + "integrity": "sha512-n83O8rt4v34hgFzlkb1ycniJh7IR5RCIqt6mz1VRJD6pmhRi0CXdmfnLu9dIUS6buzh60IvACM842Ffb3xd6Gg==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.1.tgz", + "integrity": "sha512-Nql7sTeAzhTAja3QXeAI48+/+GjBJ+QmAH13snn0AJSNL50JsDqotyudHyMbO2RbJkskbMbFJfIJKWA6R1LCJQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.1.tgz", + "integrity": "sha512-+pUymDhd0ys9GcKZPPWlFiZ67sTWV5UU6zOJat02M1+PiuSGDziyRuI/pPue3hoUwm2uGfxdL+trT6Z9rxnlMA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.1.tgz", + "integrity": "sha512-VSvgvQeIcsEvY4bKDHEDWcpW4Yw7BtlKG1GUT4FzBUlEKQK0rWHYBqQt6Fm2taXS+1bXvJT6kICu5ZwqKCnvlQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.1.tgz", + "integrity": "sha512-4LqhUomJqwe641gsPp6xLfhqWMbQV04KtPp7/dIp0nzPxAkNY1AbwL5W0MQpcalLYk07vaW9Kp1PBhdpZYYcEw==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.1.tgz", + "integrity": "sha512-tLQQ9aPvkBxOc/EUT6j3pyeMD6Hb8QF2BTBnCQWP/uu1lhc9AIrIjKnLYMEroIz/JvtGYgI9dF3AxHZNaEH0rw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.1.tgz", + "integrity": "sha512-RMxFhJwc9fSXP6PqmAz4cbv3kAyvD1etJFjTx4ONqFP9DkTkXsAMU4v3Vyc5BgzC+anz7nS/9tp4obsKfqkDHg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.1.tgz", + "integrity": "sha512-QKgFl+Yc1eEk6MmOBfRHYF6lTxiiiV3/z/BRrbSiW2I7AFTXoBFvdMEyglohPj//2mZS4hDOqeB0H1ACh3sBbg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.1.tgz", + "integrity": "sha512-RAjXjP/8c6ZtzatZcA1RaQr6O1TRhzC+adn8YZDnChliZHviqIjmvFwHcxi4JKPSDAt6Uhf/7vqcBzQJy0PDJg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.1.tgz", + "integrity": "sha512-wcuocpaOlaL1COBYiA89O6yfjlp3RwKDeTIA0hM7OpmhR1Bjo9j31G1uQVpDlTvwxGn2nQs65fBFL5UFd76FcQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.1.tgz", + "integrity": "sha512-77PpsFQUCOiZR9+LQEFg9GClyfkNXj1MP6wRnzYs0EeWbPcHs02AXu4xuUbM1zhwn3wqaizle3AEYg5aeoohhg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.1.tgz", + "integrity": "sha512-5cIATbk5vynAjqqmyBjlciMJl1+R/CwX9oLk/EyiFXDWd95KpHdrOJT//rnUl4cUcskrd0jCCw3wpZnhIHdD9w==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.1.tgz", + "integrity": "sha512-cl0w09WsCi17mcmWqqglez9Gk8isgeWvoUZ3WiJFYSR3zjBQc2J5/ihSjpl+VLjPqjQ/1hJRcqBfLjssREQILw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.1.tgz", + "integrity": "sha512-4Cv23ZrONRbNtbZa37mLSueXUCtN7MXccChtKpUnQNgF010rjrjfHx3QxkS2PI7LqGT5xXyYs1a7LbzAwT0iCA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.1.tgz", + "integrity": "sha512-i1okWYkA4FJICtr7KpYzFpRTHgy5jdDbZiWfvny21iIKky5YExiDXP+zbXzm3dUcFpkEeYNHgQ5fuG236JPq0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.1.tgz", + "integrity": "sha512-u09m3CuwLzShA0EYKMNiFgcjjzwqtUMLmuCJLeZWjjOYA3IT2Di09KaxGBTP9xVztWyIWjVdsB2E9goMjZvTQg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.1.tgz", + "integrity": "sha512-k+600V9Zl1CM7eZxJgMyTUzmrmhB/0XZnF4pRypKAlAgxmedUA+1v9R+XOFv56W4SlHEzfeMtzujLJD22Uz5zg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.1.tgz", + "integrity": "sha512-lWMnixq/QzxyhTV6NjQJ4SFo1J6PvOX8vUx5Wb4bBPsEb+8xZ89Bz6kOXpfXj9ak9AHTQVQzlgzBEc1SyM27xQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "25.5.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.2.tgz", + "integrity": "sha512-tO4ZIRKNC+MDWV4qKVZe3Ql/woTnmHDr5JD8UI5hn2pwBrHEwOEMZK7WlNb5RKB6EoJ02gwmQS9OrjuFnZYdpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.18.0" + } + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.28", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz", + "integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^18.0.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true, + "license": "MIT" + }, + "node_modules/autoprefixer": { + "version": "10.4.27", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.27.tgz", + "integrity": "sha512-NP9APE+tO+LuJGn7/9+cohklunJsXWiaWEfV3si4Gi/XHDwVNgkwr1J3RQYFIvPy76GmJ9/bW8vyoU1LcxwKHA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "browserslist": "^4.28.1", + "caniuse-lite": "^1.0.30001774", + "fraction.js": "^5.3.4", + "picocolors": "^1.1.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.16", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.16.tgz", + "integrity": "sha512-Lyf3aK28zpsD1yQMiiHD4RvVb6UdMoo8xzG2XzFIfR9luPzOpcBlAsT/qfB1XWS1bxWT+UtE4WmQgsp297FYOA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001787", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001787.tgz", + "integrity": "sha512-mNcrMN9KeI68u7muanUpEejSLghOKlVhRqS/Za2IeyGllJ9I9otGpR9g3nsw7n4W378TE/LyIteA0+/FOZm4Kg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.334", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.334.tgz", + "integrity": "sha512-mgjZAz7Jyx1SRCwEpy9wefDS7GvNPazLthHg8eQMJ76wBdGQQDW33TCrUTvQ4wzpmOrv2zrFoD3oNufMdyMpog==", + "dev": true, + "license": "ISC" + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fraction.js": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz", + "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jiti": { + "version": "1.21.7", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", + "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.37", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.37.tgz", + "integrity": "sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss": { + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.9.tgz", + "integrity": "sha512-7a70Nsot+EMX9fFU3064K/kdHWZqGVY+BADLyXc8Dfv+mTLLVl6JzJpPaCZ2kQL9gIJvKXSLMHhqdRRjwQeFtw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.1.0.tgz", + "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/postcss-nested": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-router": { + "version": "6.30.3", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.3.tgz", + "integrity": "sha512-XRnlbKMTmktBkjCLE8/XcZFlnHvr2Ltdr1eJX4idL55/9BbORzyZEaIkBFDhFGCEWBBItsVrDxwx3gnisMitdw==", + "license": "MIT", + "dependencies": { + "@remix-run/router": "1.23.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.30.3", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.3.tgz", + "integrity": "sha512-pxPcv1AczD4vso7G4Z3TKcvlxK7g7TNt3/FNGMhfqyntocvYKj+GCatfigGDjbLozC4baguJ0ReCigoDJXb0ag==", + "license": "MIT", + "dependencies": { + "@remix-run/router": "1.23.2", + "react-router": "6.30.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.1.tgz", + "integrity": "sha512-VmtB2rFU/GroZ4oL8+ZqXgSA38O6GR8KSIvWmEFv63pQ0G6KaBH9s07PO8XTXP4vI+3UJUEypOfjkGfmSBBR0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.60.1", + "@rollup/rollup-android-arm64": "4.60.1", + "@rollup/rollup-darwin-arm64": "4.60.1", + "@rollup/rollup-darwin-x64": "4.60.1", + "@rollup/rollup-freebsd-arm64": "4.60.1", + "@rollup/rollup-freebsd-x64": "4.60.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.1", + "@rollup/rollup-linux-arm-musleabihf": "4.60.1", + "@rollup/rollup-linux-arm64-gnu": "4.60.1", + "@rollup/rollup-linux-arm64-musl": "4.60.1", + "@rollup/rollup-linux-loong64-gnu": "4.60.1", + "@rollup/rollup-linux-loong64-musl": "4.60.1", + "@rollup/rollup-linux-ppc64-gnu": "4.60.1", + "@rollup/rollup-linux-ppc64-musl": "4.60.1", + "@rollup/rollup-linux-riscv64-gnu": "4.60.1", + "@rollup/rollup-linux-riscv64-musl": "4.60.1", + "@rollup/rollup-linux-s390x-gnu": "4.60.1", + "@rollup/rollup-linux-x64-gnu": "4.60.1", + "@rollup/rollup-linux-x64-musl": "4.60.1", + "@rollup/rollup-openbsd-x64": "4.60.1", + "@rollup/rollup-openharmony-arm64": "4.60.1", + "@rollup/rollup-win32-arm64-msvc": "4.60.1", + "@rollup/rollup-win32-ia32-msvc": "4.60.1", + "@rollup/rollup-win32-x64-gnu": "4.60.1", + "@rollup/rollup-win32-x64-msvc": "4.60.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwindcss": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.19.tgz", + "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.6.0", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.21.7", + "lilconfig": "^3.1.3", + "micromatch": "^4.0.8", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.1.1", + "postcss": "^8.4.47", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0", + "postcss-nested": "^6.2.0", + "postcss-selector-parser": "^6.1.2", + "resolve": "^1.22.8", + "sucrase": "^3.35.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "5.4.21", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", + "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/web/package.json b/web/package.json new file mode 100644 index 0000000..17c449c --- /dev/null +++ b/web/package.json @@ -0,0 +1,27 @@ +{ + "name": "vibe-erp-web", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "preview": "vite preview" + }, + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-router-dom": "^6.28.0" + }, + "devDependencies": { + "@types/node": "^25.5.2", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.3", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.49", + "tailwindcss": "^3.4.15", + "typescript": "^5.6.3", + "vite": "^5.4.11" + } +} diff --git a/web/postcss.config.js b/web/postcss.config.js new file mode 100644 index 0000000..2e7af2b --- /dev/null +++ b/web/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/web/src/App.tsx b/web/src/App.tsx new file mode 100644 index 0000000..040a008 --- /dev/null +++ b/web/src/App.tsx @@ -0,0 +1,62 @@ +// vibe_erp web SPA route table. +// +// One for the whole SPA: /login is open, everything else +// nests under . The layout component +// renders for the active child route. +// +// **Why a flat route table.** v1 has 12 screens; nested routing +// would just be ceremony. Future chunks can introduce nested +// routes when, e.g., the Settings area gets sub-tabs. + +import { Navigate, Route, Routes } from 'react-router-dom' +import { AppLayout } from '@/layout/AppLayout' +import { ProtectedRoute } from '@/components/ProtectedRoute' +import { LoginPage } from '@/pages/LoginPage' +import { DashboardPage } from '@/pages/DashboardPage' +import { ItemsPage } from '@/pages/ItemsPage' +import { UomsPage } from '@/pages/UomsPage' +import { PartnersPage } from '@/pages/PartnersPage' +import { LocationsPage } from '@/pages/LocationsPage' +import { BalancesPage } from '@/pages/BalancesPage' +import { MovementsPage } from '@/pages/MovementsPage' +import { SalesOrdersPage } from '@/pages/SalesOrdersPage' +import { SalesOrderDetailPage } from '@/pages/SalesOrderDetailPage' +import { PurchaseOrdersPage } from '@/pages/PurchaseOrdersPage' +import { PurchaseOrderDetailPage } from '@/pages/PurchaseOrderDetailPage' +import { WorkOrdersPage } from '@/pages/WorkOrdersPage' +import { WorkOrderDetailPage } from '@/pages/WorkOrderDetailPage' +import { ShopFloorPage } from '@/pages/ShopFloorPage' +import { JournalEntriesPage } from '@/pages/JournalEntriesPage' + +export default function App() { + return ( + + } /> + + + + } + > + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + } /> + + ) +} diff --git a/web/src/api/client.ts b/web/src/api/client.ts new file mode 100644 index 0000000..7025927 --- /dev/null +++ b/web/src/api/client.ts @@ -0,0 +1,225 @@ +// vibe_erp typed REST client. +// +// **Why a thin wrapper instead of a generated client.** The framework +// already serves a real OpenAPI spec at /v3/api-docs and could feed +// openapi-typescript or openapi-generator-cli — but every code +// generator pulls a chain of npm/Java toolchain steps into the build +// and generates ~thousands of lines of churn for every backend tweak. +// A hand-written client over `fetch` keeps the SPA bundle small, +// auditable, and dependency-free, and v1 of the SPA only needs the +// few dozen calls listed below. Codegen can return when (a) the +// API surface is too large to maintain by hand or (b) external +// integrators want a typed client they can reuse — neither is true +// in v1.0. +// +// **Auth.** Every call goes through `apiFetch`, which reads the +// access token from localStorage and adds an `Authorization: Bearer +// ` header. A 401 response triggers a hard logout (clears +// the token + redirects to /login via the auth context) — not a +// silent refresh, because v1 keeps the refresh story simple. +// Refreshing on 401 is a v1.x improvement. +// +// **Errors.** A non-2xx response throws an `ApiError` carrying the +// status, message, and the parsed JSON body if any. Pages catch +// this and render the message inline. Network failures throw the +// underlying TypeError, also caught by the page boundary. + +import type { + Item, + JournalEntry, + Location, + MetaInfo, + Partner, + PurchaseOrder, + SalesOrder, + ShopFloorEntry, + StockBalance, + StockMovement, + TokenPair, + Uom, + WorkOrder, +} from '@/types/api' + +const TOKEN_KEY = 'vibeerp.accessToken' + +export function getAccessToken(): string | null { + return localStorage.getItem(TOKEN_KEY) +} + +export function setAccessToken(token: string | null): void { + if (token === null) { + localStorage.removeItem(TOKEN_KEY) + } else { + localStorage.setItem(TOKEN_KEY, token) + } +} + +export class ApiError extends Error { + constructor( + message: string, + public readonly status: number, + public readonly body: unknown, + ) { + super(message) + this.name = 'ApiError' + } +} + +// One-time-set callback that the auth context registers so the +// client can trigger a logout on 401 without a circular import. +let onUnauthorized: (() => void) | null = null +export function registerUnauthorizedHandler(handler: () => void) { + onUnauthorized = handler +} + +async function apiFetch( + path: string, + init: RequestInit = {}, + expectJson = true, +): Promise { + const headers = new Headers(init.headers) + headers.set('Accept', 'application/json') + if (init.body && !headers.has('Content-Type')) { + headers.set('Content-Type', 'application/json') + } + const token = getAccessToken() + if (token) headers.set('Authorization', `Bearer ${token}`) + + const res = await fetch(path, { ...init, headers }) + + if (res.status === 401) { + if (onUnauthorized) onUnauthorized() + throw new ApiError('Not authenticated', 401, null) + } + if (!res.ok) { + let body: unknown = null + let message = `${res.status} ${res.statusText}` + try { + const text = await res.text() + if (text) { + try { + body = JSON.parse(text) + const m = (body as { message?: unknown }).message + if (typeof m === 'string') message = m + } catch { + body = text + message = text + } + } + } catch { + // ignore body parse errors + } + throw new ApiError(message, res.status, body) + } + if (!expectJson || res.status === 204) { + return undefined as T + } + return (await res.json()) as T +} + +// ─── Public unauthenticated calls ──────────────────────────────────── + +export const meta = { + info: () => apiFetch('/api/v1/_meta/info'), +} + +export const auth = { + login: (username: string, password: string) => + apiFetch('/api/v1/auth/login', { + method: 'POST', + body: JSON.stringify({ username, password }), + }), +} + +// ─── Catalog ───────────────────────────────────────────────────────── + +export const catalog = { + listItems: () => apiFetch('/api/v1/catalog/items'), + getItem: (id: string) => apiFetch(`/api/v1/catalog/items/${id}`), + listUoms: () => apiFetch('/api/v1/catalog/uoms'), +} + +// ─── Partners ──────────────────────────────────────────────────────── + +export const partners = { + list: () => apiFetch('/api/v1/partners/partners'), + get: (id: string) => apiFetch(`/api/v1/partners/partners/${id}`), +} + +// ─── Inventory ─────────────────────────────────────────────────────── + +export const inventory = { + listLocations: () => apiFetch('/api/v1/inventory/locations'), + listBalances: () => apiFetch('/api/v1/inventory/balances'), + listMovements: () => apiFetch('/api/v1/inventory/movements'), +} + +// ─── Sales orders ──────────────────────────────────────────────────── + +export const salesOrders = { + list: () => apiFetch('/api/v1/orders/sales-orders'), + get: (id: string) => apiFetch(`/api/v1/orders/sales-orders/${id}`), + confirm: (id: string) => + apiFetch(`/api/v1/orders/sales-orders/${id}/confirm`, { + method: 'POST', + }), + cancel: (id: string) => + apiFetch(`/api/v1/orders/sales-orders/${id}/cancel`, { + method: 'POST', + }), + ship: (id: string, shippingLocationCode: string) => + apiFetch(`/api/v1/orders/sales-orders/${id}/ship`, { + method: 'POST', + body: JSON.stringify({ shippingLocationCode }), + }), +} + +// ─── Purchase orders ───────────────────────────────────────────────── + +export const purchaseOrders = { + list: () => apiFetch('/api/v1/orders/purchase-orders'), + get: (id: string) => apiFetch(`/api/v1/orders/purchase-orders/${id}`), + confirm: (id: string) => + apiFetch(`/api/v1/orders/purchase-orders/${id}/confirm`, { + method: 'POST', + }), + cancel: (id: string) => + apiFetch(`/api/v1/orders/purchase-orders/${id}/cancel`, { + method: 'POST', + }), + receive: (id: string, receivingLocationCode: string) => + apiFetch(`/api/v1/orders/purchase-orders/${id}/receive`, { + method: 'POST', + body: JSON.stringify({ receivingLocationCode }), + }), +} + +// ─── Production ────────────────────────────────────────────────────── + +export const production = { + listWorkOrders: () => apiFetch('/api/v1/production/work-orders'), + getWorkOrder: (id: string) => + apiFetch(`/api/v1/production/work-orders/${id}`), + startWorkOrder: (id: string) => + apiFetch(`/api/v1/production/work-orders/${id}/start`, { + method: 'POST', + }), + completeWorkOrder: (id: string, outputLocationCode: string) => + apiFetch(`/api/v1/production/work-orders/${id}/complete`, { + method: 'POST', + body: JSON.stringify({ outputLocationCode }), + }), + cancelWorkOrder: (id: string) => + apiFetch(`/api/v1/production/work-orders/${id}/cancel`, { + method: 'POST', + }), + shopFloor: () => + apiFetch('/api/v1/production/work-orders/shop-floor'), +} + +// ─── Finance ───────────────────────────────────────────────────────── + +export const finance = { + listJournalEntries: () => + apiFetch('/api/v1/finance/journal-entries'), +} diff --git a/web/src/auth/AuthContext.tsx b/web/src/auth/AuthContext.tsx new file mode 100644 index 0000000..2306717 --- /dev/null +++ b/web/src/auth/AuthContext.tsx @@ -0,0 +1,130 @@ +// vibe_erp web auth context. +// +// **Scope.** Holds the in-memory copy of the access token + the user +// it was issued to (decoded from the JWT payload), exposes login / +// logout actions, and rerenders subscribers when the token state +// flips. Persistence lives in localStorage via the api client's +// `getAccessToken/setAccessToken` helpers — the context only mirrors +// what's in storage so a hard refresh of the page picks up the +// existing session without a re-login. +// +// **Why decode the JWT in the SPA.** vibe_erp's auth tokens are +// signed (HS256) by the framework, so the SPA cannot *trust* the +// payload — but it can DISPLAY it (username, role list) without a +// round-trip. Anything load-bearing (permission checks) still +// happens server-side. The decode is intentionally trivial: split +// on '.', base64-decode the middle segment, JSON.parse. No JWT lib +// dependency; an invalid token just degrades to "unknown user" and +// the next API call gets a 401, triggering a logout. +// +// **401 handling.** The api client calls registerUnauthorizedHandler +// once at boot. When any request returns 401, the handler clears +// the token and forces a navigate to /login (preserving the +// attempted path so post-login can redirect back). + +import { + createContext, + useCallback, + useContext, + useEffect, + useMemo, + useState, + type ReactNode, +} from 'react' +import { useLocation, useNavigate } from 'react-router-dom' +import { + auth as authApi, + getAccessToken, + registerUnauthorizedHandler, + setAccessToken, +} from '@/api/client' + +interface JwtPayload { + sub?: string + username?: string + roles?: string[] + exp?: number +} + +function decodeJwt(token: string): JwtPayload | null { + try { + const parts = token.split('.') + if (parts.length !== 3) return null + const padded = parts[1] + '==='.slice((parts[1].length + 3) % 4) + const json = atob(padded.replace(/-/g, '+').replace(/_/g, '/')) + return JSON.parse(json) as JwtPayload + } catch { + return null + } +} + +interface AuthState { + token: string | null + username: string | null + roles: string[] + loading: boolean + login: (username: string, password: string) => Promise + logout: () => void +} + +const AuthContext = createContext(null) + +export function AuthProvider({ children }: { children: ReactNode }) { + const navigate = useNavigate() + const location = useLocation() + const [token, setToken] = useState(() => getAccessToken()) + const [loading, setLoading] = useState(false) + + const payload = useMemo(() => (token ? decodeJwt(token) : null), [token]) + + const logout = useCallback(() => { + setAccessToken(null) + setToken(null) + if (location.pathname !== '/login') { + navigate('/login', { + replace: true, + state: { from: location.pathname + location.search }, + }) + } + }, [navigate, location]) + + // Wire the api client's 401 handler exactly once. + useEffect(() => { + registerUnauthorizedHandler(() => { + // Defer to next tick so the throw inside apiFetch isn't + // swallowed by React's render-phase complaints. + setTimeout(() => logout(), 0) + }) + }, [logout]) + + const login = useCallback( + async (username: string, password: string) => { + setLoading(true) + try { + const pair = await authApi.login(username, password) + setAccessToken(pair.accessToken) + setToken(pair.accessToken) + } finally { + setLoading(false) + } + }, + [], + ) + + const value: AuthState = { + token, + username: payload?.username ?? payload?.sub ?? null, + roles: payload?.roles ?? [], + loading, + login, + logout, + } + + return {children} +} + +export function useAuth(): AuthState { + const ctx = useContext(AuthContext) + if (!ctx) throw new Error('useAuth must be used inside ') + return ctx +} diff --git a/web/src/components/DataTable.tsx b/web/src/components/DataTable.tsx new file mode 100644 index 0000000..3683760 --- /dev/null +++ b/web/src/components/DataTable.tsx @@ -0,0 +1,71 @@ +// Tiny generic table component. +// +// Each column declares: a header label, a key, and an optional +// `render` function that takes the row and returns a ReactNode. +// Without `render` the column reads `row[key]` and stringifies it. +// +// Intentionally not a heavy table lib (TanStack Table, AG Grid). +// v1 SPA needs columnar reads, link cells, status badges, and +// filtering by a free-text input — all trivially handcoded. A +// future chunk can swap this out the day a real consumer asks for +// virtualised rows or column resizing. + +import type { ReactNode } from 'react' + +export interface Column { + header: string + key: string + render?: (row: T) => ReactNode + className?: string +} + +interface Props { + rows: T[] + columns: Column[] + empty?: ReactNode + rowKey?: (row: T) => string +} + +export function DataTable({ + rows, + columns, + empty =
No rows.
, + rowKey, +}: Props) { + if (rows.length === 0) { + return
{empty}
+ } + return ( +
+ + + + {columns.map((c) => ( + + ))} + + + + {rows.map((row, idx) => { + const key = rowKey + ? rowKey(row) + : ((row as { id?: string }).id ?? String(idx)) + return ( + + {columns.map((c) => ( + + ))} + + ) + })} + +
+ {c.header} +
+ {c.render + ? c.render(row) + : ((row as unknown as Record)[c.key] as ReactNode) ?? ''} +
+
+ ) +} diff --git a/web/src/components/ErrorBox.tsx b/web/src/components/ErrorBox.tsx new file mode 100644 index 0000000..ae8079d --- /dev/null +++ b/web/src/components/ErrorBox.tsx @@ -0,0 +1,21 @@ +interface Props { + error: unknown +} + +export function ErrorBox({ error }: Props) { + let message: string + if (error instanceof Error) { + message = error.message + } else if (typeof error === 'string') { + message = error + } else if (error && typeof error === 'object' && 'message' in error) { + message = String((error as { message: unknown }).message) + } else { + message = 'Unknown error' + } + return ( +
+ Error: {message} +
+ ) +} diff --git a/web/src/components/Loading.tsx b/web/src/components/Loading.tsx new file mode 100644 index 0000000..8fd746a --- /dev/null +++ b/web/src/components/Loading.tsx @@ -0,0 +1,8 @@ +export function Loading({ label = 'Loading…' }: { label?: string }) { + return ( +
+ + {label} +
+ ) +} diff --git a/web/src/components/PageHeader.tsx b/web/src/components/PageHeader.tsx new file mode 100644 index 0000000..beffbcb --- /dev/null +++ b/web/src/components/PageHeader.tsx @@ -0,0 +1,19 @@ +import type { ReactNode } from 'react' + +interface Props { + title: string + subtitle?: string + actions?: ReactNode +} + +export function PageHeader({ title, subtitle, actions }: Props) { + return ( +
+
+

{title}

+ {subtitle &&

{subtitle}

} +
+ {actions &&
{actions}
} +
+ ) +} diff --git a/web/src/components/ProtectedRoute.tsx b/web/src/components/ProtectedRoute.tsx new file mode 100644 index 0000000..203a288 --- /dev/null +++ b/web/src/components/ProtectedRoute.tsx @@ -0,0 +1,18 @@ +import { Navigate, useLocation } from 'react-router-dom' +import { useAuth } from '@/auth/AuthContext' +import type { ReactNode } from 'react' + +export function ProtectedRoute({ children }: { children: ReactNode }) { + const { token } = useAuth() + const location = useLocation() + if (!token) { + return ( + + ) + } + return <>{children} +} diff --git a/web/src/components/StatusBadge.tsx b/web/src/components/StatusBadge.tsx new file mode 100644 index 0000000..873c7b7 --- /dev/null +++ b/web/src/components/StatusBadge.tsx @@ -0,0 +1,25 @@ +interface Props { + status: string +} + +// Status → Tailwind class via the shared @layer components classes +// declared in index.css. Falls back to 'badge-pending' for unknown +// statuses so a new server-side enum value renders as a neutral pill +// instead of throwing. +export function StatusBadge({ status }: Props) { + const cls = + { + DRAFT: 'badge-draft', + CONFIRMED: 'badge-confirmed', + SHIPPED: 'badge-shipped', + RECEIVED: 'badge-received', + COMPLETED: 'badge-completed', + CANCELLED: 'badge-cancelled', + IN_PROGRESS: 'badge-in-progress', + PENDING: 'badge-pending', + POSTED: 'badge-confirmed', + SETTLED: 'badge-shipped', + REVERSED: 'badge-cancelled', + }[status] ?? 'badge-pending' + return {status} +} diff --git a/web/src/index.css b/web/src/index.css new file mode 100644 index 0000000..201491b --- /dev/null +++ b/web/src/index.css @@ -0,0 +1,47 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +@layer components { + .btn { + @apply inline-flex items-center justify-center rounded-md px-3 py-1.5 text-sm font-medium shadow-sm transition focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50; + } + .btn-primary { + @apply btn bg-brand-500 text-white hover:bg-brand-600 focus:ring-brand-500; + } + .btn-secondary { + @apply btn bg-white text-slate-800 ring-1 ring-inset ring-slate-300 hover:bg-slate-50 focus:ring-brand-500; + } + .btn-danger { + @apply btn bg-rose-600 text-white hover:bg-rose-700 focus:ring-rose-600; + } + .card { + @apply rounded-lg border border-slate-200 bg-white shadow-sm; + } + .table-base { + @apply min-w-full divide-y divide-slate-200 text-sm; + } + .table-base th { + @apply px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-slate-500; + } + .table-base td { + @apply whitespace-nowrap px-3 py-2 text-slate-700; + } + .badge { + @apply inline-flex items-center rounded-full px-2 py-0.5 text-xs font-semibold; + } + .badge-draft { @apply badge bg-slate-100 text-slate-700; } + .badge-confirmed { @apply badge bg-amber-100 text-amber-800; } + .badge-shipped { @apply badge bg-emerald-100 text-emerald-800; } + .badge-received { @apply badge bg-emerald-100 text-emerald-800; } + .badge-completed { @apply badge bg-emerald-100 text-emerald-800; } + .badge-cancelled { @apply badge bg-rose-100 text-rose-800; } + .badge-in-progress { @apply badge bg-sky-100 text-sky-800; } + .badge-pending { @apply badge bg-slate-100 text-slate-600; } +} diff --git a/web/src/layout/AppLayout.tsx b/web/src/layout/AppLayout.tsx new file mode 100644 index 0000000..9be70c8 --- /dev/null +++ b/web/src/layout/AppLayout.tsx @@ -0,0 +1,154 @@ +// vibe_erp main app shell. +// +// Top bar (logo + version + user + logout) and a permanent left +// sidebar grouped by Packaged Business Capability (PBC). The +// `` renders whichever child route the router matched. +// +// **Why a static nav array.** The framework already exposes +// menu metadata at /api/v1/_meta/metadata, but plumbing that into +// the SPA is a Phase 3 (Tier 1 customization) concern. v1 SPA +// hard-codes a sensible default that mirrors the implemented PBCs; +// a future chunk replaces this with a metadata-driven sidebar so +// plug-ins can contribute new menus through their YAML. + +import { NavLink, Outlet } from 'react-router-dom' +import { useEffect, useState } from 'react' +import { useAuth } from '@/auth/AuthContext' +import { meta } from '@/api/client' +import type { MetaInfo } from '@/types/api' + +interface NavItem { + to: string + label: string +} +interface NavGroup { + heading: string + items: NavItem[] +} + +const NAV: NavGroup[] = [ + { + heading: 'Overview', + items: [{ to: '/', label: 'Dashboard' }], + }, + { + heading: 'Catalog & Partners', + items: [ + { to: '/items', label: 'Items' }, + { to: '/uoms', label: 'Units of Measure' }, + { to: '/partners', label: 'Partners' }, + ], + }, + { + heading: 'Inventory', + items: [ + { to: '/locations', label: 'Locations' }, + { to: '/balances', label: 'Stock Balances' }, + { to: '/movements', label: 'Stock Movements' }, + ], + }, + { + heading: 'Orders', + items: [ + { to: '/sales-orders', label: 'Sales Orders' }, + { to: '/purchase-orders', label: 'Purchase Orders' }, + ], + }, + { + heading: 'Production', + items: [ + { to: '/work-orders', label: 'Work Orders' }, + { to: '/shop-floor', label: 'Shop Floor' }, + ], + }, + { + heading: 'Finance', + items: [{ to: '/journal-entries', label: 'Journal Entries' }], + }, +] + +export function AppLayout() { + const { username, logout } = useAuth() + const [info, setInfo] = useState(null) + + useEffect(() => { + meta.info().then(setInfo).catch(() => setInfo(null)) + }, []) + + return ( +
+ {/* ─── Sidebar ──────────────────────────────────────────── */} + + + {/* ─── Main column ─────────────────────────────────────── */} +
+
+ vibe_erp +
+ + {username ? ( + <> + Signed in as {username} + + ) : ( + 'Signed in' + )} + + +
+
+
+ +
+
+
+ ) +} diff --git a/web/src/main.tsx b/web/src/main.tsx new file mode 100644 index 0000000..0ef2118 --- /dev/null +++ b/web/src/main.tsx @@ -0,0 +1,16 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import { BrowserRouter } from 'react-router-dom' +import App from './App' +import { AuthProvider } from './auth/AuthContext' +import './index.css' + +ReactDOM.createRoot(document.getElementById('root')!).render( + + + + + + + , +) diff --git a/web/src/pages/BalancesPage.tsx b/web/src/pages/BalancesPage.tsx new file mode 100644 index 0000000..8dc56f8 --- /dev/null +++ b/web/src/pages/BalancesPage.tsx @@ -0,0 +1,63 @@ +import { useEffect, useState } from 'react' +import { inventory } from '@/api/client' +import type { Location, StockBalance } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { DataTable, type Column } from '@/components/DataTable' + +interface Row extends Record { + id: string + itemCode: string + locationCode: string + quantity: string | number +} + +export function BalancesPage() { + const [rows, setRows] = useState([]) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + + useEffect(() => { + Promise.all([inventory.listBalances(), inventory.listLocations()]) + .then(([balances, locs]: [StockBalance[], Location[]]) => { + const byId = new Map(locs.map((l) => [l.id, l.code])) + setRows( + balances.map((b) => ({ + id: b.id, + itemCode: b.itemCode, + locationCode: byId.get(b.locationId) ?? b.locationId, + quantity: b.quantity, + })), + ) + }) + .catch((e: unknown) => setError(e instanceof Error ? e : new Error(String(e)))) + .finally(() => setLoading(false)) + }, []) + + const columns: Column[] = [ + { header: 'Item', key: 'itemCode', render: (r) => {r.itemCode} }, + { + header: 'Location', + key: 'locationCode', + render: (r) => {r.locationCode}, + }, + { + header: 'Quantity', + key: 'quantity', + render: (r) => {String(r.quantity)}, + }, + ] + + return ( +
+ + {loading && } + {error && } + {!loading && !error && } +
+ ) +} diff --git a/web/src/pages/DashboardPage.tsx b/web/src/pages/DashboardPage.tsx new file mode 100644 index 0000000..27162e5 --- /dev/null +++ b/web/src/pages/DashboardPage.tsx @@ -0,0 +1,152 @@ +import { useEffect, useState } from 'react' +import { Link } from 'react-router-dom' +import { + catalog, + finance, + inventory, + partners, + production, + purchaseOrders, + salesOrders, +} from '@/api/client' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { useAuth } from '@/auth/AuthContext' + +interface DashboardCounts { + items: number + partners: number + locations: number + salesOrders: number + purchaseOrders: number + workOrders: number + journalEntries: number + inProgressWorkOrders: number +} + +export function DashboardPage() { + const { username } = useAuth() + const [counts, setCounts] = useState(null) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + + useEffect(() => { + let active = true + setLoading(true) + Promise.all([ + catalog.listItems(), + partners.list(), + inventory.listLocations(), + salesOrders.list(), + purchaseOrders.list(), + production.listWorkOrders(), + finance.listJournalEntries(), + production.shopFloor(), + ]) + .then(([items, parts, locs, sos, pos, wos, jes, sf]) => { + if (!active) return + setCounts({ + items: items.length, + partners: parts.length, + locations: locs.length, + salesOrders: sos.length, + purchaseOrders: pos.length, + workOrders: wos.length, + journalEntries: jes.length, + inProgressWorkOrders: sf.length, + }) + }) + .catch((e: unknown) => { + if (active) setError(e instanceof Error ? e : new Error(String(e))) + }) + .finally(() => active && setLoading(false)) + return () => { + active = false + } + }, []) + + return ( +
+ + {loading && } + {error && } + {counts && ( +
+ + + + + + + + +
+ )} +
+

Try the demo

+
    +
  1. + Open a sales order{' '} + in DRAFT, click Confirm. +
  2. +
  3. + With the same sales order CONFIRMED, click Ship. + The framework atomically debits stock, flips status to SHIPPED, and emits a domain + event. +
  4. +
  5. + Watch stock balances{' '} + drop, movements{' '} + grow by one row, and{' '} + + journal entries + {' '} + settle from POSTED to SETTLED — all from the cross-PBC event subscriber in pbc-finance. +
  6. +
+
+
+ ) +} + +function DashboardCard({ + label, + value, + to, + highlight = false, +}: { + label: string + value: number + to: string + highlight?: boolean +}) { + return ( + +
{label}
+
{value}
+ + ) +} diff --git a/web/src/pages/ItemsPage.tsx b/web/src/pages/ItemsPage.tsx new file mode 100644 index 0000000..43ec005 --- /dev/null +++ b/web/src/pages/ItemsPage.tsx @@ -0,0 +1,45 @@ +import { useEffect, useState } from 'react' +import { catalog } from '@/api/client' +import type { Item } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { DataTable, type Column } from '@/components/DataTable' + +export function ItemsPage() { + const [rows, setRows] = useState([]) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + + useEffect(() => { + catalog + .listItems() + .then(setRows) + .catch((e: unknown) => setError(e instanceof Error ? e : new Error(String(e)))) + .finally(() => setLoading(false)) + }, []) + + const columns: Column[] = [ + { header: 'Code', key: 'code', render: (r) => {r.code} }, + { header: 'Name', key: 'name' }, + { header: 'Type', key: 'itemType' }, + { header: 'UoM', key: 'baseUomCode', render: (r) => {r.baseUomCode} }, + { + header: 'Active', + key: 'active', + render: (r) => (r.active ? : ), + }, + ] + + return ( +
+ + {loading && } + {error && } + {!loading && !error && } +
+ ) +} diff --git a/web/src/pages/JournalEntriesPage.tsx b/web/src/pages/JournalEntriesPage.tsx new file mode 100644 index 0000000..fffc4e1 --- /dev/null +++ b/web/src/pages/JournalEntriesPage.tsx @@ -0,0 +1,59 @@ +import { useEffect, useState } from 'react' +import { finance } from '@/api/client' +import type { JournalEntry } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { DataTable, type Column } from '@/components/DataTable' +import { StatusBadge } from '@/components/StatusBadge' + +export function JournalEntriesPage() { + const [rows, setRows] = useState([]) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + + useEffect(() => { + finance + .listJournalEntries() + .then((rs) => + setRows([...rs].sort((a, b) => (b.postedAt ?? '').localeCompare(a.postedAt ?? ''))), + ) + .catch((e: unknown) => setError(e instanceof Error ? e : new Error(String(e)))) + .finally(() => setLoading(false)) + }, []) + + const columns: Column[] = [ + { + header: 'Posted', + key: 'postedAt', + render: (r) => (r.postedAt ? new Date(r.postedAt).toLocaleString() : '—'), + }, + { header: 'Code', key: 'code', render: (r) => {r.code} }, + { header: 'Type', key: 'type' }, + { header: 'Status', key: 'status', render: (r) => }, + { header: 'Order', key: 'orderCode', render: (r) => {r.orderCode} }, + { header: 'Partner', key: 'partnerCode', render: (r) => {r.partnerCode} }, + { + header: 'Amount', + key: 'amount', + render: (r) => ( + + {Number(r.amount).toLocaleString(undefined, { minimumFractionDigits: 2 })}{' '} + {r.currencyCode} + + ), + }, + ] + + return ( +
+ + {loading && } + {error && } + {!loading && !error && } +
+ ) +} diff --git a/web/src/pages/LocationsPage.tsx b/web/src/pages/LocationsPage.tsx new file mode 100644 index 0000000..970c424 --- /dev/null +++ b/web/src/pages/LocationsPage.tsx @@ -0,0 +1,41 @@ +import { useEffect, useState } from 'react' +import { inventory } from '@/api/client' +import type { Location } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { DataTable, type Column } from '@/components/DataTable' + +export function LocationsPage() { + const [rows, setRows] = useState([]) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + + useEffect(() => { + inventory + .listLocations() + .then(setRows) + .catch((e: unknown) => setError(e instanceof Error ? e : new Error(String(e)))) + .finally(() => setLoading(false)) + }, []) + + const columns: Column[] = [ + { header: 'Code', key: 'code', render: (r) => {r.code} }, + { header: 'Name', key: 'name' }, + { header: 'Type', key: 'type' }, + { + header: 'Active', + key: 'active', + render: (r) => (r.active ? : ), + }, + ] + + return ( +
+ + {loading && } + {error && } + {!loading && !error && } +
+ ) +} diff --git a/web/src/pages/LoginPage.tsx b/web/src/pages/LoginPage.tsx new file mode 100644 index 0000000..f1f6de4 --- /dev/null +++ b/web/src/pages/LoginPage.tsx @@ -0,0 +1,98 @@ +import { useEffect, useState, type FormEvent } from 'react' +import { useLocation, useNavigate } from 'react-router-dom' +import { useAuth } from '@/auth/AuthContext' +import { meta } from '@/api/client' +import type { MetaInfo } from '@/types/api' +import { ErrorBox } from '@/components/ErrorBox' + +interface LocationState { + from?: string +} + +export function LoginPage() { + const { login, token, loading } = useAuth() + const navigate = useNavigate() + const location = useLocation() + const [username, setUsername] = useState('admin') + const [password, setPassword] = useState('') + const [error, setError] = useState(null) + const [info, setInfo] = useState(null) + + useEffect(() => { + meta.info().then(setInfo).catch(() => setInfo(null)) + }, []) + + // If already logged in (e.g. nav back to /login), bounce to dashboard. + useEffect(() => { + if (token) { + const dest = (location.state as LocationState | null)?.from ?? '/' + navigate(dest, { replace: true }) + } + }, [token, navigate, location.state]) + + const onSubmit = async (e: FormEvent) => { + e.preventDefault() + setError(null) + try { + await login(username, password) + // Effect above handles the redirect; nothing else to do here. + } catch (err: unknown) { + setError(err instanceof Error ? err : new Error(String(err))) + } + } + + return ( +
+
+
+

vibe_erp

+

+ Composable ERP framework for the printing industry +

+
+
+
+
+ + setUsername(e.target.value)} + className="mt-1 w-full rounded-md border border-slate-300 px-3 py-2 text-sm shadow-sm focus:border-brand-500 focus:ring-brand-500" + required + autoFocus + /> +
+
+ + setPassword(e.target.value)} + className="mt-1 w-full rounded-md border border-slate-300 px-3 py-2 text-sm shadow-sm focus:border-brand-500 focus:ring-brand-500" + required + /> +

+ The bootstrap admin password is printed to the application boot log on first start. +

+
+ {error ? : null} + + +
+

+ {info ? ( + <> + Connected to {info.name}{' '} + {info.implementationVersion} + + ) : ( + 'Connecting…' + )} +

+
+
+ ) +} diff --git a/web/src/pages/MovementsPage.tsx b/web/src/pages/MovementsPage.tsx new file mode 100644 index 0000000..8415822 --- /dev/null +++ b/web/src/pages/MovementsPage.tsx @@ -0,0 +1,80 @@ +import { useEffect, useState } from 'react' +import { inventory } from '@/api/client' +import type { Location, StockMovement } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { DataTable, type Column } from '@/components/DataTable' + +interface Row extends Record { + id: string + occurredAt: string + itemCode: string + locationCode: string + delta: string | number + reason: string + reference: string | null +} + +export function MovementsPage() { + const [rows, setRows] = useState([]) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + + useEffect(() => { + Promise.all([inventory.listMovements(), inventory.listLocations()]) + .then(([moves, locs]: [StockMovement[], Location[]]) => { + const byId = new Map(locs.map((l) => [l.id, l.code])) + const sorted = [...moves].sort((a, b) => + (b.occurredAt ?? '').localeCompare(a.occurredAt ?? ''), + ) + setRows( + sorted.map((m) => ({ + id: m.id, + occurredAt: m.occurredAt, + itemCode: m.itemCode, + locationCode: byId.get(m.locationId) ?? m.locationId, + delta: m.delta, + reason: m.reason, + reference: m.reference, + })), + ) + }) + .catch((e: unknown) => setError(e instanceof Error ? e : new Error(String(e)))) + .finally(() => setLoading(false)) + }, []) + + const columns: Column[] = [ + { + header: 'Occurred', + key: 'occurredAt', + render: (r) => + r.occurredAt ? new Date(r.occurredAt).toLocaleString() : '—', + }, + { header: 'Item', key: 'itemCode', render: (r) => {r.itemCode} }, + { header: 'Location', key: 'locationCode', render: (r) => {r.locationCode} }, + { + header: 'Δ', + key: 'delta', + render: (r) => { + const n = Number(r.delta) + const cls = n >= 0 ? 'text-emerald-600' : 'text-rose-600' + return {String(r.delta)} + }, + }, + { header: 'Reason', key: 'reason' }, + { header: 'Reference', key: 'reference', render: (r) => r.reference ?? '—' }, + ] + + return ( +
+ + {loading && } + {error && } + {!loading && !error && } +
+ ) +} diff --git a/web/src/pages/PartnersPage.tsx b/web/src/pages/PartnersPage.tsx new file mode 100644 index 0000000..7e75e75 --- /dev/null +++ b/web/src/pages/PartnersPage.tsx @@ -0,0 +1,46 @@ +import { useEffect, useState } from 'react' +import { partners } from '@/api/client' +import type { Partner } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { DataTable, type Column } from '@/components/DataTable' + +export function PartnersPage() { + const [rows, setRows] = useState([]) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + + useEffect(() => { + partners + .list() + .then(setRows) + .catch((e: unknown) => setError(e instanceof Error ? e : new Error(String(e)))) + .finally(() => setLoading(false)) + }, []) + + const columns: Column[] = [ + { header: 'Code', key: 'code', render: (r) => {r.code} }, + { header: 'Name', key: 'name' }, + { header: 'Type', key: 'type' }, + { header: 'Email', key: 'email', render: (r) => r.email ?? '—' }, + { header: 'Phone', key: 'phone', render: (r) => r.phone ?? '—' }, + { + header: 'Active', + key: 'active', + render: (r) => (r.active ? : ), + }, + ] + + return ( +
+ + {loading && } + {error && } + {!loading && !error && } +
+ ) +} diff --git a/web/src/pages/PurchaseOrderDetailPage.tsx b/web/src/pages/PurchaseOrderDetailPage.tsx new file mode 100644 index 0000000..f6bc6e3 --- /dev/null +++ b/web/src/pages/PurchaseOrderDetailPage.tsx @@ -0,0 +1,289 @@ +// Purchase-order detail screen — symmetric to SalesOrderDetailPage. +// Confirm a DRAFT, receive a CONFIRMED into a warehouse, or cancel +// either. Each action surfaces the corresponding stock movement +// (PURCHASE_RECEIPT) and pbc-finance journal entry (AP, POSTED → +// SETTLED on receive) inline. + +import { useCallback, useEffect, useState } from 'react' +import { useNavigate, useParams } from 'react-router-dom' +import { finance, inventory, purchaseOrders } from '@/api/client' +import type { JournalEntry, Location, PurchaseOrder, StockMovement } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { StatusBadge } from '@/components/StatusBadge' + +export function PurchaseOrderDetailPage() { + const { id = '' } = useParams<{ id: string }>() + const navigate = useNavigate() + const [order, setOrder] = useState(null) + const [locations, setLocations] = useState([]) + const [receivingLocation, setReceivingLocation] = useState('') + const [movements, setMovements] = useState([]) + const [journalEntries, setJournalEntries] = useState([]) + const [loading, setLoading] = useState(true) + const [acting, setActing] = useState(false) + const [error, setError] = useState(null) + const [actionMessage, setActionMessage] = useState(null) + + const reloadSideEffects = useCallback(async (orderCode: string) => { + const [ms, js] = await Promise.all([ + inventory.listMovements(), + finance.listJournalEntries(), + ]) + setMovements(ms.filter((m) => m.reference?.includes(orderCode) ?? false)) + setJournalEntries(js.filter((j) => j.orderCode === orderCode)) + }, []) + + useEffect(() => { + let active = true + setLoading(true) + Promise.all([purchaseOrders.get(id), inventory.listLocations()]) + .then(async ([o, locs]: [PurchaseOrder, Location[]]) => { + if (!active) return + setOrder(o) + setLocations(locs.filter((l) => l.active)) + const firstWarehouse = locs.find((l) => l.active && l.type === 'WAREHOUSE') + setReceivingLocation(firstWarehouse?.code ?? locs[0]?.code ?? '') + await reloadSideEffects(o.code) + }) + .catch((e: unknown) => { + if (active) setError(e instanceof Error ? e : new Error(String(e))) + }) + .finally(() => active && setLoading(false)) + return () => { + active = false + } + }, [id, reloadSideEffects]) + + if (loading) return + if (error) return + if (!order) return + + const onConfirm = async () => { + setActing(true) + setError(null) + setActionMessage(null) + try { + const updated = await purchaseOrders.confirm(order.id) + setOrder(updated) + await reloadSideEffects(updated.code) + setActionMessage('Confirmed. pbc-finance has posted an AP journal entry.') + } catch (e: unknown) { + setError(e instanceof Error ? e : new Error(String(e))) + } finally { + setActing(false) + } + } + + const onReceive = async () => { + if (!receivingLocation) { + setError(new Error('Pick a receiving location first.')) + return + } + setActing(true) + setError(null) + setActionMessage(null) + try { + const updated = await purchaseOrders.receive(order.id, receivingLocation) + setOrder(updated) + await reloadSideEffects(updated.code) + setActionMessage( + `Received into ${receivingLocation}. Stock credited, journal entry settled.`, + ) + } catch (e: unknown) { + setError(e instanceof Error ? e : new Error(String(e))) + } finally { + setActing(false) + } + } + + const onCancel = async () => { + setActing(true) + setError(null) + setActionMessage(null) + try { + const updated = await purchaseOrders.cancel(order.id) + setOrder(updated) + await reloadSideEffects(updated.code) + setActionMessage('Cancelled. pbc-finance has reversed any open journal entry.') + } catch (e: unknown) { + setError(e instanceof Error ? e : new Error(String(e))) + } finally { + setActing(false) + } + } + + const canConfirm = order.status === 'DRAFT' + const canReceive = order.status === 'CONFIRMED' + const canCancel = order.status === 'DRAFT' || order.status === 'CONFIRMED' + + return ( +
+ navigate('/purchase-orders')}> + ← Back + + } + /> + +
+
+
+ Status: + +
+
+
Total
+
+ {Number(order.totalAmount).toLocaleString(undefined, { + minimumFractionDigits: 2, + })}{' '} + {order.currencyCode} +
+
+
+ {actionMessage && ( +
+ {actionMessage} +
+ )} +
+ +
+

Actions

+
+ +
+ + +
+ +
+
+ +
+
+

Lines

+
+ + + + + + + + + + + + {order.lines.map((l) => ( + + + + + + + + ))} + +
#ItemQtyUnit priceLine total
{l.lineNo}{l.itemCode}{String(l.quantity)} + {Number(l.unitPrice).toLocaleString(undefined, { + minimumFractionDigits: 2, + })}{' '} + {l.currencyCode} + + {Number(l.lineTotal).toLocaleString(undefined, { + minimumFractionDigits: 2, + })} +
+
+ +
+
+
+

Inventory movements

+
+ {movements.length === 0 ? ( +
No movements yet.
+ ) : ( + + + + + + + + + + + {movements.map((m) => ( + + + + + + + ))} + +
ItemΔReasonReference
{m.itemCode}{String(m.delta)}{m.reason}{m.reference ?? '—'}
+ )} +
+
+
+

Journal entries

+
+ {journalEntries.length === 0 ? ( +
No entries yet.
+ ) : ( + + + + + + + + + + + {journalEntries.map((j) => ( + + + + + + + ))} + +
CodeTypeStatusAmount
{j.code}{j.type} + + + {Number(j.amount).toLocaleString(undefined, { minimumFractionDigits: 2 })}{' '} + {j.currencyCode} +
+ )} +
+
+
+ ) +} diff --git a/web/src/pages/PurchaseOrdersPage.tsx b/web/src/pages/PurchaseOrdersPage.tsx new file mode 100644 index 0000000..0850f23 --- /dev/null +++ b/web/src/pages/PurchaseOrdersPage.tsx @@ -0,0 +1,60 @@ +import { useEffect, useState } from 'react' +import { Link } from 'react-router-dom' +import { purchaseOrders } from '@/api/client' +import type { PurchaseOrder } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { DataTable, type Column } from '@/components/DataTable' +import { StatusBadge } from '@/components/StatusBadge' + +export function PurchaseOrdersPage() { + const [rows, setRows] = useState([]) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + + useEffect(() => { + purchaseOrders + .list() + .then((rs) => setRows([...rs].sort((a, b) => a.code.localeCompare(b.code)))) + .catch((e: unknown) => setError(e instanceof Error ? e : new Error(String(e)))) + .finally(() => setLoading(false)) + }, []) + + const columns: Column[] = [ + { + header: 'Code', + key: 'code', + render: (r) => ( + + {r.code} + + ), + }, + { header: 'Supplier', key: 'partnerCode', render: (r) => {r.partnerCode} }, + { header: 'Order date', key: 'orderDate' }, + { header: 'Expected', key: 'expectedDate', render: (r) => r.expectedDate ?? '—' }, + { header: 'Status', key: 'status', render: (r) => }, + { + header: 'Total', + key: 'totalAmount', + render: (r) => ( + + {Number(r.totalAmount).toLocaleString(undefined, { + minimumFractionDigits: 2, + })}{' '} + {r.currencyCode} + + ), + }, + ] + + return ( +
+ + {loading && } + {error && } + {!loading && !error && } +
+ ) +} diff --git a/web/src/pages/SalesOrderDetailPage.tsx b/web/src/pages/SalesOrderDetailPage.tsx new file mode 100644 index 0000000..6aff3ea --- /dev/null +++ b/web/src/pages/SalesOrderDetailPage.tsx @@ -0,0 +1,302 @@ +// Sales-order detail screen. +// +// **The headline demo flow.** Confirm a DRAFT, ship a CONFIRMED, +// or cancel either. Each action updates the order in place, +// reloads the journal entry list to show the AR row appearing +// (POSTED → SETTLED), and reloads stock movements to show the +// SALES_SHIPMENT ledger entry appearing. +// +// **Why ship asks for a location.** The framework requires every +// shipment to name the warehouse the goods came from — the +// inventory ledger tags the row with that location and the audit +// trail must always answer "which warehouse shipped this". The UI +// proposes the first WAREHOUSE-typed location it finds; an +// operator can pick another from the dropdown. + +import { useCallback, useEffect, useState } from 'react' +import { Link, useNavigate, useParams } from 'react-router-dom' +import { finance, inventory, salesOrders } from '@/api/client' +import type { JournalEntry, Location, SalesOrder, StockMovement } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { StatusBadge } from '@/components/StatusBadge' + +export function SalesOrderDetailPage() { + const { id = '' } = useParams<{ id: string }>() + const navigate = useNavigate() + const [order, setOrder] = useState(null) + const [locations, setLocations] = useState([]) + const [shippingLocation, setShippingLocation] = useState('') + const [movements, setMovements] = useState([]) + const [journalEntries, setJournalEntries] = useState([]) + const [loading, setLoading] = useState(true) + const [acting, setActing] = useState(false) + const [error, setError] = useState(null) + const [actionMessage, setActionMessage] = useState(null) + + const reloadSideEffects = useCallback(async (orderCode: string) => { + const [ms, js] = await Promise.all([ + inventory.listMovements(), + finance.listJournalEntries(), + ]) + setMovements(ms.filter((m) => m.reference?.includes(orderCode) ?? false)) + setJournalEntries(js.filter((j) => j.orderCode === orderCode)) + }, []) + + useEffect(() => { + let active = true + setLoading(true) + Promise.all([salesOrders.get(id), inventory.listLocations()]) + .then(async ([o, locs]: [SalesOrder, Location[]]) => { + if (!active) return + setOrder(o) + setLocations(locs.filter((l) => l.active)) + const firstWarehouse = locs.find((l) => l.active && l.type === 'WAREHOUSE') + setShippingLocation(firstWarehouse?.code ?? locs[0]?.code ?? '') + await reloadSideEffects(o.code) + }) + .catch((e: unknown) => { + if (active) setError(e instanceof Error ? e : new Error(String(e))) + }) + .finally(() => active && setLoading(false)) + return () => { + active = false + } + }, [id, reloadSideEffects]) + + if (loading) return + if (error) return + if (!order) return + + const onConfirm = async () => { + setActing(true) + setError(null) + setActionMessage(null) + try { + const updated = await salesOrders.confirm(order.id) + setOrder(updated) + await reloadSideEffects(updated.code) + setActionMessage('Confirmed. pbc-finance has posted an AR journal entry.') + } catch (e: unknown) { + setError(e instanceof Error ? e : new Error(String(e))) + } finally { + setActing(false) + } + } + + const onShip = async () => { + if (!shippingLocation) { + setError(new Error('Pick a shipping location first.')) + return + } + setActing(true) + setError(null) + setActionMessage(null) + try { + const updated = await salesOrders.ship(order.id, shippingLocation) + setOrder(updated) + await reloadSideEffects(updated.code) + setActionMessage( + `Shipped from ${shippingLocation}. Stock debited, journal entry settled.`, + ) + } catch (e: unknown) { + setError(e instanceof Error ? e : new Error(String(e))) + } finally { + setActing(false) + } + } + + const onCancel = async () => { + setActing(true) + setError(null) + setActionMessage(null) + try { + const updated = await salesOrders.cancel(order.id) + setOrder(updated) + await reloadSideEffects(updated.code) + setActionMessage('Cancelled. pbc-finance has reversed any open journal entry.') + } catch (e: unknown) { + setError(e instanceof Error ? e : new Error(String(e))) + } finally { + setActing(false) + } + } + + const canConfirm = order.status === 'DRAFT' + const canShip = order.status === 'CONFIRMED' + const canCancel = order.status === 'DRAFT' || order.status === 'CONFIRMED' + + return ( +
+ navigate('/sales-orders')}> + ← Back + + } + /> + +
+
+
+ Status: + +
+
+
Total
+
+ {Number(order.totalAmount).toLocaleString(undefined, { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + })}{' '} + {order.currencyCode} +
+
+
+ {actionMessage && ( +
+ {actionMessage} +
+ )} +
+ +
+

Actions

+
+ +
+ + +
+ +
+
+ +
+
+

Lines

+
+ + + + + + + + + + + + {order.lines.map((l) => ( + + + + + + + + ))} + +
#ItemQtyUnit priceLine total
{l.lineNo}{l.itemCode}{String(l.quantity)} + {Number(l.unitPrice).toLocaleString(undefined, { + minimumFractionDigits: 2, + })}{' '} + {l.currencyCode} + + {Number(l.lineTotal).toLocaleString(undefined, { + minimumFractionDigits: 2, + })} +
+
+ +
+
+
+

Inventory movements

+
+ {movements.length === 0 ? ( +
No movements yet.
+ ) : ( + + + + + + + + + + + {movements.map((m) => ( + + + + + + + ))} + +
ItemΔReasonReference
{m.itemCode}{String(m.delta)}{m.reason}{m.reference ?? '—'}
+ )} +
+
+
+

Journal entries

+
+ {journalEntries.length === 0 ? ( +
No entries yet.
+ ) : ( + + + + + + + + + + + {journalEntries.map((j) => ( + + + + + + + ))} + +
CodeTypeStatusAmount
{j.code}{j.type} + + + {Number(j.amount).toLocaleString(undefined, { minimumFractionDigits: 2 })}{' '} + {j.currencyCode} +
+ )} +
+ View all journal entries → +
+
+
+
+ ) +} diff --git a/web/src/pages/SalesOrdersPage.tsx b/web/src/pages/SalesOrdersPage.tsx new file mode 100644 index 0000000..5ebd8c8 --- /dev/null +++ b/web/src/pages/SalesOrdersPage.tsx @@ -0,0 +1,65 @@ +import { useEffect, useState } from 'react' +import { Link } from 'react-router-dom' +import { salesOrders } from '@/api/client' +import type { SalesOrder } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { DataTable, type Column } from '@/components/DataTable' +import { StatusBadge } from '@/components/StatusBadge' + +export function SalesOrdersPage() { + const [rows, setRows] = useState([]) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + + useEffect(() => { + salesOrders + .list() + .then((rs) => setRows([...rs].sort((a, b) => a.code.localeCompare(b.code)))) + .catch((e: unknown) => setError(e instanceof Error ? e : new Error(String(e)))) + .finally(() => setLoading(false)) + }, []) + + const columns: Column[] = [ + { + header: 'Code', + key: 'code', + render: (r) => ( + + {r.code} + + ), + }, + { header: 'Customer', key: 'partnerCode', render: (r) => {r.partnerCode} }, + { header: 'Date', key: 'orderDate' }, + { header: 'Status', key: 'status', render: (r) => }, + { + header: 'Total', + key: 'totalAmount', + render: (r) => ( + + {Number(r.totalAmount).toLocaleString(undefined, { + minimumFractionDigits: 2, + maximumFractionDigits: 2, + })}{' '} + {r.currencyCode} + + ), + }, + { + header: 'Lines', + key: 'lines', + render: (r) => {r.lines.length}, + }, + ] + + return ( +
+ + {loading && } + {error && } + {!loading && !error && } +
+ ) +} diff --git a/web/src/pages/ShopFloorPage.tsx b/web/src/pages/ShopFloorPage.tsx new file mode 100644 index 0000000..9a37bbd --- /dev/null +++ b/web/src/pages/ShopFloorPage.tsx @@ -0,0 +1,120 @@ +// Shop-floor dashboard. +// +// Polls /api/v1/production/work-orders/shop-floor every 5s and +// renders one card per IN_PROGRESS work order with its current +// operation, planned vs actual minutes, and operations completed. +// Designed to be projected on a wall-mounted screen — the cards +// are large, the typography is high-contrast, and the only state +// is "what's running right now". + +import { useEffect, useState } from 'react' +import { Link } from 'react-router-dom' +import { production } from '@/api/client' +import type { ShopFloorEntry } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { StatusBadge } from '@/components/StatusBadge' + +const POLL_MS = 5000 + +export function ShopFloorPage() { + const [rows, setRows] = useState([]) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + const [updatedAt, setUpdatedAt] = useState(null) + + useEffect(() => { + let active = true + let timer: number | null = null + + const tick = async () => { + try { + const data = await production.shopFloor() + if (!active) return + setRows(data) + setUpdatedAt(new Date()) + setError(null) + } catch (e: unknown) { + if (active) setError(e instanceof Error ? e : new Error(String(e))) + } finally { + if (active) setLoading(false) + } + if (active) timer = window.setTimeout(tick, POLL_MS) + } + tick() + return () => { + active = false + if (timer !== null) window.clearTimeout(timer) + } + }, []) + + return ( +
+ + {loading && } + {error && } + {!loading && rows.length === 0 && ( +
+ No work orders are in progress right now. +
+ )} +
+ {rows.map((r) => { + const std = Number(r.totalStandardMinutes) + const act = Number(r.totalActualMinutes) + const pct = std > 0 ? Math.min(100, Math.round((act / std) * 100)) : 0 + return ( + +
+ + {r.workOrderCode} + + + {r.operationsCompleted} / {r.operationsTotal} ops + +
+
+ Output: {r.outputItemCode} ×{' '} + {String(r.outputQuantity)} +
+
+
Current operation
+ {r.currentOperationCode ? ( +
+ {r.currentOperationCode} + @ {r.currentWorkCenter} + {r.currentOperationStatus && } +
+ ) : ( +
No routing
+ )} +
+
+
+ {act.toFixed(0)} actual min + {std.toFixed(0)} std min +
+
+
+
+
+ + ) + })} +
+
+ ) +} diff --git a/web/src/pages/UomsPage.tsx b/web/src/pages/UomsPage.tsx new file mode 100644 index 0000000..0d189cf --- /dev/null +++ b/web/src/pages/UomsPage.tsx @@ -0,0 +1,39 @@ +import { useEffect, useState } from 'react' +import { catalog } from '@/api/client' +import type { Uom } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { DataTable, type Column } from '@/components/DataTable' + +export function UomsPage() { + const [rows, setRows] = useState([]) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + + useEffect(() => { + catalog + .listUoms() + .then(setRows) + .catch((e: unknown) => setError(e instanceof Error ? e : new Error(String(e)))) + .finally(() => setLoading(false)) + }, []) + + const columns: Column[] = [ + { header: 'Code', key: 'code', render: (r) => {r.code} }, + { header: 'Name', key: 'name' }, + { header: 'Dimension', key: 'dimension' }, + ] + + return ( +
+ + {loading && } + {error && } + {!loading && !error && } +
+ ) +} diff --git a/web/src/pages/WorkOrderDetailPage.tsx b/web/src/pages/WorkOrderDetailPage.tsx new file mode 100644 index 0000000..7df50e7 --- /dev/null +++ b/web/src/pages/WorkOrderDetailPage.tsx @@ -0,0 +1,213 @@ +// Work-order detail screen — read-only header + start/complete +// action verbs that drive the v2 state machine. The shop-floor +// dashboard at /shop-floor handles the per-operation walk for v3 +// routing-equipped orders. v1 SPA keeps this screen simple: start a +// DRAFT, complete an IN_PROGRESS into a warehouse. + +import { useCallback, useEffect, useState } from 'react' +import { useNavigate, useParams } from 'react-router-dom' +import { inventory, production } from '@/api/client' +import type { Location, WorkOrder } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { StatusBadge } from '@/components/StatusBadge' + +export function WorkOrderDetailPage() { + const { id = '' } = useParams<{ id: string }>() + const navigate = useNavigate() + const [order, setOrder] = useState(null) + const [locations, setLocations] = useState([]) + const [outputLocation, setOutputLocation] = useState('') + const [loading, setLoading] = useState(true) + const [acting, setActing] = useState(false) + const [error, setError] = useState(null) + const [actionMessage, setActionMessage] = useState(null) + + const refresh = useCallback(async () => { + const o = await production.getWorkOrder(id) + setOrder(o) + }, [id]) + + useEffect(() => { + let active = true + setLoading(true) + Promise.all([production.getWorkOrder(id), inventory.listLocations()]) + .then(([o, locs]: [WorkOrder, Location[]]) => { + if (!active) return + setOrder(o) + setLocations(locs.filter((l) => l.active)) + const firstWarehouse = locs.find((l) => l.active && l.type === 'WAREHOUSE') + setOutputLocation(firstWarehouse?.code ?? locs[0]?.code ?? '') + }) + .catch((e: unknown) => { + if (active) setError(e instanceof Error ? e : new Error(String(e))) + }) + .finally(() => active && setLoading(false)) + return () => { + active = false + } + }, [id]) + + if (loading) return + if (error) return + if (!order) return + + const onStart = async () => { + setActing(true) + setError(null) + setActionMessage(null) + try { + await production.startWorkOrder(order.id) + await refresh() + setActionMessage('Started. Operations can now be walked from the Shop Floor screen.') + } catch (e: unknown) { + setError(e instanceof Error ? e : new Error(String(e))) + } finally { + setActing(false) + } + } + + const onComplete = async () => { + if (!outputLocation) { + setError(new Error('Pick an output location first.')) + return + } + setActing(true) + setError(null) + setActionMessage(null) + try { + await production.completeWorkOrder(order.id, outputLocation) + await refresh() + setActionMessage( + `Completed. Materials issued, finished goods credited to ${outputLocation}.`, + ) + } catch (e: unknown) { + setError(e instanceof Error ? e : new Error(String(e))) + } finally { + setActing(false) + } + } + + const canStart = order.status === 'DRAFT' + const canComplete = order.status === 'IN_PROGRESS' + + return ( +
+ navigate('/work-orders')}> + ← Back + + } + /> + +
+
+ Status: + +
+ {actionMessage && ( +
+ {actionMessage} +
+ )} +
+ +
+

Actions

+
+ +
+ + +
+
+
+ +
+
+
+

BOM inputs

+
+ {order.inputs.length === 0 ? ( +
No BOM lines.
+ ) : ( + + + + + + + + + + + {order.inputs.map((i) => ( + + + + + + + ))} + +
#ItemQty / unitSource loc
{i.lineNo}{i.itemCode}{String(i.quantityPerUnit)}{i.sourceLocationCode}
+ )} +
+
+
+

Routing operations

+
+ {order.operations.length === 0 ? ( +
No routing.
+ ) : ( + + + + + + + + + + + + {order.operations.map((o) => ( + + + + + + + + ))} + +
#OperationWork centerStd minStatus
{o.lineNo}{o.operationCode}{o.workCenter}{String(o.standardMinutes)} + +
+ )} +
+
+
+ ) +} diff --git a/web/src/pages/WorkOrdersPage.tsx b/web/src/pages/WorkOrdersPage.tsx new file mode 100644 index 0000000..df5fa15 --- /dev/null +++ b/web/src/pages/WorkOrdersPage.tsx @@ -0,0 +1,61 @@ +import { useEffect, useState } from 'react' +import { Link } from 'react-router-dom' +import { production } from '@/api/client' +import type { WorkOrder } from '@/types/api' +import { PageHeader } from '@/components/PageHeader' +import { Loading } from '@/components/Loading' +import { ErrorBox } from '@/components/ErrorBox' +import { DataTable, type Column } from '@/components/DataTable' +import { StatusBadge } from '@/components/StatusBadge' + +export function WorkOrdersPage() { + const [rows, setRows] = useState([]) + const [error, setError] = useState(null) + const [loading, setLoading] = useState(true) + + useEffect(() => { + production + .listWorkOrders() + .then((rs) => setRows([...rs].sort((a, b) => a.code.localeCompare(b.code)))) + .catch((e: unknown) => setError(e instanceof Error ? e : new Error(String(e)))) + .finally(() => setLoading(false)) + }, []) + + const columns: Column[] = [ + { + header: 'Code', + key: 'code', + render: (r) => ( + + {r.code} + + ), + }, + { header: 'Output', key: 'outputItemCode', render: (r) => {r.outputItemCode} }, + { + header: 'Qty', + key: 'outputQuantity', + render: (r) => {String(r.outputQuantity)}, + }, + { header: 'Status', key: 'status', render: (r) => }, + { + header: 'Source SO', + key: 'sourceSalesOrderCode', + render: (r) => r.sourceSalesOrderCode ?? '—', + }, + { + header: 'Inputs / Ops', + key: 'opsCount', + render: (r) => `${r.inputs.length} / ${r.operations.length}`, + }, + ] + + return ( +
+ + {loading && } + {error && } + {!loading && !error && } +
+ ) +} diff --git a/web/src/types/api.ts b/web/src/types/api.ts new file mode 100644 index 0000000..8e78ba3 --- /dev/null +++ b/web/src/types/api.ts @@ -0,0 +1,249 @@ +// vibe_erp REST API types. +// +// Hand-written rather than codegen'd from /v3/api-docs to keep the +// build pipeline simple — the framework already has springdoc-openapi +// serving the live spec, but adding @openapitools/openapi-generator-cli +// would pull in another Java toolchain into the npm build. v1 SPA can +// stay typed by hand; v1.x can revisit codegen if drift becomes a +// real problem. Every type here mirrors the matching @RestController's +// response DTO under pbc/*/http/. +// +// **BigDecimal as string.** The Spring Boot Jackson default serializes +// java.math.BigDecimal as a JSON number, which JavaScript would coerce +// to a 64-bit float and lose precision on quantities like 12345.6789. +// In practice the framework configures `spring.jackson.write-bigdecimal-as-plain` +// (default for Spring Boot 3) which still emits a JSON *number*; the SPA +// stores them as `string` because we never do client-side arithmetic on +// them — display only. If a future SPA needs sums it should round-trip +// through decimal.js, not Number(). + +export interface MetaInfo { + name: string + apiVersion: string + implementationVersion: string + buildTime: string | null + activeProfiles: string[] +} + +// ─── Auth (pbc-identity AuthController) ────────────────────────────── + +export interface LoginRequest { + username: string + password: string +} + +export interface TokenPair { + accessToken: string + accessExpiresAt: string + refreshToken: string + refreshExpiresAt: string + tokenType: string +} + +// ─── Catalog (pbc-catalog) ─────────────────────────────────────────── + +export type ItemType = 'GOOD' | 'SERVICE' | 'DIGITAL' + +export interface Item { + id: string + code: string + name: string + description: string | null + itemType: ItemType + baseUomCode: string + active: boolean + ext: Record +} + +export interface Uom { + id: string + code: string + name: string + dimension: string +} + +// ─── Partners (pbc-partners) ───────────────────────────────────────── + +export type PartnerType = 'CUSTOMER' | 'SUPPLIER' | 'BOTH' + +export interface Partner { + id: string + code: string + name: string + type: PartnerType + taxId: string | null + website: string | null + email: string | null + phone: string | null + active: boolean + ext: Record +} + +// ─── Inventory (pbc-inventory) ─────────────────────────────────────── + +export type LocationType = 'WAREHOUSE' | 'BIN' | 'VIRTUAL' + +export interface Location { + id: string + code: string + name: string + type: LocationType + active: boolean + ext: Record +} + +// Note: balances/movements use a UUID `locationId`, not `locationCode`. +// The list pages join against `Location.id → code` client-side. + +export interface StockBalance { + id: string + itemCode: string + locationId: string + quantity: string | number +} + +export type MovementReason = + | 'RECEIPT' + | 'ISSUE' + | 'ADJUSTMENT' + | 'SALES_SHIPMENT' + | 'PURCHASE_RECEIPT' + | 'TRANSFER_OUT' + | 'TRANSFER_IN' + | 'MATERIAL_ISSUE' + | 'PRODUCTION_RECEIPT' + +export interface StockMovement { + id: string + itemCode: string + locationId: string + delta: string | number + reason: MovementReason + reference: string | null + occurredAt: string + resultingQuantity?: string | number +} + +// ─── Sales orders (pbc-orders-sales) ───────────────────────────────── + +export type SalesOrderStatus = 'DRAFT' | 'CONFIRMED' | 'SHIPPED' | 'CANCELLED' + +export interface SalesOrderLine { + id: string + lineNo: number + itemCode: string + quantity: string | number + unitPrice: string | number + currencyCode: string + lineTotal: string | number +} + +export interface SalesOrder { + id: string + code: string + partnerCode: string + status: SalesOrderStatus + orderDate: string + currencyCode: string + totalAmount: string | number + lines: SalesOrderLine[] + ext: Record +} + +// ─── Purchase orders (pbc-orders-purchase) ─────────────────────────── + +export type PurchaseOrderStatus = 'DRAFT' | 'CONFIRMED' | 'RECEIVED' | 'CANCELLED' + +export interface PurchaseOrderLine { + id: string + lineNo: number + itemCode: string + quantity: string | number + unitPrice: string | number + currencyCode: string + lineTotal: string | number +} + +export interface PurchaseOrder { + id: string + code: string + partnerCode: string + status: PurchaseOrderStatus + orderDate: string + expectedDate: string | null + currencyCode: string + totalAmount: string | number + lines: PurchaseOrderLine[] + ext: Record +} + +// ─── Production (pbc-production) ───────────────────────────────────── + +export type WorkOrderStatus = 'DRAFT' | 'IN_PROGRESS' | 'COMPLETED' | 'CANCELLED' +export type WorkOrderOperationStatus = 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' + +export interface WorkOrderInput { + id: string + lineNo: number + itemCode: string + quantityPerUnit: string | number + sourceLocationCode: string +} + +export interface WorkOrderOperation { + id: string + lineNo: number + operationCode: string + workCenter: string + standardMinutes: string | number + status: WorkOrderOperationStatus + actualMinutes: string | number | null + startedAt: string | null + completedAt: string | null +} + +export interface WorkOrder { + id: string + code: string + outputItemCode: string + outputQuantity: string | number + status: WorkOrderStatus + dueDate: string | null + sourceSalesOrderCode: string | null + inputs: WorkOrderInput[] + operations: WorkOrderOperation[] + ext: Record +} + +export interface ShopFloorEntry { + workOrderId: string + workOrderCode: string + outputItemCode: string + outputQuantity: string | number + sourceSalesOrderCode: string | null + currentOperationLineNo: number | null + currentOperationCode: string | null + currentWorkCenter: string | null + currentOperationStatus: WorkOrderOperationStatus | null + operationsCompleted: number + operationsTotal: number + totalStandardMinutes: string | number + totalActualMinutes: string | number +} + +// ─── Finance (pbc-finance) ─────────────────────────────────────────── + +export type JournalEntryType = 'AR' | 'AP' +export type JournalEntryStatus = 'POSTED' | 'SETTLED' | 'REVERSED' + +export interface JournalEntry { + id: string + code: string + type: JournalEntryType + status: JournalEntryStatus + partnerCode: string + orderCode: string + amount: string | number + currencyCode: string + postedAt: string +} diff --git a/web/tailwind.config.js b/web/tailwind.config.js new file mode 100644 index 0000000..2892228 --- /dev/null +++ b/web/tailwind.config.js @@ -0,0 +1,29 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], + theme: { + extend: { + colors: { + brand: { + 50: '#eef4ff', + 100: '#d9e6ff', + 500: '#3b6cf6', + 600: '#2a55d4', + 700: '#1f43a8', + }, + }, + fontFamily: { + sans: [ + 'Inter', + 'system-ui', + '-apple-system', + 'Segoe UI', + 'Roboto', + 'sans-serif', + ], + mono: ['ui-monospace', 'SFMono-Regular', 'Menlo', 'monospace'], + }, + }, + }, + plugins: [], +} diff --git a/web/tsconfig.json b/web/tsconfig.json new file mode 100644 index 0000000..2750532 --- /dev/null +++ b/web/tsconfig.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "target": "ES2022", + "useDefineForClassFields": true, + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "esModuleInterop": true, + "resolveJsonModule": true, + + "baseUrl": ".", + "paths": { + "@/*": ["src/*"] + } + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/web/tsconfig.node.json b/web/tsconfig.node.json new file mode 100644 index 0000000..7cbe03e --- /dev/null +++ b/web/tsconfig.node.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "strict": true, + "types": ["node"] + }, + "include": ["vite.config.ts"] +} diff --git a/web/vite.config.ts b/web/vite.config.ts new file mode 100644 index 0000000..74c8575 --- /dev/null +++ b/web/vite.config.ts @@ -0,0 +1,42 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import path from 'node:path' + +// vibe_erp web SPA — Vite config. +// +// **Why this lives at web/, not under platform-bootstrap/static/** +// Keeping the SPA in its own directory means a frontend dev can run +// `npm run dev` (Vite dev server on :5173) without touching the JVM +// build, while the production build pipeline drops the static bundle +// into distribution/src/main/resources/static/ for Spring Boot to +// serve. The Gradle wrapper task in web/build.gradle.kts is what +// glues `npm run build` into `./gradlew build` so a normal CI run +// produces a single fat-jar that already contains the SPA. +// +// **Dev proxy.** During `npm run dev` the Vite server proxies every +// /api/v1/** call to the locally-running Spring Boot at :8080 so +// the SPA dev experience is "edit a .tsx file, save, hot-reload, +// the same JWT keeps working against the real backend". The proxy +// is dev-only — in the production bundle the SPA and API live on +// the same origin so no proxy is needed. +export default defineConfig({ + plugins: [react()], + resolve: { + alias: { + '@': path.resolve(__dirname, './src'), + }, + }, + server: { + port: 5173, + proxy: { + '/api': { + target: 'http://localhost:8080', + changeOrigin: true, + }, + }, + }, + build: { + outDir: 'dist', + sourcemap: true, + }, +})