How gingene/concert-now works
This project is a full-stack-style front-end application built with Vue.js – it’s an SPA (Single Page Application) for searching and managing concert information (“Concert now”). Although it does not include a separate backend service in its file structure, it clearly interacts with external APIs (using Axios) and uses Pinia for state management. It also supports two themes (front and admin) with a mixture of Options API and Composition API (setup syntax), along with a comprehensive UI toolkit (shadcn-vue) and many custom UI components.
Main Components
• Frontend UI:
• Views (under src/views): This includes front pages such as HomeView, ConcertsView, ArtistsView, Single Concert/Artist/Venue Pages, and the admin views.
• Layout & Navigation (under src/components/layout and src/components/custom): Components for headers, footers, navigation bars, and modal dialogs.
• UI Library Components (under src/components/ui): A vast collection of reusable components (accordion, alert, carousel, dialog, form, etc.) that form the building blocks of the UI.
• Routing & Navigation:
• Vue Router is located in src/router (index.js). This layer manages navigation between the various views and conditionally applies different themes (admin vs. front).
• State Management:
• Pinia stores in src/stores manage the application state for users, concerts, artists, venues, comments, etc.
• API Interaction:
• API calls are structured in src/api and are used for both admin (src/api/admin) and general data fetching. They serve as the connection between the frontend and external data sources.
• Assets & Styling:
• Styling is applied via Tailwind CSS (configuration in tailwind.config.js and assets in src/assets/tailwind) as well as SCSS files.
• Utility & Helper Modules:
• Helper functions in src/helpers and the custom hooks (src/hooks) contribute supporting functionality (e.g., themes, time filtering, etc.).
Break Down Architectural Relationships
• The UI layer is composed of many granular components (under src/components) that aggregate to form full-page views (under src/views).
• Routing (Vue Router) connects URL paths to specific views, and these views then leverage both custom and shadcn-vue UI components.
• Commands and data flow between user interactions (UI events) to API calls (handled in src/api) and then update state via Pinia.
• The state (in the stores) is central – with components subscribing to it for reactive data display, and actions that modify state are triggered from both front-facing and admin panels.
• External third-party libraries (e.g., Moment.js, Swiper, C3.js, SweetAlert2) are integrated into specific components (such as countdown timers, carousels, charts, and modals) to enhance functionality.
Architectural Patterns and Design Principles
• Component-Based Architecture: Every UI element is modular (organized in src/components/ui, src/components/layout, etc.) to promote reusability and maintainability.
• Separation of Concerns: The project divides responsibilities among views (presentation), stores (state management), API modules (data services), and utility/helper functions.
• MVC-Like Structure: While not strictly MVC, the separation between views (in src/views), business logic (in stores and hooks), and external service interaction (in src/api) resembles an MVC pattern.
• Responsive and Themed Design: The design caters to different user roles (front user vs. admin) and devices (using Tailwind’s responsive features and RWD techniques).
Elements
• Presentation Layer: Views, Layouts, Reusable UI Components.
• Application Logic: Vue Router, Pinia Stores, API Service modules.
• Asset & Styling Layer: Tailwind CSS, SCSS assets, and static resources (public folder).
• Auxiliary Modules: Custom hooks (src/hooks), helper functions (src/helpers), and backup/test components (src/backup).
• From user interactions → Vue views → API services → State updates (Pinia) → UI re-render.
• UI components, routing/control, state management, API interactions, and third-party service integrations.