Skip to content

Folder Structure

GΓΆktΓΌrk edited this page Feb 5, 2025 · 4 revisions

Folder Structure

This section provides a detailed breakdown of the project's folder structure, explaining the purpose of each directory and how different components interact.

Root Directory

πŸ“¦ project-root
 ┣ πŸ“‚ public            # Static assets
 ┣ πŸ“‚ src               # Application source code
 ┃ ┣ πŸ“‚ components      # Reusable Vue components
 ┃ ┣ πŸ“‚ core            # Core utilities and helpers
 ┃ ┣ πŸ“‚ router          # Vue Router configuration
 ┃ ┣ πŸ“‚ store           # Pinia state management
 ┃ ┣ πŸ“‚ views           # Page-level components
 ┃ ┣ πŸ“œ main.ts         # Entry point of the app
 ┣ πŸ“œ package.json      # Project dependencies
 ┣ πŸ“œ tsconfig.json     # TypeScript configuration
 ┣ πŸ“œ vite.config.ts    # Vite configuration

Detailed Breakdown

public/

This folder contains static assets such as icons and images that are directly accessible in the project.

src/

The main source code of the application.

components/

Contains reusable Vue components categorized into logical groups. Example:

πŸ“‚ components
 ┣ πŸ“‚ Base            # Base UI components
 ┣ πŸ“‚ Data            # Geoserver Data listing components
 ┣ πŸ“‚ Geostories      # Geospatial storytelling components
 ┣ πŸ“‚ Map             # Mapping-related components
 ┣ πŸ“‚ Participation   # Citizen participation UI

core/

Contains core utilities and helper functions that support various parts of the application.

πŸ“‚ core
 ┣ πŸ“‚ helpers          # Utility functions for geospatial operations

router/

Contains Vue Router configurations.

πŸ“‚ router
 ┣ πŸ“œ index.ts         # Defines app routes and navigation guards

store/

Manages global state using Pinia.

πŸ“‚ store
 ┣ πŸ“œ buffer.ts        # Buffering-related state management
 ┣ πŸ“œ draw.ts          # Drawing tools state management
 ┣ πŸ“œ filter.ts        # Layer filtering state management
 ┣ πŸ“œ geoserver.ts     # Geoserver interaction state
 ┣ πŸ“œ map.ts           # Map-related state
 ┣ πŸ“œ participation.ts # Citizen Participation-related state

views/

Defines page-level Vue components corresponding to different routes.

πŸ“‚ views
 ┣ πŸ“œ MapView.vue           # Main map page
 ┣ πŸ“œ ParticipationView.vue # Citizen Participation feature

main.ts

The main entry point of the application where the Vue app is initialized.

Other Important Files

  • package.json – Manages dependencies and scripts.
  • tsconfig.json – TypeScript configuration.
  • vite.config.ts – Configuration for Vite, the project's build tool.

For more details on routing, state management, and UI components, explore their respective sections in the documentation.