How boltomli/it-tools works
Main Components
• Frontend Application (the browser-based SPA)
– This is centered on the Vue app (src/App.vue) and includes the overall shell, layouts (src/layouts), and the main routing (src/router.ts) that connects different tools and pages.
• Tools Modules
– Directory: src/tools. Each subdirectory represents a distinct tool (e.g., ascii-text-drawer, base64-file-converter, etc.). These are essentially micro–features that are composed into the main application.
• UI Component Library
– Directory: src/ui. Contains reusable components (c-alert, c-button, c-modal, etc.) used throughout the application to maintain a consistent UX.
• Supporting Modules and Plugins
– i18n Module (src/modules/i18n and locales directory): Manages multilingual support.
– Composition Functions & Utilities (src/composable and src/utils): Provide shared logic and services (e.g., debounced refs, fuzzySearch).
– Mixins/Plugins (src/plugins): For integrations such as i18n, themeing (naive plugin), and analytics (plausible plugin).
• Build & Infrastructure / Deployment Layer
– Containerization (Dockerfile, .dockerignore, nginx.conf): The app can be built into a Docker container, served via Nginx, and deployed (with CI/CD workflows under .github/workflows).
– CI/CD and Testing: Configuration files for ESLint, Vitest, Playwright, and GitHub workflows ensure quality and continuous deployment.
Relationships and Interactions
• At runtime, the Browser (Client) loads the SPA (hosted via Docker/Nginx), which starts at App.vue.
• The router (src/router.ts) directs navigation between pages (found under src/pages) and tools.
• The UI components from src/ui are used by both the main pages and tool-specific views.
• Each tool module (in src/tools) encapsulates its own business logic and UI. They import and reuse shared composables and utilities.
• The plugins are registered during application initialization (in src/main.ts) to globally provide features like i18n and tracking.
• The build system (Vite, pnpm scripts) compiles the project into static assets that are then served in production.
Architectural Patterns & Design Principles
• Component-Based Architecture:
– Emphasize that each tool is a self-contained component integrated via the main Vue router.
• Modularization:
– The separation in directories (tools, ui, plugins, modules) shows a clear separation of concerns.
• Plugin & Composable Pattern:
– The use of composables and plugins (custom hooks) helps manage cross-cutting concerns like i18n and analytics.
• Containerized Deployment:
– A Dockerized environment means the production version runs inside a container behind Nginx.
• CI/CD Integration:
– Automated testing and release workflows ensure a robust development pipeline.