How scit46-1/taiso-web works
Project Type and Purpose
• This is a full-stack web application called “taiso,” designed as a community platform for cyclists.
• Frontend: React + TypeScript SPA (Vite + TailwindCSS).
• Backend: Spring Boot monolithic REST API (Java, Gradle).
• Database: MySQL.
• External integrations: Kakao Map API, KMA Weather API, Strava API, AWS S3 for image storage.
• Features: GPX route sharing, event (lightning) creation & participation, club management, bookmarking, Strava data, weather info.
File Structure
• Top-level directories:
• bike-api/: Spring Boot project
• frontend/: React SPA
• .github/workflows/: CI/CD pipelines
• bike-api layers:
• config: CORS, security, JWT, AWS S3
• controller → service → repository → domain (JPA entities)
• security: JWT filters, handlers, token provider
• exception: centralized exception handling
• util: helper classes
• frontend folders:
• src/api: HTTP client setup (axios)
• src/services: REST service calls per domain
• src/hooks: custom hooks for requests
• src/components + pages: UI components & page routing
• src/stores: state management (Zustand)
• Infra/config files: application.yml, Vite config, Gradle wrapper, GitHub Actions.
a. Client Layer
• Browser running React SPA (Vite).
• Static assets served via CDN or web server.
b. API Layer
• Spring Boot application exposing REST endpoints.
• JWT-based authentication & authorization.
c. Persistence Layer
• MySQL database storing users, routes, events, bookmarks, clubs, tags, reviews, etc.
d. Storage Layer
• AWS S3 bucket for images (map screenshots, profile pictures).
e. External Service Integrations
• Kakao Map API: map tiles, geocoding.
• KMA Weather API: weather data.
• Strava API: user activity data.
f. CI/CD Pipeline
• GitHub Actions workflows: build, test, deploy frontend & backend.
Interactions and Data Flows
• User → React SPA: page navigation, forms.
• SPA → Spring Boot API: HTTP(S) calls with JWT in Authorization header.
• API → MySQL: CRUD via Spring Data JPA repositories.
• API → S3: upload/download images via S3clientConfig.
• API → External APIs:
• KakaoProperties + RestTemplate for maps/geolocation
• WeatherService for KMA
• StravaService for Strava OAuth & data
• API Security: JwtAuthenticationFilter validates tokens; exceptions handled by GlobalExceptionHandler.
Architectural Patterns & Principles
• Layered (MVC-ish) architecture in backend: Controllers → Services → Repositories → Entities.
• Stateless REST API with JWT auth.
• Separation of concerns: config, security, business logic, persistence.
• Component-based UI in frontend; service layer for API abstraction; hooks for fetch logic; store for auth state.
• CI/CD automation for reproducible builds and zero-downtime deploys.