How anime-vsub/app works
Project Type and Purpose
• This project is a hybrid mobile and web application built using web technologies (Vue, Quasar, TypeScript) and integrated with native capabilities via Capacitor. Its purpose is to deliver a fast, intuitive user experience for browsing and watching Anime content from the animevietsub ecosystem.
• The README clearly indicates that the goal is to “speed up the Anime viewer” by replacing the outdated web interface, and the project is distributed as an APK while also supporting a Progressive Web Application (PWA) version.
Analyzing the File Structure
• There are multiple layers:
• Native integration: The presence of several Capacitor directories (e.g., “@capacitor”, “src-capacitor”) for both Android and iOS shows that native code and project configurations are maintained for mobile deployment.
• Web front-end: The “src” directory contains Vue components, pages, layouts, composables, and router configuration, which reflect a modern single-page application built using Quasar/Vue.
• Progressive Web App: The “src-pwa” directory holds PWA-specific files such as service workers, manifest, and custom service-worker logic.
• API Parsing and Logic: The “src/apis” folder (and its submodules for parser, runs, and workers) encapsulates the core business logic dealing with API calls, HTML parsing, and asynchronous data operations.
• Backend/Database: The “supabase” directory includes configuration, SQL migrations, and seed files indicating that this project leverages Supabase (or a similar backend-as-a-service) for persistent storage.
• Testing and Utilities: Directories like “__test__” and various helper scripts show testing infrastructure and workflow automation, which are also reflected in the GitHub workflows.
• Other configuration files (e.g., quasar.config.ts, tsconfig.json, package.json, and GitHub workflows) emphasize the build, linting, and deployment aspects.
Components
a. Presentation/UI Layer:
• Vue-based user interface showing pages (e.g., home, anime details, search, account management) and components (cards, players, dialogs, etc.).
• Mention that the code is organized into pages, components, layouts, and composables.
b. Mobile/Capacitor Layer:
• Native mobile modules for both Android and iOS under Capacitor.
• How the “src-capacitor” source code mirrors the native integration and configuration, highlighting native plugins and the customized Capacitor kernel.
c. API and Data Processing Layer:
• “src/apis” modules which include parsers (for anime data, notification, ranking, etc.), “runs” modules for executing tasks (AJAX calls, data fetching), and “workers” that likely handle background processing.
• Separation between parsing logic, network requests, and worker threads.
d. Backend and Data Storage:
• “supabase” directory representing the database layer (SQL migrations, seed scripts) as well as connections to external services like Firebase for caching or real-time updates.
e. Additional Elements:
• Testing & CI/CD Infrastructure: Although not part of the runtime architecture, highlight that the project includes a robust set of GitHub workflows for building, testing, linting, and code quality analysis.
• Helper Extensions: Include the external dependency on the “AnimeVsub Helper” extension (mentioned in README) which assists in handling PWA or CORS issues for browsers on mobile platforms.
Architectural Relationships and Design Patterns
• The UI layer (Vue/Quasar components) interacts with the API layer via defined interfaces and state management (stores).
• The API layer manages data retrieval, parsing, and any caching using worker threads.
• The native layer (Capacitor) acts as a bridge connecting the web code with platform-specific capabilities such as native UI adjustments, file system access, or push notifications.
• The data storage / backend (Supabase & Firebase) supports persistent user data (e.g., history, favorites) and may also provide APIs for other services.
• Directional data flows: UI sends requests to API services, which in turn may interact with external sources, followed by responses routed back to the UI.