SoilSight is an interactive web dashboard for visualizing and analyzing microplastic contamination in soil samples. The app focuses on exploring sample sites, microplastic counts and types, and temporal trends with map-based and chart visualizations.
- Interactive Mapping: Explore sampling locations with contamination levels visualized on a Leaflet map.
- Smart Filtering: Filter by microplastic type, counts, and site metadata.
- Dynamic Charts: Interactive charts (ApexCharts) for trends and distributions.
- Responsive UI: Built with Vuetify for desktop and mobile support.
- Demo Data Included: Comes with sample data so you can run the app without a backend.
- Frontend: Vue 3, Vite, Vuetify, Pinia, Vue Router
- Visualization: Leaflet, ApexCharts
- Backend (optional): Directus headless CMS / API
Prerequisites: Node.js (16+ recommended) and pnpm (preferred). You can use npm or yarn, but pnpm is recommended because the repository contains a pnpm-lock.yaml file.
- Install dependencies
pnpm install- Add environment variables (optional)
Create a .env file in the project root to point the app to a Directus instance (if you have one):
VITE_DIRECTUS_API_URL=https://your-directus.example.com
VITE_DIRECTUS_BEARER_TOKEN=your_static_token_or_blank
- If these variables are not provided the app ships with demo data in
src/assets/dummyData.jsonand will run locally without a Directus backend.
- Run the dev server
pnpm dev- Build / Preview
pnpm build
pnpm preview- Lint (optional)
pnpm run lint- Demo/sample data:
src/assets/dummyData.json(used by the app when Directus is not configured). - GeoJSON boundary example:
src/assets/geojson/Tayabas.geojson. - Backend (optional): The project uses
@directus/sdkinsrc/composables/useDirectus.js. ProvideVITE_DIRECTUS_API_URLandVITE_DIRECTUS_BEARER_TOKENto connect to a Directus API.
src/— application source codecomponents/— Vue components (map, charts, cards)pages/— page views (index, insight/farm pages)composables/— composable utilities (useDirectus, chart helpers)assets/— demo data and geojson
server/— simple server assets anduploads/(if required)vite.config.mjs,package.json— build and dev scripts
- The app will attempt to load
src/assets/dummyData.jsonfor markers and demo content. When a Directus API is configured via environment variables, some pages/components will fetch data from Directus instead. - Environment variables are read using
import.meta.env.VITE_*(seesrc/composables/useDirectus.js).
- Fork the repo, create a topic branch, and open a PR describing your changes. Keep changes focused and include screenshots for UI work.
No license is specified in this repository. If you want to make this project open source, add a LICENSE file (for example, an MIT license).