How rei/rei-cedar works
Project type and purpose
• This is a front-end UI component library and style framework (“REI Cedar”) meant to provide reusable Vue components, SCSS variables, mixins, utilities, docs, demos, and a publishing pipeline.
• It is not a full-stack app; it is a client-side component framework with build, test, dev-preview, documentation, and CI/CD.
File structure
• Top-level:
• src/ ← Vue components, styles, utilities, types, mixins, props
• build/ ← custom build scripts (copy-css, transfer variables)
• templates/ ← component scaffolding templates
• public/, index.html ← dev/demo static assets
• vite.config*/ rollupOptions.mjs ← bundler configurations
• test/, playwright.config.ts ← unit and E2E/a11y tests
• .github/workflows ← CI jobs (node.js, deploy, pages, playwright)
• generator.js, docgen*.mjs ← API documentation generators
• package.json ← scripts (dev, unit, test, prerelease, changelog)
• Patterns:
• “src/components” subtree organized by component name, each with .vue + styles + tests + examples
• CSS modules + SCSS variable files under “styles/vars”
• A “dev” sandbox (src/dev) that runs a Vite-powered local preview
• Build outputs under “build/” and “dist/” via Rollup/Vite UMD and ESM configs
README
• Confirms it’s a style framework and component library
• Describes dev server, unit tests, Playwright E2E/a11y tests, publishing via npm with prerelease tags
• Mentions a separate docs site and GitHub Pages demo
Main components
a. Source modules
• Vue component modules (src/components)
• SCSS styles & variables (src/styles, component-level “styles/vars”)
• Utilities, mixins, props, types (src/utils, src/mixins, src/props, src/types)
b. Build & Bundling
• Build scripts (build/*.js, docgen.mjs, generator.js)
• Bundler configs (vite.config.ts, vite.umd.config.ts, rollupOptions.mjs)
• Output: ESM, UMD packages, CSS outputs in build/ or dist/
c. Developer Experience
• Dev sandbox (src/dev + public/index.html) → hot-reload server (npm run dev)
• Component examples in each folder
d. Testing
• Unit tests (jest/vue-jest in src/components/**/__tests__)
• E2E & accessibility tests (Playwright under test/playwright)
e. Documentation & Demos
• Doc generators (docgen-scss.mjs, docgen.mjs, lint-report-generator.mjs)
• GitHub Pages demo (deploy.js.yml, pages.yml)
• Separate Cedar docs site (external)
f. CI/CD & Publishing
• GitHub Actions workflows for build, test, deploy to npm (prerelease), pages, Playwright
• npm scripts (npm run unit, test, prerelease, changelog)
Relationships and interactions
• Flow of raw source → build pipeline → bundled artifacts → npm registry
• Source feeds tests (unit & E2E) and doc generators
• Dev sandbox pulls from source and bundler for live preview
• CI pipelines trigger tests → build → publish/demo site
• External services: GitHub Actions, npm registry, GitHub Pages, external docs site
Architectural patterns & design principles
• Modular component design grouping code, styles, tests, examples
• Separation of concerns: components / styles / utilities / build / tests / docs
• Convention-over-configuration: folder naming for templates and generators
• CI as code: GitHub Actions orchestrating quality, build, and publish
• Theme/variable driven styling via SCSS variable architecture