How hayrapetyanlusine/color-dropper works
Project type and purpose
• This is a single-page, component-based front-end application built with Angular (v17.1.1).
File structure
• Top level:
• angular.json, tsconfig*.json, package.json → Angular CLI configuration, build and type settings
• src/ → application source
• cypress/ → end-to-end testing
• src/app/
• app.component.* → root component (AppComponent)
• app.routes.ts → routing definitions
• app.config.ts → application-wide configuration constants
• interface/ → TypeScript interfaces (ColorData, File)
• services/data.service.ts → central data-management service
• shared/
– components/
· canvas/CanvasComponent → image renderer + click handler
· upload-file/UploadFileComponent → file-picker UI element
– directives/
· FileInputDirective → custom file-input binding
· TooltipDirective → hover tooltip behavior
– functions/
– constants.ts → shared constant values
• cypress/
• e2e tests (spec.cy.ts), support commands, fixtures
README
• Standard Angular CLI project
• No back-end or API integrations described → this is purely client-side
Elements
• External tools (Cypress/Karma)
• User → Components (input flows)
• Components → Services (injections/calls)
• Components → Utilities (drawImage, getColorAtPoint)
• Service → Components (observables or callbacks)
• UI layer (blue)
• Business/data layer (green)
• Utility layer (orange)
• Testing (gray)
Detailed capture of architecture
• Utility functions near the components that invoke them.
• HTML index.html and Angular bootstrap (main.ts → AppModule) as the entry point.