From f059f5cca14cfdaf389c2b51a6438319d7f619ca Mon Sep 17 00:00:00 2001 From: Gitea Action Date: Sun, 19 Apr 2026 20:59:33 +0000 Subject: [PATCH 1/5] chore: update image tag to bbb5d68 [skip ci] --- k8s/overlays/prod/deployment-image-digest-patch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s/overlays/prod/deployment-image-digest-patch.yaml b/k8s/overlays/prod/deployment-image-digest-patch.yaml index 99e322b..77a289d 100644 --- a/k8s/overlays/prod/deployment-image-digest-patch.yaml +++ b/k8s/overlays/prod/deployment-image-digest-patch.yaml @@ -7,4 +7,4 @@ spec: spec: containers: - name: portal - image: 172.35.0.216:3000/simplifique/vendaweb-portal:d76c186 + image: 172.35.0.216:3000/simplifique/vendaweb-portal:bbb5d68 From 71d059277840c1415a37dd7c9cdca75a05dd36c1 Mon Sep 17 00:00:00 2001 From: luis Date: Mon, 20 Apr 2026 00:36:45 -0400 Subject: [PATCH 2/5] Atualizar src/environments/environment.prod.ts --- src/environments/environment.prod.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 7369e76..b1b2dec 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,7 +1,7 @@ export const environment = { production: true, - url: 'http://172.35.0.217:32619/api/v1/', - // url: 'https://api.vendaweb.simplifiquehc.com.br/api/v1/', + // url: 'http://172.35.0.217:32619/api/v1/', + url: 'https://api.vendaweb.simplifiquehc.com.br/api/v1/', // url: 'http://vendaweb.jurunense.com.br/api/v1/', URL_PIX: 'http://10.1.1.205:8078/api/v1/', firebase: { From 206b4a5c6a998b397cd6ad806103088d296393c6 Mon Sep 17 00:00:00 2001 From: luis Date: Mon, 20 Apr 2026 00:39:07 -0400 Subject: [PATCH 3/5] Atualizar src/app/sales/cart-sales/cart-sales.component.ts --- src/app/sales/cart-sales/cart-sales.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/sales/cart-sales/cart-sales.component.ts b/src/app/sales/cart-sales/cart-sales.component.ts index 1791e80..fefe5a7 100644 --- a/src/app/sales/cart-sales/cart-sales.component.ts +++ b/src/app/sales/cart-sales/cart-sales.component.ts @@ -2392,7 +2392,7 @@ export class CartSalesComponent openPrintPreOrder() { // this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' + this.urlPrintPreOrder = - 'http://172.35.0.219:8068/Viewer/{action}?order=' + + 'https://portainer.simplifiquehc.com.br/Viewer/{action}?order=' + this.preOrderNumber + '&model=' + this.modelPrintPreOrder; @@ -2406,7 +2406,7 @@ export class CartSalesComponent openPrintOrder() { // this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' + this.urlPrintOrder = - 'http://172.35.0.219:8068/Viewer/{action}?orderId=' + + 'https://portainer.simplifiquehc.com.br/Viewer/{action}?orderId=' + this.orderNumber + '&model=' + this.modelPrintOrder; From fad2e1c0a8c49040c489de95e41500c75d47b884 Mon Sep 17 00:00:00 2001 From: Gitea Action Date: Mon, 20 Apr 2026 04:46:20 +0000 Subject: [PATCH 4/5] chore: update image tag to 206b4a5 [skip ci] --- k8s/overlays/prod/deployment-image-digest-patch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s/overlays/prod/deployment-image-digest-patch.yaml b/k8s/overlays/prod/deployment-image-digest-patch.yaml index 77a289d..5b4eb20 100644 --- a/k8s/overlays/prod/deployment-image-digest-patch.yaml +++ b/k8s/overlays/prod/deployment-image-digest-patch.yaml @@ -7,4 +7,4 @@ spec: spec: containers: - name: portal - image: 172.35.0.216:3000/simplifique/vendaweb-portal:bbb5d68 + image: 172.35.0.216:3000/simplifique/vendaweb-portal:206b4a5 From 4652fea8fc7bf5ac2b084781995de44ee74b4d7f Mon Sep 17 00:00:00 2001 From: Luis Eduardo Estevao Date: Tue, 5 May 2026 16:12:52 -0300 Subject: [PATCH 5/5] =?UTF-8?q?documenta=C3=A7=C3=A3o=20do=20sistema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .context/agents/README.md | 27 + .context/agents/architect-specialist.md | 10 + .context/agents/bug-fixer.md | 10 + .context/agents/code-reviewer.md | 10 + .context/agents/devops-specialist.md | 10 + .context/agents/documentation-writer.md | 10 + .context/agents/feature-developer.md | 10 + .context/agents/frontend-specialist.md | 10 + .context/agents/performance-optimizer.md | 10 + .context/agents/refactoring-specialist.md | 10 + .context/agents/security-auditor.md | 10 + .context/agents/test-writer.md | 10 + .context/docs/README.md | 42 + .context/docs/architecture.md | 61 ++ .context/docs/codebase-map.json | 1104 ++++++++++++++++++++ .context/docs/development-workflow.md | 40 + .context/docs/glossary.md | 45 + .context/docs/project-overview.md | 49 + .context/docs/qa/README.md | 23 + .context/docs/qa/api-endpoints.md | 11 + .context/docs/qa/authentication.md | 23 + .context/docs/qa/database.md | 22 + .context/docs/qa/deployment.md | 21 + .context/docs/qa/getting-started.md | 32 + .context/docs/qa/project-structure.md | 15 + .context/docs/security.md | 25 + .context/docs/testing-strategy.md | 25 + .context/docs/tooling.md | 33 + .context/skills/README.md | 73 ++ .context/skills/api-design/SKILL.md | 10 + .context/skills/bug-investigation/SKILL.md | 10 + .context/skills/code-review/SKILL.md | 10 + .context/skills/commit-message/SKILL.md | 10 + .context/skills/documentation/SKILL.md | 10 + .context/skills/feature-breakdown/SKILL.md | 10 + .context/skills/pr-review/SKILL.md | 10 + .context/skills/refactoring/SKILL.md | 10 + .context/skills/security-audit/SKILL.md | 10 + .context/skills/test-generation/SKILL.md | 10 + .context/workflow/actions.jsonl | 4 + AGENTS.md | 34 + 41 files changed, 1919 insertions(+) create mode 100644 .context/agents/README.md create mode 100644 .context/agents/architect-specialist.md create mode 100644 .context/agents/bug-fixer.md create mode 100644 .context/agents/code-reviewer.md create mode 100644 .context/agents/devops-specialist.md create mode 100644 .context/agents/documentation-writer.md create mode 100644 .context/agents/feature-developer.md create mode 100644 .context/agents/frontend-specialist.md create mode 100644 .context/agents/performance-optimizer.md create mode 100644 .context/agents/refactoring-specialist.md create mode 100644 .context/agents/security-auditor.md create mode 100644 .context/agents/test-writer.md create mode 100644 .context/docs/README.md create mode 100644 .context/docs/architecture.md create mode 100644 .context/docs/codebase-map.json create mode 100644 .context/docs/development-workflow.md create mode 100644 .context/docs/glossary.md create mode 100644 .context/docs/project-overview.md create mode 100644 .context/docs/qa/README.md create mode 100644 .context/docs/qa/api-endpoints.md create mode 100644 .context/docs/qa/authentication.md create mode 100644 .context/docs/qa/database.md create mode 100644 .context/docs/qa/deployment.md create mode 100644 .context/docs/qa/getting-started.md create mode 100644 .context/docs/qa/project-structure.md create mode 100644 .context/docs/security.md create mode 100644 .context/docs/testing-strategy.md create mode 100644 .context/docs/tooling.md create mode 100644 .context/skills/README.md create mode 100644 .context/skills/api-design/SKILL.md create mode 100644 .context/skills/bug-investigation/SKILL.md create mode 100644 .context/skills/code-review/SKILL.md create mode 100644 .context/skills/commit-message/SKILL.md create mode 100644 .context/skills/documentation/SKILL.md create mode 100644 .context/skills/feature-breakdown/SKILL.md create mode 100644 .context/skills/pr-review/SKILL.md create mode 100644 .context/skills/refactoring/SKILL.md create mode 100644 .context/skills/security-audit/SKILL.md create mode 100644 .context/skills/test-generation/SKILL.md create mode 100644 .context/workflow/actions.jsonl create mode 100644 AGENTS.md diff --git a/.context/agents/README.md b/.context/agents/README.md new file mode 100644 index 0000000..8d145fb --- /dev/null +++ b/.context/agents/README.md @@ -0,0 +1,27 @@ +# Agent Handbook + +This directory contains ready-to-customize playbooks for AI agents collaborating on the repository. + +## Available Agents +- [Code Reviewer](./code-reviewer.md) — Review code changes for quality, style, and best practices +- [Bug Fixer](./bug-fixer.md) — Analyze bug reports and error messages +- [Feature Developer](./feature-developer.md) — Implement new features according to specifications +- [Refactoring Specialist](./refactoring-specialist.md) — Identify code smells and improvement opportunities +- [Test Writer](./test-writer.md) — Write comprehensive unit and integration tests +- [Documentation Writer](./documentation-writer.md) — Create clear, comprehensive documentation +- [Performance Optimizer](./performance-optimizer.md) — Identify performance bottlenecks +- [Security Auditor](./security-auditor.md) — Identify security vulnerabilities +- [Frontend Specialist](./frontend-specialist.md) — Design and implement user interfaces +- [Architect Specialist](./architect-specialist.md) — Design overall system architecture and patterns +- [Devops Specialist](./devops-specialist.md) — Design and maintain CI/CD pipelines + +## How To Use These Playbooks +1. Pick the agent that matches your task. +2. Enrich the template with project-specific context or links. +3. Share the final prompt with your AI assistant. +4. Capture learnings in the relevant documentation file so future runs improve. + +## Related Resources +- [Documentation Index](../docs/README.md) +- [Agent Knowledge Base](../../AGENTS.md) +- [Contributor Guidelines](../../CONTRIBUTING.md) diff --git a/.context/agents/architect-specialist.md b/.context/agents/architect-specialist.md new file mode 100644 index 0000000..fd7d226 --- /dev/null +++ b/.context/agents/architect-specialist.md @@ -0,0 +1,10 @@ +--- +type: agent +name: Architect Specialist +description: Design overall system architecture and patterns +agentType: architect-specialist +phases: [P, R] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/agents/bug-fixer.md b/.context/agents/bug-fixer.md new file mode 100644 index 0000000..8ad1ff4 --- /dev/null +++ b/.context/agents/bug-fixer.md @@ -0,0 +1,10 @@ +--- +type: agent +name: Bug Fixer +description: Analyze bug reports and error messages +agentType: bug-fixer +phases: [E, V] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/agents/code-reviewer.md b/.context/agents/code-reviewer.md new file mode 100644 index 0000000..dad9ec1 --- /dev/null +++ b/.context/agents/code-reviewer.md @@ -0,0 +1,10 @@ +--- +type: agent +name: Code Reviewer +description: Review code changes for quality, style, and best practices +agentType: code-reviewer +phases: [R, V] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/agents/devops-specialist.md b/.context/agents/devops-specialist.md new file mode 100644 index 0000000..8081fc1 --- /dev/null +++ b/.context/agents/devops-specialist.md @@ -0,0 +1,10 @@ +--- +type: agent +name: Devops Specialist +description: Design and maintain CI/CD pipelines +agentType: devops-specialist +phases: [E, C] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/agents/documentation-writer.md b/.context/agents/documentation-writer.md new file mode 100644 index 0000000..fc114e7 --- /dev/null +++ b/.context/agents/documentation-writer.md @@ -0,0 +1,10 @@ +--- +type: agent +name: Documentation Writer +description: Create clear, comprehensive documentation +agentType: documentation-writer +phases: [P, C] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/agents/feature-developer.md b/.context/agents/feature-developer.md new file mode 100644 index 0000000..c06bbfa --- /dev/null +++ b/.context/agents/feature-developer.md @@ -0,0 +1,10 @@ +--- +type: agent +name: Feature Developer +description: Implement new features according to specifications +agentType: feature-developer +phases: [P, E] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/agents/frontend-specialist.md b/.context/agents/frontend-specialist.md new file mode 100644 index 0000000..09f717b --- /dev/null +++ b/.context/agents/frontend-specialist.md @@ -0,0 +1,10 @@ +--- +type: agent +name: Frontend Specialist +description: Design and implement user interfaces +agentType: frontend-specialist +phases: [P, E] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/agents/performance-optimizer.md b/.context/agents/performance-optimizer.md new file mode 100644 index 0000000..4ff7f48 --- /dev/null +++ b/.context/agents/performance-optimizer.md @@ -0,0 +1,10 @@ +--- +type: agent +name: Performance Optimizer +description: Identify performance bottlenecks +agentType: performance-optimizer +phases: [E, V] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/agents/refactoring-specialist.md b/.context/agents/refactoring-specialist.md new file mode 100644 index 0000000..283b9f0 --- /dev/null +++ b/.context/agents/refactoring-specialist.md @@ -0,0 +1,10 @@ +--- +type: agent +name: Refactoring Specialist +description: Identify code smells and improvement opportunities +agentType: refactoring-specialist +phases: [E] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/agents/security-auditor.md b/.context/agents/security-auditor.md new file mode 100644 index 0000000..6e2ad9a --- /dev/null +++ b/.context/agents/security-auditor.md @@ -0,0 +1,10 @@ +--- +type: agent +name: Security Auditor +description: Identify security vulnerabilities +agentType: security-auditor +phases: [R, V] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/agents/test-writer.md b/.context/agents/test-writer.md new file mode 100644 index 0000000..cecb3d0 --- /dev/null +++ b/.context/agents/test-writer.md @@ -0,0 +1,10 @@ +--- +type: agent +name: Test Writer +description: Write comprehensive unit and integration tests +agentType: test-writer +phases: [E, V] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/docs/README.md b/.context/docs/README.md new file mode 100644 index 0000000..0943860 --- /dev/null +++ b/.context/docs/README.md @@ -0,0 +1,42 @@ +# Documentation Index + +Welcome to the repository knowledge base. Start with the project overview, then dive into specific guides as needed. + +## Core Guides +- [Project Overview](./project-overview.md) +- [Architecture Notes](./architecture.md) +- [Development Workflow](./development-workflow.md) +- [Testing Strategy](./testing-strategy.md) +- [Glossary & Domain Concepts](./glossary.md) +- [Security & Compliance Notes](./security.md) +- [Tooling & Productivity Guide](./tooling.md) + +## Repository Snapshot +- `angular.json/` +- `browserslist/` +- `docker-compose.yml/` +- `Dockerfile/` +- `e2e/` +- `k8s/` +- `karma.conf.js/` +- `kendo-ui-license.txt/` +- `nginx.conf/` +- `package-lock.json/` +- `package.json/` +- `README.md/` +- `src/` — TypeScript source files and CLI entrypoints. +- `tsconfig.app.json/` +- `tsconfig.json/` +- `tsconfig.spec.json/` +- `tslint.json/` + +## Document Map +| Guide | File | Primary Inputs | +| --- | --- | --- | +| Project Overview | `project-overview.md` | Roadmap, README, stakeholder notes | +| Architecture Notes | `architecture.md` | ADRs, service boundaries, dependency graphs | +| Development Workflow | `development-workflow.md` | Branching rules, CI config, contributing guide | +| Testing Strategy | `testing-strategy.md` | Test configs, CI gates, known flaky suites | +| Glossary & Domain Concepts | `glossary.md` | Business terminology, user personas, domain rules | +| Security & Compliance Notes | `security.md` | Auth model, secrets management, compliance requirements | +| Tooling & Productivity Guide | `tooling.md` | CLI scripts, IDE configs, automation workflows | diff --git a/.context/docs/architecture.md b/.context/docs/architecture.md new file mode 100644 index 0000000..09857dc --- /dev/null +++ b/.context/docs/architecture.md @@ -0,0 +1,61 @@ +--- +type: doc +name: architecture +description: System architecture, layers, patterns, and design decisions +category: architecture +generated: 2026-04-29 +status: active +scaffoldVersion: "2.0.0" +--- + +# Architecture Notes + +## System Architecture Overview +The system is a modular frontend web application built using Angular. It follows a modular monolith architecture where features are grouped into specific modules such as `Sales`, `Partners`, `Financial`, and `CRM`. The application heavily relies on Redux-pattern state management (likely NgRx) to manage global state such as shopping carts, customer sales, and application data flow. Data is fetched via Angular services which communicate with a backend REST API. + +## Architectural Layers +- **Components**: UI elements and pages organized by feature domain (`src/app/sales/`, `src/app/partners/`, `src/app/crm/`). +- **Services**: Business logic and API communication layer (`src/app/services/`, `src/app/shared/services/`). +- **Store / State Management**: Reducers, actions, and models handling complex state management (`src/app/sales/store/`). +- **Models**: TypeScript interfaces and classes defining data structures (`src/app/models/`). +- **Shared Utils**: Common messages, loading indicators, and validators (`src/app/shared/`). + +> See [`codebase-map.json`](./codebase-map.json) for complete symbol counts and dependency graphs. + +## Detected Design Patterns +| Pattern | Confidence | Locations | Description | +|---------|------------|-----------|-------------| +| Module | 100% | `src/app/*.module.ts` | Angular feature modules for separation of concerns | +| Redux / Store | 95% | `src/app/sales/store/` | State management using Actions, Reducers, and Store | +| Dependency Injection | 100% | `src/app/services/` | Angular DI for injecting services into components | +| Observable / Reactive | 90% | Services & Store | Heavy use of RxJS Observables for async data flows | + +## Entry Points +- [AppModule](file:///d:/desenvolvimento/Simplifique/vendaweb/Vendaweb-portal/src/app/app.module.ts) +- [AppComponent](file:///d:/desenvolvimento/Simplifique/vendaweb/Vendaweb-portal/src/app/app.component.ts) + +## Public API +| Symbol | Type | Location | +|--------|------|----------| +| `AppModule` | Class | `src/app/app.module.ts` | +| `SalesModule` | Class | `src/app/sales/sales.module.ts` | +| `PartnersModule` | Class | `src/app/partners/partners.module.ts` | +| `ShoppingReducer` | Function | `src/app/sales/store/reducers/shopping.reducer.ts` | + +## Internal System Boundaries +The application is clearly separated into bounded contexts: +- **Sales**: Core module handling product listings, shopping carts, checkout, and ordering. +- **Partners**: Module for managing partner ranges, reports, and payments. +- **CRM**: Module handling customer data, editing, and listing. +- **Admin/Auth**: Authentication and user permission management. + +## Top Directories Snapshot +- `src/app/sales/` (~50+ files) +- `src/app/models/` (~40+ files) +- `src/app/shared/` (~30+ files) +- `src/app/partners/` (~20+ files) +- `src/app/components/` (~10+ files) + +## Related Resources +- [Project Overview](./project-overview.md) +- [Data Flow](./data-flow.md) diff --git a/.context/docs/codebase-map.json b/.context/docs/codebase-map.json new file mode 100644 index 0000000..02b1435 --- /dev/null +++ b/.context/docs/codebase-map.json @@ -0,0 +1,1104 @@ +{ + "version": "1.0.0", + "generated": "2026-04-29T20:11:47.432Z", + "stack": { + "primaryLanguage": "typescript", + "languages": [ + "javascript", + "typescript" + ], + "frameworks": [ + "angular" + ], + "buildTools": [ + "docker", + "docker-compose", + "kubernetes" + ], + "testFrameworks": [], + "packageManager": "npm", + "isMonorepo": false, + "hasDocker": true, + "hasCI": false, + "runtimeEnvironment": "browser" + }, + "structure": { + "totalFiles": 559, + "rootPath": ".", + "topDirectories": [ + { + "name": "e2e", + "fileCount": 4, + "description": "Module directory" + }, + { + "name": "k8s", + "fileCount": 9, + "description": "K8 definitions" + }, + { + "name": "src", + "fileCount": 532, + "description": "Source code root" + } + ], + "languageDistribution": [ + { + "extension": ".ts", + "count": 288 + }, + { + "extension": ".html", + "count": 81 + }, + { + "extension": ".scss", + "count": 78 + }, + { + "extension": ".svg", + "count": 45 + }, + { + "extension": ".png", + "count": 13 + }, + { + "extension": ".json", + "count": 11 + }, + { + "extension": ".css", + "count": 10 + }, + { + "extension": ".yaml", + "count": 9 + }, + { + "extension": ".jpg", + "count": 6 + }, + { + "extension": ".jpeg", + "count": 5 + } + ] + }, + "architecture": { + "layers": [ + { + "name": "Components", + "description": "UI components and views", + "directories": [ + "src\\app", + "src\\app\\menu-ecosistema", + "src\\app\\menu", + "src\\app\\components", + "src\\app\\partners\\payment", + "src\\app\\partners\\partner-menu", + "src\\app\\partners\\parnter-category-home", + "src\\app\\partners\\parnter-category-create", + "src\\app\\partners\\home", + "src\\app\\sales\\sale-customer", + "src\\app\\sales\\product-list", + "src\\app\\sales\\product-detail", + "src\\app\\sales\\product", + "src\\app\\sales\\page-sales", + "src\\app\\sales\\order", + "src\\app\\sales\\menu-sales", + "src\\app\\sales\\menu-customer", + "src\\app\\sales\\home-sales", + "src\\app\\sales\\cart-sales", + "src\\app\\sales\\cart", + "src\\app\\financial\\checkout", + "src\\app\\crm\\menu-crm", + "src\\app\\crm\\edit-customer", + "src\\app\\crm\\customer", + "src\\app\\components\\product-list-item", + "src\\app\\components\\header-system", + "src\\app\\components\\header-shopping", + "src\\app\\components\\header-admin", + "src\\app\\components\\header-sales", + "src\\app\\auth\\login", + "src\\app\\auth\\register", + "src\\app\\auth\\auth-login", + "src\\app\\admin\\permission-user", + "src\\app\\partners\\reports\\extract-partner", + "src\\app\\partners\\reports\\commission", + "src\\app\\partners\\range\\partner-range", + "src\\app\\partners\\create\\partner", + "src\\app\\sales\\pages\\product-sale", + "src\\app\\sales\\pages\\product-orders", + "src\\app\\sales\\pages\\orders", + "src\\app\\sales\\pages\\list-product-orders", + "src\\app\\sales\\pages\\preorder", + "src\\app\\sales\\pages\\kpisales", + "src\\app\\sales\\pages\\order-panel", + "src\\app\\sales\\pages\\dashboard-seller", + "src\\app\\sales\\pages\\dashboard-company", + "src\\app\\sales\\pages\\dashboard", + "src\\app\\sales\\pages\\dash-sales", + "src\\app\\sales\\customer\\list-customer", + "src\\app\\sales\\customer\\edit-customer", + "src\\app\\sales\\customer\\create-customer", + "src\\app\\sales\\components\\tintometrico-modal", + "src\\app\\sales\\components\\shopping-item-modal", + "src\\app\\sales\\components\\select-customer", + "src\\app\\sales\\components\\select-address", + "src\\app\\sales\\components\\sales-appbar", + "src\\app\\sales\\components\\product-modal", + "src\\app\\sales\\components\\preorder-list", + "src\\app\\sales\\components\\product-card", + "src\\app\\sales\\components\\pre-customer", + "src\\app\\sales\\components\\modal-notify-stock", + "src\\app\\sales\\components\\list-shoppingitem", + "src\\app\\sales\\components\\discount-order", + "src\\app\\sales\\components\\header-juru", + "src\\app\\sales\\components\\discount-item-sales", + "src\\app\\sales\\components\\delivery-address", + "src\\app\\sales\\components\\discount-item", + "src\\app\\sales\\components\\dashboard-card", + "src\\app\\sales\\components\\create-address-modal", + "src\\app\\sales\\components\\create-customer-modal", + "src\\app\\sales\\components\\card-product-list", + "src\\app\\sales\\components\\card-product", + "src\\app\\sales\\components\\app-bar" + ], + "symbolCount": 73, + "dependsOn": [ + "Services", + "Controllers", + "Utils", + "Models" + ] + }, + { + "name": "Utils", + "description": "Shared utilities and helpers", + "directories": [ + "src\\app\\shared", + "src\\app\\shared\\validators", + "src\\app\\shared\\messages\\message-information", + "src\\app\\shared\\messages\\loading", + "src\\app\\shared\\messages\\confirmation", + "src\\app\\shared\\messages\\auth-user", + "src\\app\\shared\\menssages\\message-failure", + "src\\app\\shared\\menssages\\message-error", + "src\\app\\shared\\menssages\\menssage-information" + ], + "symbolCount": 11, + "dependsOn": [] + }, + { + "name": "Services", + "description": "Business logic and orchestration", + "directories": [ + "src\\app\\services", + "src\\app\\shared\\services", + "src\\app\\auth\\services" + ], + "symbolCount": 18, + "dependsOn": [ + "Controllers", + "Models" + ] + }, + { + "name": "Models", + "description": "Data structures and domain objects", + "directories": [ + "src\\app\\models", + "src\\app\\sales\\store\\models" + ], + "symbolCount": 77, + "dependsOn": [ + "Controllers", + "Components" + ] + }, + { + "name": "Controllers", + "description": "Request handling and routing", + "directories": [ + "src\\app\\models" + ], + "symbolCount": 1, + "dependsOn": [] + }, + { + "name": "Repositories", + "description": "Data access and persistence", + "directories": [ + "src\\app\\sales\\components\\data-delivery" + ], + "symbolCount": 1, + "dependsOn": [] + } + ], + "patterns": [ + { + "name": "Service Layer", + "confidence": 0.85, + "description": "Encapsulates business logic in service classes", + "occurrences": 18 + }, + { + "name": "Observer", + "confidence": 0.75, + "description": "Defines a subscription mechanism to notify multiple objects", + "occurrences": 1 + } + ], + "entryPoints": [ + "src\\main.ts" + ], + "mainEntryPoints": [ + "src\\main.ts" + ], + "moduleExports": [] + }, + "symbols": { + "classes": [ + { + "name": "ActionModel", + "kind": "class", + "file": "src\\app\\sales\\store\\models\\action.model.ts", + "line": 3, + "exported": true + }, + { + "name": "ActionsUser", + "kind": "class", + "file": "src\\app\\models\\actions-user.model.ts", + "line": 1, + "exported": true + }, + { + "name": "AddItemAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 60, + "exported": true + }, + { + "name": "AddItemFailureAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 70, + "exported": true + }, + { + "name": "AddItemSuccessAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 65, + "exported": true + }, + { + "name": "AddressCustomerService", + "kind": "class", + "file": "src\\app\\services\\address-customer.service.ts", + "line": 12, + "exported": true + }, + { + "name": "AdminModule", + "kind": "class", + "file": "src\\app\\admin\\admin.module.ts", + "line": 30, + "exported": true + }, + { + "name": "AppBarComponent", + "kind": "class", + "file": "src\\app\\sales\\components\\app-bar\\app-bar.component.ts", + "line": 13, + "exported": true + }, + { + "name": "AppComponent", + "kind": "class", + "file": "src\\app\\app.component.ts", + "line": 8, + "exported": true + }, + { + "name": "ApplyDiscountOrderAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 194, + "exported": true + }, + { + "name": "ApplyDiscountOrderFailureAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 205, + "exported": true + }, + { + "name": "ApplyDiscountOrderSuccessAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 199, + "exported": true + }, + { + "name": "AppModule", + "kind": "class", + "file": "src\\app\\app.module.ts", + "line": 103, + "exported": true + }, + { + "name": "AppPage", + "kind": "class", + "file": "e2e\\src\\app.po.ts", + "line": 3, + "exported": true + }, + { + "name": "AppRoutingModule", + "kind": "class", + "file": "src\\app\\app-routing.module.ts", + "line": 26, + "exported": true + }, + { + "name": "AuthGuard", + "kind": "class", + "file": "src\\app\\guards\\auth.guard.ts", + "line": 9, + "exported": true + }, + { + "name": "AuthLoginComponent", + "kind": "class", + "file": "src\\app\\auth\\auth-login\\auth-login.component.ts", + "line": 11, + "exported": true + }, + { + "name": "AuthModule", + "kind": "class", + "file": "src\\app\\auth\\auth.module.ts", + "line": 25, + "exported": true + }, + { + "name": "AuthService", + "kind": "class", + "file": "src\\app\\auth\\services\\auth.service.ts", + "line": 16, + "exported": true + }, + { + "name": "AuthUserComponent", + "kind": "class", + "file": "src\\app\\shared\\messages\\auth-user\\auth-user.component.ts", + "line": 13, + "exported": true + }, + { + "name": "BrandFilter", + "kind": "class", + "file": "src\\app\\models\\brand.model.ts", + "line": 1, + "exported": true + }, + { + "name": "CalculatePriceColor", + "kind": "class", + "file": "src\\app\\models\\calculate-price-color.model.ts", + "line": 1, + "exported": true + }, + { + "name": "CardProductComponent", + "kind": "class", + "file": "src\\app\\sales\\components\\card-product\\card-product.component.ts", + "line": 20, + "exported": true + }, + { + "name": "CardProductListComponent", + "kind": "class", + "file": "src\\app\\sales\\components\\card-product-list\\card-product-list.component.ts", + "line": 10, + "exported": true + }, + { + "name": "CartComponent", + "kind": "class", + "file": "src\\app\\sales\\cart\\cart.component.ts", + "line": 43, + "exported": true + }, + { + "name": "CartItensModel", + "kind": "class", + "file": "src\\app\\models\\cart-itens.model.ts", + "line": 2, + "exported": true + }, + { + "name": "CartModel", + "kind": "class", + "file": "src\\app\\models\\cart.model.ts", + "line": 3, + "exported": true + }, + { + "name": "Category", + "kind": "class", + "file": "src\\app\\models\\customer.model.ts", + "line": 34, + "exported": true + }, + { + "name": "CategoryCustomer", + "kind": "class", + "file": "src\\app\\models\\category.customer.model.ts", + "line": 1, + "exported": true + }, + { + "name": "CategoryPartner", + "kind": "class", + "file": "src\\app\\models\\category-partner.model.ts", + "line": 1, + "exported": true + } + ], + "interfaces": [ + { + "name": "AllDepartments", + "kind": "interface", + "file": "src\\app\\models\\departamento.model.ts", + "line": 18, + "exported": true + }, + { + "name": "AuthUser", + "kind": "interface", + "file": "src\\app\\models\\auth.user.model.ts", + "line": 1, + "exported": true + }, + { + "name": "Billing", + "kind": "interface", + "file": "src\\app\\models\\billing.model.ts", + "line": 1, + "exported": true + }, + { + "name": "Brand", + "kind": "interface", + "file": "src\\app\\models\\product.model.ts", + "line": 1, + "exported": true + }, + { + "name": "Categoria", + "kind": "interface", + "file": "src\\app\\models\\departamento.model.ts", + "line": 23, + "exported": true + }, + { + "name": "Categoria", + "kind": "interface", + "file": "src\\app\\models\\classe-mercadologica.model.ts", + "line": 1, + "exported": true + }, + { + "name": "CheckoutOrder", + "kind": "interface", + "file": "src\\app\\models\\checkout-order.model.ts", + "line": 1, + "exported": true + }, + { + "name": "ClasseMercadologica", + "kind": "interface", + "file": "src\\app\\models\\classe-mercadologica.model.ts", + "line": 18, + "exported": true + }, + { + "name": "CustomerAddress", + "kind": "interface", + "file": "src\\app\\models\\customer-address.model.ts", + "line": 1, + "exported": true + }, + { + "name": "CustomerBirthDate", + "kind": "interface", + "file": "src\\app\\sales\\components\\create-customer-modal\\create-customer-modal.component.ts", + "line": 22, + "exported": true + }, + { + "name": "CustomerSaleState", + "kind": "interface", + "file": "src\\app\\sales\\store\\reducers\\customer-sale.reducer.ts", + "line": 4, + "exported": true + }, + { + "name": "CustomerState", + "kind": "interface", + "file": "src\\app\\sales\\store\\models\\customer-state.model.ts", + "line": 3, + "exported": true + }, + { + "name": "DashboardSale", + "kind": "interface", + "file": "src\\app\\models\\dashboard.model.ts", + "line": 13, + "exported": true + }, + { + "name": "DashboardSeller", + "kind": "interface", + "file": "src\\app\\models\\dashboard-seller-new.model.ts", + "line": 25, + "exported": true + }, + { + "name": "DeliveryTaxTable", + "kind": "interface", + "file": "src\\app\\models\\delivery-tax-table.model.ts", + "line": 1, + "exported": true + }, + { + "name": "Departamento", + "kind": "interface", + "file": "src\\app\\models\\departamento.model.ts", + "line": 10, + "exported": true + }, + { + "name": "ExtractPartner", + "kind": "interface", + "file": "src\\app\\models\\extract-partner.model.ts", + "line": 1, + "exported": true + }, + { + "name": "JsonModel", + "kind": "interface", + "file": "src\\app\\sales\\components\\create-customer-modal\\create-customer-modal.component.ts", + "line": 18, + "exported": true + }, + { + "name": "LotProduct", + "kind": "interface", + "file": "src\\app\\models\\lot-product.model.ts", + "line": 1, + "exported": true + }, + { + "name": "OrderItens", + "kind": "interface", + "file": "src\\app\\models\\order-itens.model.ts", + "line": 1, + "exported": true + }, + { + "name": "OrderShipping", + "kind": "interface", + "file": "src\\app\\models\\order-shipping.model.ts", + "line": 1, + "exported": true + }, + { + "name": "PaymentPartner", + "kind": "interface", + "file": "src\\app\\models\\payment-partner.model.ts", + "line": 1, + "exported": true + }, + { + "name": "PaymentPlan", + "kind": "interface", + "file": "src\\app\\models\\payment-plan.model.ts", + "line": 1, + "exported": true + }, + { + "name": "PixOrder", + "kind": "interface", + "file": "src\\app\\models\\pix-order.model.ts", + "line": 1, + "exported": true + }, + { + "name": "PreOrderItens", + "kind": "interface", + "file": "src\\app\\models\\pre-order-itens.model.ts", + "line": 1, + "exported": true + }, + { + "name": "Price", + "kind": "interface", + "file": "src\\app\\models\\sale-product.model.ts", + "line": 13, + "exported": true + }, + { + "name": "Product", + "kind": "interface", + "file": "src\\app\\models\\product.model.ts", + "line": 6, + "exported": true + }, + { + "name": "ProductsOrder", + "kind": "interface", + "file": "src\\app\\models\\products-order.model.ts", + "line": 1, + "exported": true + }, + { + "name": "Rupture", + "kind": "interface", + "file": "src\\app\\models\\rupture.model.ts", + "line": 1, + "exported": true + }, + { + "name": "SaleHistory", + "kind": "interface", + "file": "src\\app\\models\\sale-history.model.ts", + "line": 1, + "exported": true + } + ], + "functions": [ + { + "name": "CustomerSaleReducer", + "kind": "function", + "file": "src\\app\\sales\\store\\reducers\\customer-sale.reducer.ts", + "line": 16, + "exported": true + }, + { + "name": "playerFactory", + "kind": "function", + "file": "src\\app\\app.module.ts", + "line": 51, + "exported": true + }, + { + "name": "playerFactory", + "kind": "function", + "file": "src\\app\\admin\\admin.module.ts", + "line": 11, + "exported": true + }, + { + "name": "ShoppingReducer", + "kind": "function", + "file": "src\\app\\sales\\store\\reducers\\shopping.reducer.ts", + "line": 27, + "exported": true + } + ], + "types": [ + { + "name": "CustomerSaleAction", + "kind": "type", + "file": "src\\app\\sales\\store\\actions\\customer-sale.action.ts", + "line": 47, + "exported": true + }, + { + "name": "ShoppingAction", + "kind": "type", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 211, + "exported": true + } + ], + "enums": [ + { + "name": "CustomerSaleActionTypes", + "kind": "enum", + "file": "src\\app\\sales\\store\\actions\\customer-sale.action.ts", + "line": 5, + "exported": true + }, + { + "name": "ShoppingActionTypes", + "kind": "enum", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 9, + "exported": true + } + ] + }, + "publicAPI": [ + { + "name": "ActionModel", + "kind": "class", + "file": "src\\app\\sales\\store\\models\\action.model.ts", + "line": 3, + "exported": true + }, + { + "name": "ActionsUser", + "kind": "class", + "file": "src\\app\\models\\actions-user.model.ts", + "line": 1, + "exported": true + }, + { + "name": "AddItemAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 60, + "exported": true + }, + { + "name": "AddItemFailureAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 70, + "exported": true + }, + { + "name": "AddItemSuccessAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 65, + "exported": true + }, + { + "name": "AddressCustomerService", + "kind": "class", + "file": "src\\app\\services\\address-customer.service.ts", + "line": 12, + "exported": true + }, + { + "name": "AdminModule", + "kind": "class", + "file": "src\\app\\admin\\admin.module.ts", + "line": 30, + "exported": true + }, + { + "name": "AllDepartments", + "kind": "interface", + "file": "src\\app\\models\\departamento.model.ts", + "line": 18, + "exported": true + }, + { + "name": "AppBarComponent", + "kind": "class", + "file": "src\\app\\sales\\components\\app-bar\\app-bar.component.ts", + "line": 13, + "exported": true + }, + { + "name": "AppComponent", + "kind": "class", + "file": "src\\app\\app.component.ts", + "line": 8, + "exported": true + }, + { + "name": "ApplyDiscountOrderAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 194, + "exported": true + }, + { + "name": "ApplyDiscountOrderFailureAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 205, + "exported": true + }, + { + "name": "ApplyDiscountOrderSuccessAction", + "kind": "class", + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "line": 199, + "exported": true + }, + { + "name": "AppModule", + "kind": "class", + "file": "src\\app\\app.module.ts", + "line": 103, + "exported": true + }, + { + "name": "AppPage", + "kind": "class", + "file": "e2e\\src\\app.po.ts", + "line": 3, + "exported": true + }, + { + "name": "AppRoutingModule", + "kind": "class", + "file": "src\\app\\app-routing.module.ts", + "line": 26, + "exported": true + }, + { + "name": "AuthGuard", + "kind": "class", + "file": "src\\app\\guards\\auth.guard.ts", + "line": 9, + "exported": true + }, + { + "name": "AuthLoginComponent", + "kind": "class", + "file": "src\\app\\auth\\auth-login\\auth-login.component.ts", + "line": 11, + "exported": true + }, + { + "name": "AuthModule", + "kind": "class", + "file": "src\\app\\auth\\auth.module.ts", + "line": 25, + "exported": true + }, + { + "name": "AuthService", + "kind": "class", + "file": "src\\app\\auth\\services\\auth.service.ts", + "line": 16, + "exported": true + }, + { + "name": "AuthUser", + "kind": "interface", + "file": "src\\app\\models\\auth.user.model.ts", + "line": 1, + "exported": true + }, + { + "name": "AuthUserComponent", + "kind": "class", + "file": "src\\app\\shared\\messages\\auth-user\\auth-user.component.ts", + "line": 13, + "exported": true + }, + { + "name": "Billing", + "kind": "interface", + "file": "src\\app\\models\\billing.model.ts", + "line": 1, + "exported": true + }, + { + "name": "Brand", + "kind": "interface", + "file": "src\\app\\models\\product.model.ts", + "line": 1, + "exported": true + }, + { + "name": "BrandFilter", + "kind": "class", + "file": "src\\app\\models\\brand.model.ts", + "line": 1, + "exported": true + }, + { + "name": "CalculatePriceColor", + "kind": "class", + "file": "src\\app\\models\\calculate-price-color.model.ts", + "line": 1, + "exported": true + }, + { + "name": "CardProductComponent", + "kind": "class", + "file": "src\\app\\sales\\components\\card-product\\card-product.component.ts", + "line": 20, + "exported": true + }, + { + "name": "CardProductListComponent", + "kind": "class", + "file": "src\\app\\sales\\components\\card-product-list\\card-product-list.component.ts", + "line": 10, + "exported": true + }, + { + "name": "CartComponent", + "kind": "class", + "file": "src\\app\\sales\\cart\\cart.component.ts", + "line": 43, + "exported": true + }, + { + "name": "CartItensModel", + "kind": "class", + "file": "src\\app\\models\\cart-itens.model.ts", + "line": 2, + "exported": true + } + ], + "dependencies": { + "mostImported": [ + { + "file": "src\\app\\sales\\store\\models\\shopping-item.ts", + "importedBy": 16, + "description": "Data models and entities" + }, + { + "file": "src\\app\\sales\\store\\actions\\shopping.action.ts", + "importedBy": 16, + "description": "Redux actions" + }, + { + "file": "src\\app\\sales\\store\\models\\sale-state.model.ts", + "importedBy": 14, + "description": "Data models and entities" + }, + { + "file": "src\\app\\auth\\services\\auth.service.ts", + "importedBy": 12, + "description": "Business logic and orchestration services" + }, + { + "file": "src\\app\\shared\\kendo.module.ts", + "importedBy": 10, + "description": "Shared code across modules" + }, + { + "file": "src\\app\\models\\result-api.model.ts", + "importedBy": 6, + "description": "Data models and entities" + }, + { + "file": "src\\app\\guards\\auth.guard.ts", + "importedBy": 5 + }, + { + "file": "src\\app\\components\\component.module.ts", + "importedBy": 5, + "description": "UI components" + }, + { + "file": "src\\app\\sales\\components\\product-modal\\product-modal.component.ts", + "importedBy": 5 + }, + { + "file": "src\\app\\sales\\store\\actions\\customer-sale.action.ts", + "importedBy": 5, + "description": "Redux actions" + }, + { + "file": "src\\app\\sales\\store\\reducers\\customer-sale.reducer.ts", + "importedBy": 4, + "description": "Redux reducers" + }, + { + "file": "src\\app\\shared\\messages\\confirmation\\confirmation.component.ts", + "importedBy": 4 + }, + { + "file": "src\\app\\sales\\store\\models\\shopping.model.ts", + "importedBy": 4, + "description": "Data models and entities" + }, + { + "file": "src\\app\\sales\\components\\pre-customer\\pre-customer.component.ts", + "importedBy": 4 + }, + { + "file": "src\\app\\shared\\menssages\\message-error\\message-error.component.ts", + "importedBy": 3 + }, + { + "file": "src\\app\\menu-ecosistema\\menu-ecosistema.component.ts", + "importedBy": 3 + }, + { + "file": "src\\app\\shared\\menssages\\message-failure\\message-failure.component.ts", + "importedBy": 3 + }, + { + "file": "src\\app\\menu\\menu.component.ts", + "importedBy": 3 + }, + { + "file": "src\\app\\sales\\menu-sales\\menu-sales.component.ts", + "importedBy": 3 + }, + { + "file": "src\\app\\shared\\messages\\message-information\\message-information.component.ts", + "importedBy": 3 + } + ] + }, + "stats": { + "totalSymbols": 245, + "exportedSymbols": 245, + "analysisTimeMs": 3463 + }, + "keyFiles": [ + { + "path": "src\\main.ts", + "description": "Source code root", + "category": "entrypoint" + }, + { + "path": "e2e\\tsconfig.json", + "description": "TypeScript configuration", + "category": "config" + }, + { + "path": "package.json", + "description": "Package manifest", + "category": "config" + }, + { + "path": "tsconfig.app.json", + "description": "TypeScript configuration", + "category": "config" + }, + { + "path": "tsconfig.json", + "description": "TypeScript configuration", + "category": "config" + }, + { + "path": "tsconfig.spec.json", + "description": "TypeScript configuration", + "category": "config" + } + ], + "navigation": { + "tests": "**/*.spec.ts", + "config": [ + "package.json", + "tsconfig.json", + "tsconfig.*.json" + ], + "types": [], + "mainLogic": [ + "src" + ] + } +} \ No newline at end of file diff --git a/.context/docs/development-workflow.md b/.context/docs/development-workflow.md new file mode 100644 index 0000000..deefee5 --- /dev/null +++ b/.context/docs/development-workflow.md @@ -0,0 +1,40 @@ +--- +type: doc +name: development-workflow +description: Day-to-day engineering processes, branching, and contribution guidelines +category: workflow +generated: 2026-04-29 +status: active +scaffoldVersion: "2.0.0" +--- + +# Development Workflow + +## Day-to-Day Process +This Angular repository requires developers to implement features within their respective feature modules (e.g., `Sales`, `Partners`, `CRM`). Developers should ensure that all new services, components, and state management changes are properly typed using the `src/app/models` directory. + +## Branching & Releases +We follow a standard Git workflow: +- `main` / `master`: The stable production branch. +- `develop`: The primary integration branch. +- Feature branches: Created from `develop` using a standard naming convention like `feat/feature-name` or `bugfix/issue-description`. +Commits should follow Conventional Commits (e.g., `feat(sales): add discount module`). + +## Local Development +- Install dependencies: `npm install` +- Run local development server: `npm start` or `npm run dev` (uses Angular CLI `ng serve`) +- Run tests: `npm test` +- Build for production: `npm run build` + +## Code Review Expectations +- Ensure Angular best practices are followed (e.g., Unsubscribing from Observables, using `OnPush` change detection where applicable). +- Avoid mutating state directly in components; use the Store actions. +- Keep components small and focused, extracting complex business logic into Services. +- All new features should include proper TypeScript models. + +## Onboarding Tasks +New developers should begin by reading the `Project Overview` and familiarizing themselves with the `Sales` module, as it is the core of the application. + +## Cross-References +- [Testing Strategy](./testing-strategy.md) +- [Tooling](./tooling.md) diff --git a/.context/docs/glossary.md b/.context/docs/glossary.md new file mode 100644 index 0000000..5bca25e --- /dev/null +++ b/.context/docs/glossary.md @@ -0,0 +1,45 @@ +--- +type: doc +name: glossary +description: Project terminology, type definitions, domain entities, and business rules +category: glossary +generated: 2026-04-29 +status: active +scaffoldVersion: "2.0.0" +--- + +# Glossary & Domain Concepts + +## Glossary +- **PreOrder (Pré-venda)**: An order created by a seller that has not yet been billed. +- **Cart (Carrinho)**: A temporary collection of products a customer intends to purchase. +- **Checkout**: The process of finalizing an order, choosing payment methods and installments. +- **Seller (Vendedor)**: The user using the application to sell products to customers. +- **Partner (Parceiro)**: A B2B entity that works with the company, has specific commission and range logic. +- **Tintométrico**: A specific feature related to color mixing, usually for paint products. + +## Type Definitions +- `Customer` (src/app/models/customer.model.ts) +- `Product` (src/app/models/product.model.ts) +- `Order` (src/app/models/order.model.ts) +- `PreOrder` (src/app/models/pre-order.model.ts) +- `CartModel` (src/app/models/cart.model.ts) +- `SaleProduct` (src/app/models/sale-product.model.ts) + +## Enumerations +- `ShoppingActionTypes` (src/app/sales/store/actions/shopping.action.ts) +- `CustomerSaleActionTypes` (src/app/sales/store/actions/customer-sale.action.ts) + +## Core Terms +- **State/Store**: Refers to the application's global Redux state (NgRx) which holds the current customer, cart contents, and authentication status. +- **CRM**: Customer Relationship Management section where sellers can view, create, or edit customer profiles. + +## Personas / Actors +- **Seller (Vendedor)**: Wants to quickly look up products, add them to a cart, apply discounts, and checkout on behalf of a customer. +- **Admin**: Configures permissions, views high-level dashboard KPIs. +- **Partner (Parceiro)**: Checks commissions, extracts, and ranges. + +## Domain Rules & Invariants +- A cart must be associated with a customer before checkout. +- Discounts are governed by specific authorization roles. +- The `Tintométrico` module calculates specific prices based on color compositions. diff --git a/.context/docs/project-overview.md b/.context/docs/project-overview.md new file mode 100644 index 0000000..7e5a33f --- /dev/null +++ b/.context/docs/project-overview.md @@ -0,0 +1,49 @@ +--- +type: doc +name: project-overview +description: High-level overview of the project, its purpose, and key components +category: overview +generated: 2026-04-29 +status: active +scaffoldVersion: "2.0.0" +--- + +# Project Overview +This project is an Angular-based B2B/B2C Sales Portal (VendaWeb). It empowers sellers to manage customers, browse product catalogs, assemble carts, and process orders, while also offering CRM, Partner Management, and administrative capabilities. + +> **Detailed Analysis**: For complete symbol counts, architecture layers, and dependency graphs, see [`codebase-map.json`](./codebase-map.json). + +## Quick Facts +- **Root**: `/` +- **Languages**: TypeScript, HTML, SCSS +- **Framework**: Angular +- **State Management**: NgRx (Redux pattern) + +## Entry Points +- [AppModule](file:///d:/desenvolvimento/Simplifique/vendaweb/Vendaweb-portal/src/app/app.module.ts) +- [main.ts](file:///d:/desenvolvimento/Simplifique/vendaweb/Vendaweb-portal/src/main.ts) + +## Key Exports +- `AppModule` +- `SalesModule` +- `PartnersModule` + +## File Structure & Code Organization +- `src/app/sales/` — Core point-of-sale functionality (cart, products, checkout). +- `src/app/crm/` — Customer management interfaces. +- `src/app/partners/` — Partner reporting, commissions, and management. +- `src/app/financial/` — Financial operations and checkout. +- `src/app/models/` — TypeScript interfaces representing business entities. +- `src/app/shared/` — Reusable UI components, interceptors, and services. +- `src/app/auth/` — Authentication and login flows. + +## Technology Stack Summary +- **Frontend**: Angular +- **State**: NgRx Store +- **Styling**: SCSS, Kendo UI (`kendo-ui-license.txt` indicates Kendo usage) +- **Tooling**: Angular CLI, TypeScript, npm + +## Getting Started Checklist +1. Install dependencies with `npm install`. +2. Run the application locally with `npm run start` or `ng serve`. +3. Navigate to `http://localhost:4200` to view the app. diff --git a/.context/docs/qa/README.md b/.context/docs/qa/README.md new file mode 100644 index 0000000..09897d8 --- /dev/null +++ b/.context/docs/qa/README.md @@ -0,0 +1,23 @@ +# Q&A Index + +Project type: **web-app** + +Generated: 2026-04-29T20:15:44.291Z + +## Getting-started + +- [How do I set up and run this project?](./getting-started.md) + +## Architecture + +- [How is the codebase organized?](./project-structure.md) + +## Features + +- [How does authentication work?](./authentication.md) +- [How is data stored and accessed?](./database.md) +- [What API endpoints are available?](./api-endpoints.md) + +## Operations + +- [How do I deploy this project?](./deployment.md) diff --git a/.context/docs/qa/api-endpoints.md b/.context/docs/qa/api-endpoints.md new file mode 100644 index 0000000..2aa7588 --- /dev/null +++ b/.context/docs/qa/api-endpoints.md @@ -0,0 +1,11 @@ +--- +slug: api-endpoints +category: features +generatedAt: 2026-04-29T20:15:39.516Z +--- + +# What API endpoints are available? + +## API Endpoints + +### Detected API Files diff --git a/.context/docs/qa/authentication.md b/.context/docs/qa/authentication.md new file mode 100644 index 0000000..a157093 --- /dev/null +++ b/.context/docs/qa/authentication.md @@ -0,0 +1,23 @@ +--- +slug: authentication +category: features +generatedAt: 2026-04-29T20:15:39.516Z +relevantFiles: + - C:\Users\luis.estevao\AppData\Local\Programs\Antigravity\src\app\guards\auth.guard.ts + - C:\Users\luis.estevao\AppData\Local\Programs\Antigravity\src\app\auth\auth-login\auth-login.component.ts + - C:\Users\luis.estevao\AppData\Local\Programs\Antigravity\src\app\auth\auth.module.ts + - C:\Users\luis.estevao\AppData\Local\Programs\Antigravity\src\app\auth\services\auth.service.ts + - C:\Users\luis.estevao\AppData\Local\Programs\Antigravity\src\app\shared\messages\auth-user\auth-user.component.ts +--- + +# How does authentication work? + +## Authentication + +### Implementation Details + +- Auth-related symbol: AuthGuard +- Auth-related symbol: AuthLoginComponent +- Auth-related symbol: AuthModule +- Auth-related symbol: AuthService +- Auth-related symbol: AuthUserComponent \ No newline at end of file diff --git a/.context/docs/qa/database.md b/.context/docs/qa/database.md new file mode 100644 index 0000000..db9c654 --- /dev/null +++ b/.context/docs/qa/database.md @@ -0,0 +1,22 @@ +--- +slug: database +category: features +generatedAt: 2026-04-29T20:15:39.516Z +relevantFiles: + - C:\Users\luis.estevao\AppData\Local\Programs\Antigravity\src\app\sales\store\models\action.model.ts + - C:\Users\luis.estevao\AppData\Local\Programs\Antigravity\src\app\models\cart-itens.model.ts + - C:\Users\luis.estevao\AppData\Local\Programs\Antigravity\src\app\models\cart.model.ts + - C:\Users\luis.estevao\AppData\Local\Programs\Antigravity\src\app\sales\components\create-customer-modal\create-customer-modal.component.ts +--- + +# How is data stored and accessed? + +## Database + +### Implementation Details + +- Database-related symbol: ActionModel +- Database-related symbol: CartItensModel +- Database-related symbol: CartModel +- Database-related symbol: JsonModel +- Data layer detected in architecture \ No newline at end of file diff --git a/.context/docs/qa/deployment.md b/.context/docs/qa/deployment.md new file mode 100644 index 0000000..a860358 --- /dev/null +++ b/.context/docs/qa/deployment.md @@ -0,0 +1,21 @@ +--- +slug: deployment +category: operations +generatedAt: 2026-04-29T20:15:44.246Z +relevantFiles: + - docker-compose.yml + - Dockerfile +--- + +# How do I deploy this project? + +## Deployment + +### Docker + +This project includes Docker configuration. + +```bash +docker build -t app . +docker run -p 3000:3000 app +``` diff --git a/.context/docs/qa/getting-started.md b/.context/docs/qa/getting-started.md new file mode 100644 index 0000000..fbc2dd1 --- /dev/null +++ b/.context/docs/qa/getting-started.md @@ -0,0 +1,32 @@ +--- +slug: getting-started +category: getting-started +generatedAt: 2026-04-29T20:11:48.572Z +--- + +# How do I set up and run this project? + +## Getting Started + +### Prerequisites + +- Node.js (LTS version recommended) +- npm + +### Installation + +```bash +# Clone the repository +git clone +cd Vendaweb-portal + +# Install dependencies +npm install +``` + +### Running + +```bash +# See package.json for available scripts +npm run +``` \ No newline at end of file diff --git a/.context/docs/qa/project-structure.md b/.context/docs/qa/project-structure.md new file mode 100644 index 0000000..bc57985 --- /dev/null +++ b/.context/docs/qa/project-structure.md @@ -0,0 +1,15 @@ +--- +slug: project-structure +category: architecture +generatedAt: 2026-04-29T20:15:39.515Z +--- + +# How is the codebase organized? + +## Project Structure + +``` +e2e/ +k8s/ +src/ +``` diff --git a/.context/docs/security.md b/.context/docs/security.md new file mode 100644 index 0000000..f107453 --- /dev/null +++ b/.context/docs/security.md @@ -0,0 +1,25 @@ +--- +type: doc +name: security +description: Security policies, authentication, secrets management, and compliance requirements +category: security +generated: 2026-04-29 +status: active +scaffoldVersion: "2.0.0" +--- + +# Security & Compliance Notes + +## Authentication & Authorization +The application uses JWT (JSON Web Tokens) for authentication. +- The `AuthModule` handles user login (`AuthLoginComponent`). +- An `AuthGuard` is implemented to protect specific routes, ensuring that unauthenticated users are redirected to the login page. +- Role-based access control (RBAC) is implemented via `PermissionUser` components and specific guards. + +## Secrets & Sensitive Data +- Environment variables (`src/environments/`) contain API endpoints. +- Avoid hardcoding tokens or sensitive keys directly into the source code. +- JWT tokens are stored in `localStorage` or `sessionStorage` and attached to outgoing requests via an HttpInterceptor. + +## Cross-References +- [Architecture](./architecture.md) diff --git a/.context/docs/testing-strategy.md b/.context/docs/testing-strategy.md new file mode 100644 index 0000000..009067a --- /dev/null +++ b/.context/docs/testing-strategy.md @@ -0,0 +1,25 @@ +--- +type: doc +name: testing-strategy +description: Test frameworks, patterns, coverage requirements, and quality gates +category: testing +generated: 2026-04-29 +status: active +scaffoldVersion: "2.0.0" +--- + +# Testing Strategy + +## Test Types +- **Unit**: Jasmine and Karma, files named `*.spec.ts`. +- **E2E**: Protractor (`e2e/` folder), files named `*.e2e-spec.ts`. + +## Running Tests +- All tests: `npm run test` or `ng test` +- E2E tests: `npm run e2e` or `ng e2e` +- Watch mode: `npm run test -- --watch` + +## Quality Gates +- Components should have accompanying `.spec.ts` files ensuring fundamental rendering and interactions. +- NgRx reducers and effects must be covered by unit tests. +- TypeScript strict typing helps catch compile-time issues before tests even run. diff --git a/.context/docs/tooling.md b/.context/docs/tooling.md new file mode 100644 index 0000000..805dc81 --- /dev/null +++ b/.context/docs/tooling.md @@ -0,0 +1,33 @@ +--- +type: doc +name: tooling +description: Scripts, IDE settings, automation, and developer productivity tips +category: tooling +generated: 2026-04-29 +status: active +scaffoldVersion: "2.0.0" +--- + +# Tooling & Productivity Guide + +## Required Tooling +- **Node.js**: The JavaScript runtime. +- **npm**: Package manager. +- **Angular CLI**: Install globally via `npm install -g @angular/cli`. + +## Recommended Automation +- Formatting: Prettier/ESLint integration should be configured. +- Scaffolding: Use Angular CLI to generate boilerplate. + - Generate component: `ng g c component-name` + - Generate service: `ng g s service-name` + +## IDE / Editor Setup +- **VS Code** is highly recommended. +- **Extensions**: + - Angular Language Service + - ESLint + - Prettier + - NgRx Snippets + +## Productivity Tips +- Utilize the Redux DevTools extension in your browser to debug NgRx state changes in real-time. diff --git a/.context/skills/README.md b/.context/skills/README.md new file mode 100644 index 0000000..cfeee64 --- /dev/null +++ b/.context/skills/README.md @@ -0,0 +1,73 @@ +# Skills + +On-demand expertise for AI agents. Skills are task-specific procedures that get activated when relevant. + +> Project: Vendaweb-portal + +## How Skills Work + +1. **Discovery**: AI agents discover available skills +2. **Matching**: When a task matches a skill's description, it's activated +3. **Execution**: The skill's instructions guide the AI's behavior + +## Available Skills + +### Built-in Skills + +| Skill | Description | Phases | +|-------|-------------|--------| +| [Commit Message](./commit-message/SKILL.md) | Generate commit messages following conventional commits with scope detection | E, C | +| [Pr Review](./pr-review/SKILL.md) | Review pull requests against team standards and best practices | R, V | +| [Code Review](./code-review/SKILL.md) | Review code quality, patterns, and best practices | R, V | +| [Test Generation](./test-generation/SKILL.md) | Generate comprehensive test cases for code | E, V | +| [Documentation](./documentation/SKILL.md) | Generate and update technical documentation | P, C | +| [Refactoring](./refactoring/SKILL.md) | Safe code refactoring with step-by-step approach | E | +| [Bug Investigation](./bug-investigation/SKILL.md) | Systematic bug investigation and root cause analysis | E, V | +| [Feature Breakdown](./feature-breakdown/SKILL.md) | Break down features into implementable tasks | P | +| [Api Design](./api-design/SKILL.md) | Design RESTful APIs following best practices | P, R | +| [Security Audit](./security-audit/SKILL.md) | Security review checklist for code and infrastructure | R, V | + +## Creating Custom Skills + +Create a new skill by adding a directory with a `SKILL.md` file: + +``` +.context/skills/ +└── my-skill/ + ├── SKILL.md # Required: skill definition + └── templates/ # Optional: helper resources + └── checklist.md +``` + +### SKILL.md Format + +```yaml +--- +name: my-skill +description: When to use this skill +phases: [P, E, V] # Optional: PREVC phases +mode: false # Optional: mode command? +--- + +# My Skill + +## When to Use +[Description of when this skill applies] + +## Instructions +1. Step one +2. Step two + +## Examples +[Usage examples] +``` + +## PREVC Phase Mapping + +| Phase | Name | Skills | +|-------|------|--------| +| P | Planning | feature-breakdown, documentation, api-design | +| R | Review | pr-review, code-review, api-design, security-audit | +| E | Execution | commit-message, test-generation, refactoring, bug-investigation | +| V | Validation | pr-review, code-review, test-generation, security-audit | +| C | Confirmation | commit-message, documentation | diff --git a/.context/skills/api-design/SKILL.md b/.context/skills/api-design/SKILL.md new file mode 100644 index 0000000..759b47a --- /dev/null +++ b/.context/skills/api-design/SKILL.md @@ -0,0 +1,10 @@ +--- +type: skill +name: Api Design +description: Design RESTful APIs following best practices +skillSlug: api-design +phases: [P, R] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/skills/bug-investigation/SKILL.md b/.context/skills/bug-investigation/SKILL.md new file mode 100644 index 0000000..9aaf808 --- /dev/null +++ b/.context/skills/bug-investigation/SKILL.md @@ -0,0 +1,10 @@ +--- +type: skill +name: Bug Investigation +description: Systematic bug investigation and root cause analysis +skillSlug: bug-investigation +phases: [E, V] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/skills/code-review/SKILL.md b/.context/skills/code-review/SKILL.md new file mode 100644 index 0000000..cb4c125 --- /dev/null +++ b/.context/skills/code-review/SKILL.md @@ -0,0 +1,10 @@ +--- +type: skill +name: Code Review +description: Review code quality, patterns, and best practices +skillSlug: code-review +phases: [R, V] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/skills/commit-message/SKILL.md b/.context/skills/commit-message/SKILL.md new file mode 100644 index 0000000..06254bd --- /dev/null +++ b/.context/skills/commit-message/SKILL.md @@ -0,0 +1,10 @@ +--- +type: skill +name: Commit Message +description: Generate commit messages following conventional commits with scope detection +skillSlug: commit-message +phases: [E, C] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/skills/documentation/SKILL.md b/.context/skills/documentation/SKILL.md new file mode 100644 index 0000000..ffc2b86 --- /dev/null +++ b/.context/skills/documentation/SKILL.md @@ -0,0 +1,10 @@ +--- +type: skill +name: Documentation +description: Generate and update technical documentation +skillSlug: documentation +phases: [P, C] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/skills/feature-breakdown/SKILL.md b/.context/skills/feature-breakdown/SKILL.md new file mode 100644 index 0000000..9ff3965 --- /dev/null +++ b/.context/skills/feature-breakdown/SKILL.md @@ -0,0 +1,10 @@ +--- +type: skill +name: Feature Breakdown +description: Break down features into implementable tasks +skillSlug: feature-breakdown +phases: [P] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/skills/pr-review/SKILL.md b/.context/skills/pr-review/SKILL.md new file mode 100644 index 0000000..2f93a2d --- /dev/null +++ b/.context/skills/pr-review/SKILL.md @@ -0,0 +1,10 @@ +--- +type: skill +name: Pr Review +description: Review pull requests against team standards and best practices +skillSlug: pr-review +phases: [R, V] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/skills/refactoring/SKILL.md b/.context/skills/refactoring/SKILL.md new file mode 100644 index 0000000..1495289 --- /dev/null +++ b/.context/skills/refactoring/SKILL.md @@ -0,0 +1,10 @@ +--- +type: skill +name: Refactoring +description: Safe code refactoring with step-by-step approach +skillSlug: refactoring +phases: [E] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/skills/security-audit/SKILL.md b/.context/skills/security-audit/SKILL.md new file mode 100644 index 0000000..6672ece --- /dev/null +++ b/.context/skills/security-audit/SKILL.md @@ -0,0 +1,10 @@ +--- +type: skill +name: Security Audit +description: Security review checklist for code and infrastructure +skillSlug: security-audit +phases: [R, V] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/skills/test-generation/SKILL.md b/.context/skills/test-generation/SKILL.md new file mode 100644 index 0000000..2503c6e --- /dev/null +++ b/.context/skills/test-generation/SKILL.md @@ -0,0 +1,10 @@ +--- +type: skill +name: Test Generation +description: Generate comprehensive test cases for code +skillSlug: test-generation +phases: [E, V] +generated: 2026-04-29 +status: unfilled +scaffoldVersion: "2.0.0" +--- diff --git a/.context/workflow/actions.jsonl b/.context/workflow/actions.jsonl new file mode 100644 index 0000000..a2cecac --- /dev/null +++ b/.context/workflow/actions.jsonl @@ -0,0 +1,4 @@ +{"timestamp":"2026-04-29T20:15:44.301Z","tool":"context","action":"init","status":"success","details":{"params":{"action":"init","repoPath":"d:\\desenvolvimento\\Simplifique\\vendaweb\\Vendaweb-portal","autoFill":true},"result":{"status":"incomplete"}}} +{"timestamp":"2026-04-29T20:17:00.305Z","tool":"context","action":"listToFill","status":"success","details":{"params":{"action":"listToFill","repoPath":"d:\\desenvolvimento\\Simplifique\\vendaweb\\Vendaweb-portal","target":"docs"},"result":{"success":true}}} +{"timestamp":"2026-04-29T20:17:21.000Z","tool":"context","action":"fill","status":"success","details":{"params":{"action":"fill","repoPath":"d:\\desenvolvimento\\Simplifique\\vendaweb\\Vendaweb-portal","target":"docs"},"result":{"success":true}}} +{"timestamp":"2026-04-29T20:18:01.149Z","tool":"context","action":"fill","status":"success","details":{"params":{"action":"fill","repoPath":"d:\\desenvolvimento\\Simplifique\\vendaweb\\Vendaweb-portal","target":"docs","offset":3,"limit":5},"result":{"success":true}}} diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..eb18c51 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,34 @@ +# AGENTS.md + +## Dev environment tips +- Install dependencies with `npm install` before running scaffolds. +- Use `npm run dev` for the interactive TypeScript session that powers local experimentation. +- Run `npm run build` to refresh the CommonJS bundle in `dist/` before shipping changes. +- Store generated artefacts in `.context/` so reruns stay deterministic. + +## Testing instructions +- Execute `npm run test` to run the Jest suite. +- Append `-- --watch` while iterating on a failing spec. +- Trigger `npm run build && npm run test` before opening a PR to mimic CI. +- Add or update tests alongside any generator or CLI changes. + +## PR instructions +- Follow Conventional Commits (for example, `feat(scaffolding): add doc links`). +- Cross-link new scaffolds in `docs/README.md` and `agents/README.md` so future agents can find them. +- Attach sample CLI output or generated markdown when behaviour shifts. +- Confirm the built artefacts in `dist/` match the new source changes. + +## Repository map +- `angular.json/` — explain what lives here and when agents should edit it. +- `browserslist/` — explain what lives here and when agents should edit it. +- `docker-compose.yml/` — explain what lives here and when agents should edit it. +- `Dockerfile/` — explain what lives here and when agents should edit it. +- `e2e/` — explain what lives here and when agents should edit it. +- `k8s/` — explain what lives here and when agents should edit it. +- `karma.conf.js/` — explain what lives here and when agents should edit it. +- `kendo-ui-license.txt/` — explain what lives here and when agents should edit it. + +## AI Context References +- Documentation index: `.context/docs/README.md` +- Agent playbooks: `.context/agents/README.md` +- Contributor guide: `CONTRIBUTING.md`