{"_id":"@arkalliance/portfolio-share","_rev":"3-656c78211563658e5fb9a28d3d90c99c","name":"@arkalliance/portfolio-share","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@arkalliance/portfolio-share","version":"1.0.0","keywords":["ark-alliance","portfolio","dto","typescript","shared","types"],"author":{"name":"Armand Richelet-Kleinberg","email":"armand@m2h.io"},"license":"MIT","_id":"@arkalliance/portfolio-share@1.0.0","maintainers":[{"name":"arkalliance","email":"arkleinberg@gmail.com"}],"homepage":"https://github.com/ark-alliance/ark-portfolio#readme","bugs":{"url":"https://github.com/ark-alliance/ark-portfolio/issues"},"dist":{"shasum":"f429adc5ceb5cb6fda871bc71f1d61818dbe1ce1","tarball":"https://registry.npmjs.org/@arkalliance/portfolio-share/-/portfolio-share-1.0.0.tgz","fileCount":56,"integrity":"sha512-MFLF9Xd3TbcrCHSnVOrZ8DJycuae0K+gbnrqt5JuJgUMNky43/Z2fyf05SkZIlYnblLh5ye5UmIuqRx9EuRn8w==","signatures":[{"sig":"MEQCICdCbbmti9KIOJciBbT9Nrm6FGVQdpkaRgk05WTrbKH/AiAnYitkA5sD7kfl+pWvdBg/7IKTo2wfSZ4ec7nutxlYew==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113355},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./dtos/*":{"types":"./dist/dtos/*.d.ts","import":"./dist/dtos/*.js"},"./enums/*":{"types":"./dist/enums/*.d.ts","import":"./dist/enums/*.js"},"./mocks/*":{"types":"./dist/mocks/*.d.ts","import":"./dist/mocks/*.js"},"./constants/*":{"types":"./dist/constants/*.d.ts","import":"./dist/constants/*.js"}},"gitHead":"95fdafb8c499e3ceecf1aa762460258c5d2ca1fb","scripts":{"build":"tsc","clean":"rimraf dist","typecheck":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"arkalliance","email":"arkleinberg@gmail.com"},"repository":{"url":"git+https://github.com/ark-alliance/ark-portfolio.git","type":"git","directory":"Ark.Portfolio.Share"},"_npmVersion":"11.6.2","description":"Shared DTOs, Enums, and Type definitions for Ark.Alliance.Portfolio ecosystem","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/portfolio-share_1.0.0_1767385492840_0.8285536732495846","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@arkalliance/portfolio-share","version":"1.0.1","keywords":["ark-alliance","portfolio","dto","typescript","shared","types"],"author":{"name":"Armand Richelet-Kleinberg","email":"armand@m2h.io"},"license":"MIT","_id":"@arkalliance/portfolio-share@1.0.1","maintainers":[{"name":"arkalliance","email":"arkleinberg@gmail.com"}],"homepage":"https://github.com/ark-alliance/ark-portfolio#readme","bugs":{"url":"https://github.com/ark-alliance/ark-portfolio/issues"},"dist":{"shasum":"105686424425f16a5a6fd37972bc0292eafe8552","tarball":"https://registry.npmjs.org/@arkalliance/portfolio-share/-/portfolio-share-1.0.1.tgz","fileCount":76,"integrity":"sha512-6tZ+UOW9nwc13kj03tbz1uY3XwzYz2wZ/N1Q+CqeLuzHWs5P95icuvWRgR/5jkVi0IE2OO3dn7IyxztsVOOqWw==","signatures":[{"sig":"MEYCIQD4AbKgkjTU6Dn5u3ncgxR7CNDfDhMf4EFK1mTjTTKMHwIhAOUGQ372tpyglit9a8zGlD5nKdIIGfuynH8cWbdclDB5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":158389},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./dtos/*":{"types":"./dist/dtos/*.d.ts","import":"./dist/dtos/*.js"},"./enums/*":{"types":"./dist/enums/*.d.ts","import":"./dist/enums/*.js"},"./mocks/*":{"types":"./dist/mocks/*.d.ts","import":"./dist/mocks/*.js"},"./constants/*":{"types":"./dist/constants/*.d.ts","import":"./dist/constants/*.js"}},"gitHead":"bc645ff601fce63c27d4fb374904f958bf95ea7c","scripts":{"build":"tsc","clean":"rimraf dist","typecheck":"tsc --noEmit","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"arkalliance","email":"arkleinberg@gmail.com"},"repository":{"url":"git+https://github.com/ark-alliance/ark-portfolio.git","type":"git","directory":"Ark.Portfolio.Share"},"_npmVersion":"11.6.2","description":"Shared DTOs, Enums, and Type definitions for Ark.Alliance.Portfolio ecosystem","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/portfolio-share_1.0.1_1767566022119_0.3770018729965918","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@arkalliance/portfolio-share","version":"1.0.2","description":"Shared DTOs, Enums, and Type definitions for Ark.Alliance.Portfolio ecosystem","author":{"name":"Armand Richelet-Kleinberg","email":"armand@m2h.io"},"license":"MIT","homepage":"https://github.com/ark-alliance/ark-portfolio#readme","repository":{"type":"git","url":"git+https://github.com/ark-alliance/ark-portfolio.git","directory":"Ark.Portfolio.Share"},"bugs":{"url":"https://github.com/ark-alliance/ark-portfolio/issues"},"keywords":["ark-alliance","portfolio","dto","typescript","shared","types"],"main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./dtos/*":{"types":"./dist/dtos/*.d.ts","import":"./dist/dtos/*.js"},"./enums/*":{"types":"./dist/enums/*.d.ts","import":"./dist/enums/*.js"},"./mocks/*":{"types":"./dist/mocks/*.d.ts","import":"./dist/mocks/*.js"},"./constants/*":{"types":"./dist/constants/*.d.ts","import":"./dist/constants/*.js"}},"scripts":{"build":"tsc","clean":"rimraf dist","prepublishOnly":"npm run clean && npm run build","typecheck":"tsc --noEmit"},"devDependencies":{"rimraf":"^5.0.0","typescript":"^5.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=18.0.0"},"gitHead":"1b69dec4a087fdef6f764c14d62ae7055a162042","_id":"@arkalliance/portfolio-share@1.0.2","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-0Nf4Jxw97o3rwG1efJRWGP5nbE8JAc0F4K8eXpgMdYoa/PrRFmMB2B8lP7Vn6Y2djwsX+NBQ512W2bRoC8JCSw==","shasum":"7377fbc745eab26df36de453b9083a3a2602cb7a","tarball":"https://registry.npmjs.org/@arkalliance/portfolio-share/-/portfolio-share-1.0.2.tgz","fileCount":78,"unpackedSize":175582,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDsc/To9NAsI2+ML7mXvtr/aN+O1k12+4XcyQWO1f22jgIhALE4xBdjkj9sfe2143yIMNBbhd9rfUHpQFyk28jvyNOP"}]},"_npmUser":{"name":"arkalliance","email":"arkleinberg@gmail.com"},"directories":{},"maintainers":[{"name":"arkalliance","email":"arkleinberg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/portfolio-share_1.0.2_1767593734935_0.3759340549222938"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-02T20:24:52.749Z","modified":"2026-01-05T06:15:35.292Z","1.0.0":"2026-01-02T20:24:52.994Z","1.0.1":"2026-01-04T22:33:42.343Z","1.0.2":"2026-01-05T06:15:35.093Z"},"bugs":{"url":"https://github.com/ark-alliance/ark-portfolio/issues"},"author":{"name":"Armand Richelet-Kleinberg","email":"armand@m2h.io"},"license":"MIT","homepage":"https://github.com/ark-alliance/ark-portfolio#readme","keywords":["ark-alliance","portfolio","dto","typescript","shared","types"],"repository":{"type":"git","url":"git+https://github.com/ark-alliance/ark-portfolio.git","directory":"Ark.Portfolio.Share"},"description":"Shared DTOs, Enums, and Type definitions for Ark.Alliance.Portfolio ecosystem","maintainers":[{"name":"arkalliance","email":"arkleinberg@gmail.com"}],"readme":"# Ark.Portfolio.Share\r\n\r\n<div align=\"center\">\r\n\r\n![npm](https://img.shields.io/badge/npm-local%20package-orange?style=for-the-badge&logo=npm)\r\n![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue?style=for-the-badge&logo=typescript)\r\n![DTOs](https://img.shields.io/badge/DTOs-15%2B-green?style=for-the-badge)\r\n![Enums](https://img.shields.io/badge/Enums-60%2B%20values-purple?style=for-the-badge)\r\n\r\n**Shared Contract Layer for Frontend and Backend**\r\n\r\n*Type-Safe DTOs • Enumerations • Constants • Mock Data*\r\n\r\n</div>\r\n\r\n---\r\n\r\nThe **Shared Library** serves as the contract layer between Frontend and Backend, ensuring type safety and consistency across the entire solution. It provides Data Transfer Objects (DTOs), Enumerations, Constants, and Mock data.\r\n\r\n---\r\n\r\n## 📦 Functional Capabilities\r\n\r\n| Domain | Capability | Description | Code Reference |\r\n| :--- | :--- | :--- | :--- |\r\n| **Contracts** | **DTOs** | Centralized interfaces ensuring Frontend/Backend type parity. | `dtos/*.dto.ts` |\r\n| **Type Safety** | **Enums** | Strict enumerations for statuses, technologies (60+ values), and categories. | `enums/*.enum.ts` |\r\n| **Constants** | **Terminology** | Unified UI strings and layout configuration. | `constants/*.ts` |\r\n| **Testing** | **Mock Data** | Static datasets synced with backend seeds for testing without API. | `mocks/*.mock.ts` |\r\n| **Exports** | **Barrel File** | Clean public API via index.ts barrel export. | `index.ts` |\r\n\r\n---\r\n\r\n## 🏗️ Project Structure\r\n\r\n```text\r\nArk.Portfolio.Share/\r\n├── 📁 constants/                 # Global UX strings & Layout config\r\n│   ├── terminology.constants.ts  # UI text strings\r\n│   └── ui-layout.constants.ts    # Layout configuration\r\n│\r\n├── 📁 dtos/                      # Data Transfer Objects (15+ files)\r\n│   ├── auth.dto.ts               # Authentication DTOs\r\n│   ├── project.dto.ts            # Project & Admin DTOs\r\n│   ├── resume.dto.ts             # Resume/CV DTOs\r\n│   ├── ai.dto.ts                 # AI settings DTOs\r\n│   ├── media.dto.ts              # Media/upload DTOs\r\n│   ├── carousel.dto.ts           # Carousel DTOs\r\n│   ├── crud-response.dto.ts      # API response wrappers\r\n│   └── ...                       # Additional DTOs\r\n│\r\n├── 📁 enums/                     # Typed Enumerations (5+ files)\r\n│   ├── project-status.enum.ts    # IN_PROGRESS, COMPLETED, etc.\r\n│   ├── technology.enum.ts        # 60+ technologies\r\n│   ├── skill-level.enum.ts       # Beginner to Expert\r\n│   └── ...                       # Additional enums\r\n│\r\n├── 📁 mocks/                     # Static test data\r\n│   ├── index.ts                  # Mock exports\r\n│   ├── projects.mock.ts          # Project mock data\r\n│   ├── cv.mock.ts                # CV/Resume mock data\r\n│   └── profile.mock.ts           # Profile mock data\r\n│\r\n├── 📄 index.ts                   # Public API barrel\r\n├── 📄 package.json               # Package configuration\r\n└── 📄 tsconfig.json              # TypeScript config\r\n```\r\n\r\n---\r\n\r\n## 📐 Architecture\r\n\r\n### DTO Relationships\r\n\r\n```mermaid\r\nclassDiagram\r\n    class ProjectDto {\r\n        +string id\r\n        +string title\r\n        +string description\r\n        +ProjectStatus status\r\n        +Technology[] technologies\r\n        +string imageUrl\r\n        +ProjectFeatureDto[] features\r\n        +ProjectPageDto[] pages\r\n    }\r\n\r\n    class ProjectFeatureDto {\r\n        +string id\r\n        +string title\r\n        +string description\r\n        +string icon\r\n    }\r\n\r\n    class ProjectPageDto {\r\n        +string id\r\n        +ProjectSection type\r\n        +string title\r\n        +string content\r\n        +number order\r\n    }\r\n\r\n    class Technology {\r\n        <<Enumeration>>\r\n        REACT\r\n        TYPESCRIPT\r\n        NODEJS\r\n        CSHARP\r\n        PYTHON\r\n        ...60+ values\r\n    }\r\n\r\n    ProjectDto *-- ProjectFeatureDto\r\n    ProjectDto *-- ProjectPageDto\r\n    ProjectDto ..> Technology\r\n```\r\n\r\n### Data Flow\r\n\r\n```mermaid\r\nsequenceDiagram\r\n    participant DB as Database\r\n    participant Backend as Backend Service\r\n    participant Share as Shared DTO\r\n    participant UI as Frontend\r\n\r\n    DB->>Backend: Entity (Raw)\r\n    Backend->>Backend: Map to DTO\r\n    Backend->>Share: Validate against Interface\r\n    Backend->>UI: JSON Response\r\n    UI->>UI: TypeScript Autocomplete\r\n```\r\n\r\n---\r\n\r\n## 📋 Technology Enum\r\n\r\nThe `Technology` enum contains **60+ values** organized by category:\r\n\r\n| Category | Examples |\r\n|----------|----------|\r\n| **Frontend** | React, Angular, Vue, Svelte, Next.js, Three.js |\r\n| **Languages** | TypeScript, Python, C#, Go, Rust, COBOL |\r\n| **Runtimes** | Node.js, .NET 5-8, Unity, Unreal |\r\n| **Databases** | PostgreSQL, MongoDB, Redis, SQLite |\r\n| **Cloud** | AWS, Azure, GCP, DigitalOcean |\r\n| **DevOps** | Docker, Kubernetes, Terraform |\r\n| **AI/ML** | PyTorch, TensorFlow, OpenAI, Anthropic |\r\n| **Patterns** | Microservices, CQRS, GraphQL, gRPC |\r\n\r\n---\r\n\r\n## 🚀 Usage\r\n\r\n### Installation\r\n\r\nThis package is referenced locally within the monorepo:\r\n\r\n```json\r\n// package.json in UI or Backend\r\n{\r\n  \"dependencies\": {\r\n    \"@ark/portfolio-share\": \"file:../Ark.Portfolio.Share\"\r\n  }\r\n}\r\n```\r\n\r\n### Import Examples\r\n\r\n```typescript\r\n// Import DTOs\r\nimport { ProjectDto, ResumeDto } from '@ark/portfolio-share';\r\n\r\n// Import Enums\r\nimport { ProjectStatus, Technology } from '@ark/portfolio-share';\r\n\r\n// Import Mock Data\r\nimport { MOCK_PROJECTS } from '@ark/portfolio-share';\r\n\r\n// Create typed object\r\nconst project: ProjectDto = {\r\n    title: \"My Project\",\r\n    status: ProjectStatus.IN_PROGRESS,\r\n    technologies: [Technology.REACT, Technology.TYPESCRIPT],\r\n    description: \"A great project\"\r\n};\r\n```\r\n\r\n### Build\r\n\r\n```bash\r\nnpm install\r\nnpm run build\r\n# Output in /dist\r\n```\r\n\r\n---\r\n\r\n## 📦 Package Exports\r\n\r\nThe `index.ts` barrel file exports:\r\n\r\n```typescript\r\n// Enums\r\nexport * from './enums/project-status.enum';\r\nexport * from './enums/technology.enum';\r\nexport * from './enums/skill-level.enum';\r\n// ... 5 enum files\r\n\r\n// DTOs\r\nexport * from './dtos/project.dto';\r\nexport * from './dtos/resume.dto';\r\nexport * from './dtos/auth.dto';\r\n// ... 15 DTO files\r\n\r\n// Constants\r\nexport * from './constants/terminology.constants';\r\nexport * from './constants/ui-layout.constants';\r\n\r\n// Mocks\r\nexport * from './mocks/projects.mock';\r\nexport * from './mocks/cv.mock';\r\nexport * from './mocks/profile.mock';\r\n```\r\n\r\n---\r\n\r\n## 🧪 Testing\r\n\r\nMock data is used by the test suite:\r\n\r\n```typescript\r\nimport { MOCK_PROJECTS } from '@ark/portfolio-share';\r\n\r\ndescribe('ProjectsPage', () => {\r\n    it('renders projects from mock data', () => {\r\n        // MOCK_PROJECTS contains 4 projects synced with backend seeds\r\n        expect(MOCK_PROJECTS.length).toBe(4);\r\n    });\r\n});\r\n```\r\n\r\n---\r\n\r\n## 📝 Adding New Types\r\n\r\n### Adding a New DTO\r\n\r\n1. Create `dtos/new-feature.dto.ts`:\r\n   ```typescript\r\n   export interface NewFeatureDto {\r\n       id: string;\r\n       name: string;\r\n       // ...\r\n   }\r\n   ```\r\n\r\n2. Export from `index.ts`:\r\n   ```typescript\r\n   export * from './dtos/new-feature.dto';\r\n   ```\r\n\r\n3. Rebuild:\r\n   ```bash\r\n   npm run build\r\n   ```\r\n\r\n### Adding a New Technology\r\n\r\nEdit `enums/technology.enum.ts`:\r\n\r\n```typescript\r\nexport enum Technology {\r\n    // ... existing values\r\n    \r\n    /** New Technology */\r\n    NEW_TECH = 'New Technology'\r\n}\r\n```\r\n\r\n---\r\n\r\n## 📏 Best Practices\r\n\r\n### DTO Naming Conventions\r\n\r\n| Type | Convention | Example |\r\n|------|------------|--------|\r\n| Public DTO | `[Entity]Dto` | `ProjectDto` |\r\n| Admin DTO | `Admin[Entity]Dto` | `AdminProjectDto` |\r\n| Create DTO | `Create[Entity]Dto` | `CreateProjectDto` |\r\n| Response | `CrudResponseDto<T>` | `CrudResponseDto<ProjectDto>` |\r\n\r\n### Enum Guidelines\r\n\r\n- **Always use string values** for JSON serialization\r\n- **Add JSDoc comments** for each value explaining usage\r\n- **Group related values** with comment headers\r\n\r\n```typescript\r\nexport enum ProjectStatus {\r\n    /** Project is actively being developed */\r\n    IN_PROGRESS = 'In Progress',\r\n    /** Project development is finished */\r\n    COMPLETED = 'Completed',\r\n}\r\n```\r\n\r\n### Mock Data Sync\r\n\r\nMock data MUST remain synchronized with backend seed data:\r\n\r\n| Mock File | Backend Seed |\r\n|-----------|-------------|\r\n| `projects.mock.ts` | `projects.json` |\r\n| `profile.mock.ts` | `profile.json` |\r\n| `cv.mock.ts` | `cv.json` |\r\n\r\n> **Important**: When updating backend seeds, update corresponding mocks!\r\n\r\n---\r\n\r\n## 📚 Related Documentation\r\n\r\n| Document | Location | Purpose |\r\n|----------|----------|--------|\r\n| Tests Layer | `../Ark.Portfolio.Tests/README.md` | Test patterns, mocks usage |\r\n| UI Layer | `../Ark.Portfolio.UI/README.md` | Component consumption |\r\n| Backend Layer | `../Ark.Portfolio.Backend/README.md` | DTO mapping, validation |\r\n\r\n---\r\n\r\n<div align=\"center\">\r\n\r\n**Ark.Portfolio.Share** — Part of the Ark Alliance Ecosystem\r\n\r\n<sub>\r\nArmand Richelet-Kleinberg © M2H.IO<br>\r\nAI-assisted development with Anthropic Claude & Google Gemini\r\n</sub>\r\n\r\n</div>\r\n","readmeFilename":"README.md"}