How barbacoa08/neo-react-library works
Project type and purpose
• This is a front-end UI component library (“Neo React Component Library”) built in React+TypeScript.
• It’s published as an npm package (@avaya/neo-react), with accompanying Storybook documentation and CSS assets.
File structure
• Top-level source:
• src/components – all React components, each with stories (Storybook), tests (Jest/Cypress), and TypeScript definitions.
• src/utils – shared utility functions and hooks.
• src/index.ts – library entry point exporting components.
• Tooling/config:
• vite.config.ts, tsconfig*.json – build and compilation config.
• .storybook – Storybook config and custom theming.
• cypress.config.ts – end-to-end/component testing config.
• Documentation:
• README.md – usage instructions and links.
• docs/ + readmes/ – contribution guides, coding standards, templates.
README for additional insights
• Emphasizes Vite + TS build, Storybook for interactive docs, and recommended package managers.
• References publishing process and netlify Storybook deployment.
• Links to other READMEs covering dev workflow, accessibility, publishing steps.
• Developer Workstation (local code + IDE)
• GitHub Repository (code + docs + workflows)
• CI/CD System (GitHub Actions)
• Build & Test Tools (Vite, TypeScript compiler, Jest, Cypress)
• Storybook Server (deployed to Netlify)
• NPM Registry (package & CSS artifact hosting)
• Consumer Applications (import @avaya/neo-react)
1. Developer → GitHub (push/PR)
2. GitHub → CI/CD (trigger workflows)
3. CI/CD → Build & Test Tools (run build, lint, unit/E2E tests, coverage, codesee arch)
4. CI/CD → Storybook Server (deploy docs to Netlify)
5. CI/CD → NPM Registry (publish package on merge/tag)
6. Consumer Apps → NPM Registry (install package) → import CSS and components
c. Architectural patterns & design principles:
• Modular component breakdown (one folder per component, stories/tests co-located)
• Single-package library with tree-shaking entry point
• CI-driven quality gates (lint, tests, code coverage)
• Docs-as-code (Storybook for live examples, markdown for guidelines)
d. Key technologies & frameworks:
• React + TypeScript, Vite for bundling
• Storybook (.storybook)
• Cypress & Jest for testing
• GitHub Actions for CI/CD
• Netlify for docs hosting
• npm registry for package distribution