# neeexxxx/wanderwise architecture

> Architecture diagram of the GitHub repository neeexxxx/wanderwise, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/neeexxxx/wanderwise
- Repository: https://github.com/neeexxxx/wanderwise

## Overview

##### Project type and purpose
- WanderWise is primarily a single-page, AI-powered travel-planning web application.
- It’s built with React (via Vite), styled with Tailwind CSS, and uses Firestore (Firebase) for backend persistence and authentication. Gemini AI serves as an external AI service to generate itineraries.

##### File structure
- Top-level files:
- index.html and vite.config.js indicate a Vite-based React front-end.
- tailwind.config.js and postcss.config.js configure styling.
- jsconfig.json, eslint.config.js enforce code conventions.
- package.json/package-lock.json show dependencies (React, Firebase SDK, Gemini AI client).
- There is no custom server code here—everything runs client-side and interacts with cloud services.

##### README for additional insights
- Confirms tech stack: React, Tailwind, Firestore (data store + auth), Gemini AI (external ML), hosted on Vercel.
- Describes user flows: sign-in → enter trip parameters → call AI → display/save itinerary → persist in Firestore.

a. Main components:
1. Client (Browser SPA)
2. Firebase Authentication
3. Firestore Database
4. Gemini AI Service
5. Vercel Hosting/CDN
b. Relationships & interactions:
- SPA fetches React bundle & assets from Vercel CDN.
- User signs in via Firebase Auth SDK in the client → Firebase Auth service.
- Authenticated client reads/writes user trip histories to Firestore.
- When generating an itinerary, client sends user preferences to Gemini AI API → receives plan back.
- Client augments the plan (e.g., hotel pricing) and optionally persists final itineraries in Firestore.
c. Architectural patterns & principles:
- Single-page client-driven architecture.
- BaaS (Backend-as-a-Service) using Firebase for auth + data.
- External microservice (Gemini AI) for specialized processing.
- CDN for static asset delivery (Vercel).
d. Key technologies:
- React + Vite – component rendering, routing, dev server.
- Tailwind CSS – utility-first styling.
- Firebase SDK – Authentication and Firestore CRUD.
- Gemini AI client library – plan generation API calls.
- Vercel – build & deploy pipeline for static SPA.

##### Key recommendations
- Be very detailed—capture each distinct service and interaction.
- Differentiate build-time (CI/CD → Vercel → CDN) from run-time (client ↔ services).
- Don’t over-abstract—list all four managed services and the SPA as separate nodes.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build & Deploy Pipeline
    subgraph "Build & Deploy"
        direction TB
        CI["CI/CD Pipeline"]:::deploy
        Vercel["Vercel CDN/Hosting"]:::deploy
        CI -->|"deploy"| Vercel
    end

    %% Client Side
    subgraph "Client (Browser SPA)"
        direction TB
        React["React SPA"]:::frontend
        Tailwind["Tailwind CSS Config"]:::frontend
        Lint["Linting (ESLint)"]:::frontend
    end

    Vercel -->|"serves static assets"| React
    React -->|"uses styling"| Tailwind
    React -->|"code conventions"| Lint

    %% Cloud Services
    subgraph "Cloud Services"
        direction TB
        Auth["Firebase Auth"]:::backend
        DB["Firestore"]:::backend
        AI["Gemini AI Service"]:::ai
    end

    React -->|"login/authenticate"| Auth
    React -->|"read/write tripHistory"| DB
    React -->|"generate itinerary"| AI
    AI -->|"return plan"| React

    %% Documentation & Metadata
    subgraph "Project Docs & Metadata"
        direction TB
        Docs["Project Overview (README)"]:::docs
        Metadata["Project Metadata & Scripts"]:::docs
    end

    %% Click Events
    click React "https://github.com/neeexxxx/wanderwise/blob/main/index.html"
    click React "https://github.com/neeexxxx/wanderwise/blob/main/vite.config.js"
    click React "https://github.com/neeexxxx/wanderwise/blob/main/jsconfig.json"
    click Tailwind "https://github.com/neeexxxx/wanderwise/blob/main/tailwind.config.js"
    click Tailwind "https://github.com/neeexxxx/wanderwise/blob/main/postcss.config.js"
    click Auth "https://github.com/neeexxxx/wanderwise/blob/main/.env.local"
    click Auth "https://github.com/neeexxxx/wanderwise/blob/main/package.json"
    click DB "https://github.com/neeexxxx/wanderwise/blob/main/.env.local"
    click DB "https://github.com/neeexxxx/wanderwise/blob/main/package.json"
    click AI "https://github.com/neeexxxx/wanderwise/blob/main/package.json"
    click Vercel "https://github.com/neeexxxx/wanderwise/blob/main/package.json"
    click Vercel "https://github.com/neeexxxx/wanderwise/blob/main/README.md"
    click Lint "https://github.com/neeexxxx/wanderwise/blob/main/eslint.config.js"
    click Metadata "https://github.com/neeexxxx/wanderwise/blob/main/package.json"
    click Metadata "https://github.com/neeexxxx/wanderwise/blob/main/package-lock.json"
    click Docs "https://github.com/neeexxxx/wanderwise/blob/main/README.md"

    %% Styles
    classDef frontend fill:#e0f8e9,stroke:#2d6a4f,color:#1b4332,stroke-width:2px;
    classDef backend fill:#d0ebff,stroke:#1864ab,color:#1c7ed6,stroke-width:2px;
    classDef ai fill:#f3d9fa,stroke:#9c36b5,color:#6a4c93,stroke-width:2px;
    classDef deploy fill:#f0f0f0,stroke:#495057,color:#343a40,stroke-width:2px;
    classDef docs fill:#fff3bf,stroke:#d9480f,color:#b93a30,stroke-width:2px;
```
