How poleeast/pinpin_frontend works
Project Type and Purpose
• This is a full-stack, multi-tier travel planning platform (“PinPin”) comprising a Vue 3 + TypeScript front-end and a NestJS + TypeORM + MySQL back-end.
• Purpose: Provide group trip creation, real-time chat, personalized wish lists, collaborative itinerary planning, multi-currency expense tracking, and integration with external APIs (Google Maps, OpenWeather, ExChangeRate, Cloudinary).
File Structure Analysis
• Top-level:
• public/, index.html → static assets, entry HTML
• src/ → front-end source
• src/components/, src/views/, src/router/, src/stores/, src/plugins/, src/services/, src/utils/ → Vue feature modules
• package.json, vite.config.ts → build & dev config
• No back-end code here; the back-end lives in a separate pinpin_backend project (per README).
• Key front-end architectural choices: component-based UI (common/layout/settings), Pinia state stores, Vue Router, Axios plugin for HTTP, Vuetify UI library.
README Insights
• Front-end: Vue.js 3.5, TypeScript, Vuetify, Pinia, Vite.
• Back-end: NestJS monolith, TypeORM, MySQL, JWT auth, Swagger docs.
• External APIs: Google Maps (places & routing), OpenWeather, ExChangeRate, Cloudinary (media).
Main Components
a. Front-End Layer
• Browser / User Interface
• Vue Application (App.vue)
• Subcomponents (layout, common, settings, views)
• Plugins & Services (Axios, FontAwesome, Iconify, Vuetify)
• State Management (Pinia stores: auth.store, snackbar.store)
• Router (vue-router)
b. API Gateway / Back-End Layer
• NestJS Application
• Modules: Auth, Users/Profiles, Trips/Groups, Chat (WebSocket gateway), Settings, Expense, Itinerary
• Controllers (REST endpoints), Services (business logic), Guards (JWT auth)
• Swagger Documentation
c. Data Persistence
• MySQL Database (pinpin_db)
• TypeORM Entities & Repositories
d. External Services
• Google Maps API (Places, Directions)
• OpenWeather API
• ExChangeRate API
• Cloudinary (image upload/storage)
Relationships and Interactions
• Browser ↔️ Front-End (Vue + Router + State)
• Front-End → Back-End (REST over HTTPS via Axios plugin; WebSocket for chat)
• Back-End → MySQL (TypeORM queries)
• Back-End → External APIs (HTTP calls to Google Maps, OpenWeather, ExChangeRate, Cloudinary)
• Back-End ↔️ Back-End Modules (service-to-service calls within NestJS DI)
Architectural Patterns & Design Principles
• Front-end: Component-Driven UI, Single-Page Application, Unidirectional Data Flow (Pinia)
• Back-end: Modular Monolith (NestJS modules), Layered Architecture (controllers → services → repositories), JWT-based Authentication, API Documentation (Swagger)
• Separation of Concerns: UI, state management, API calls, business logic, data access
Final Advice
• Essential architectural layers and their interactions.
• Labels are concise and unambiguous, reflecting real folder/module names.