# rupsa45/plantdiaries-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/rupsa45/plantdiaries-frontend
- Repository: https://github.com/rupsa45/plantdiaries-frontend

## Overview

##### Main Components Identification

a) Client-Side Architecture:
- Frontend Application (React.js)
- UI Components Layer
- API Integration Layer
- Authentication System
- Routing System

**[Client Browser] → [Frontend Application]**
- ↓
**[React Application Layer]**
- ↓
**[Core Layers]**
- Routing Layer (React Router)
- Component Layer
- API Integration Layer
- Authentication Layer

##### Detailed Component Breakdown

A. Page Components (src/pages/):
- Home Page
- Discover Page
- Details Page
- Authentication Pages
- Profile Pages

B. Feature Components (src/Components/):
- Plant Cards
- Diary Forms
- Feature Sections
- Detail Views

C. Layout Components (src/Layout/):
- Navigation
- Footer
- Mobile Navigation

D. API Integration (src/apis/):
- Post API
- Search API
- User API

##### Connection Flows

- User interaction flows
- Data flow between components
- API communication paths
- Authentication flows

##### Specific Implementation Details

Technology badges or labels for:
- React.js
- Tailwind CSS
- Axios
- React Router DOM

**[User Interface Layer]**
- ↓
**[Component Layer]**
- ↓
**[Feature Layer]**
- ↓
**[API Integration Layer]**
- ↓
**[External Services]**

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser[Web Browser]
    end

    subgraph Application["Frontend Application"]
        App["React App"]:::core
        click App "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/App.jsx"
    end

    subgraph Pages["Page Components"]
        Home["Home Page"]:::page
        Discover["Discover Page"]:::page
        Details["Details Page"]:::page
        Profile["Profile Page"]:::page
        click Home "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/pages/HomePage.jsx"
        click Discover "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/pages/DiscoverPage.jsx"
        click Details "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/pages/DetailsPage.jsx"
        click Profile "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/pages/ProfilePage.jsx"
    end

    subgraph Auth["Authentication Layer"]
        Login["Login"]:::auth
        CreateAcc["Create Account"]:::auth
        Verify["Verify Account"]:::auth
        Reset["Reset Password"]:::auth
        ProfileMgmt["Profile Management"]:::auth
        click Login "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/pages/Auth/Login.jsx"
        click CreateAcc "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/pages/Auth/CreateAccount.jsx"
        click Verify "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/pages/Auth/VerifyAccount.jsx"
        click Reset "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/pages/Auth/ResetPassword.jsx"
        click ProfileMgmt "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/pages/Auth/Profile.jsx"
    end

    subgraph Components["Feature Components"]
        PlantCard["Plant Cards"]:::feature
        PlantGrid["Plant Card Grid"]:::feature
        DiaryForm["Diary Form"]:::feature
        Features["Feature Sections"]:::feature
        DetailView["Detail Views"]:::feature
        MobileDetail["Mobile Detail View"]:::feature
        click PlantCard "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/Components/PlantCard.jsx"
        click PlantGrid "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/Components/PlantCardGrid.jsx"
        click DiaryForm "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/Components/PlantDiaryForm.jsx"
        click Features "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/Components/FeatureSections.jsx"
        click DetailView "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/Components/Details.jsx"
        click MobileDetail "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/Components/MobileDetail.jsx"
    end

    subgraph Layout["Layout Components"]
        Nav["Navigation"]:::layout
        Footer["Footer"]:::layout
        MobileNav["Mobile Navigation"]:::layout
        LayoutWrapper["Layout Wrapper"]:::layout
        click Nav "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/Layout/Navbar.jsx"
        click Footer "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/Layout/Footer.jsx"
        click MobileNav "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/Layout/MobileNav.jsx"
        click LayoutWrapper "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/Layout/Layout.jsx"
    end

    subgraph API["API Integration Layer"]
        PostAPI["Post API"]:::api
        SearchAPI["Search API"]:::api
        UserAPI["User API"]:::api
        click PostAPI "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/apis/post.api.js"
        click SearchAPI "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/apis/search.api.js"
        click UserAPI "https://github.com/rupsa45/PlantDiaries-Frontend/blob/main/src/apis/user.api.js"
    end

    Browser --> App
    App --> Pages
    App --> Auth
    App --> Layout
    Pages --> Components
    Components --> API
    Auth --> API

    %% Styling
    classDef core fill:#2563eb,color:white
    classDef page fill:#3b82f6,color:white
    classDef auth fill:#9333ea,color:white
    classDef feature fill:#22c55e,color:white
    classDef layout fill:#6b7280,color:white
    classDef api fill:#f97316,color:white

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["Page Components"]:::page
        L3["Authentication"]:::auth
        L4["Feature Components"]:::feature
        L5["Layout Components"]:::layout
        L6["API Integration"]:::api
    end
```
