How diogomatheus/taco-visualizer works
Project type and purpose
• This is a single-page web application (Angular front-end) called “TACO Visualizer.”
• It provides nutrition professionals an interface to browse, compare and compose meals using data from the Brazilian Food Composition Table (TACO).
File structure
• Top-level build & config files: Dockerfile, compose.yaml, angular.json, tsconfig*, karma.conf.js, protractor.conf.js, GitHub Actions workflows.
• src/app: Angular modules, routing, components (food-list, food-dialog), pages (home, about, builder, comparator), shared services & pipes.
• src/assets/data: static JSON files (foods.json, food-attribute-groups.json) as the data source.
• src/assets/i18n: XLIFF files for translations.
• e2e: Protractor end-to-end tests.
• package.json & lock: dependencies and scripts.
README for additional insights
• Framework: Angular (TypeScript)
• Deployment: Docker Compose sets up a container (likely an Nginx or Node static-server) to serve the built SPA.
• Continuous deployment: GitHub Actions workflows build, test, release artifacts.
a. Main components
• Developer environment (Node + Angular CLI)
• CI/CD pipeline (GitHub Actions)
• Container build & orchestration (Dockerfile + compose.yaml)
• Web server container (e.g., Nginx serving static files)
• Angular Single-Page Application
• Static data store (JSON files under assets/data)
• Client browser
b. Relationships & interactions
• Developer → commits → GitHub Actions (build → unit tests → E2E tests → Docker image build → push)
• Docker Compose → brings up Web server container
• Browser → HTTP(S) requests → Web server container → serves index.html, JS bundles, JSON assets, translation files
• Angular app (in browser) → calls internal Services → loads JSON → populates Components & Pages
c. Architectural patterns & design principles
• Modular Angular architecture:
• App module / App-bootstrap module
• Feature modules mapped to “pages”
• Shared services & pipes for data access & transformations
• Client-side routing (App-routing module)
• Static data as read-only “micro-service” (no dynamic back-end)
• Containerization for environment parity
d. Relevant technologies
• Angular (Components, Modules, Services, Routing, Pipes)
• TypeScript
• Docker & Docker Compose
• GitHub Actions (CI/CD)
• Protractor & Karma (testing)
• XLIFF (i18n)