Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A modern starter template for web projects with geospatial features, built with Laravel, Vue.js, InertiaJS, Vuetify, PostgreSQL/PostGIS, and Docker. Easy to adapt for any web application.

Notifications You must be signed in to change notification settings

leoneljdias/geoglify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

170 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geoglify

Geospatial web application built with Laravel 12, Vue 3, Vuetify, and MapLibre GL.

Tech Stack

Category Technology Version
Backend Laravel (PHP) ^12.0
Language PHP ^8.4
Frontend Vue.js ^3.5
Build Tool Vite ^7.0
UI Framework Vuetify ^3.7
CSS Tailwind CSS ^4.0
SPA Glue Inertia.js ^1.0
Mapping MapLibre GL ^4.0
Map Server Martin Latest
Database PostgreSQL 16
Spatial DB PostGIS 3.4
Infra Docker -

Architecture

  • Geospatial Ready: Built-in support for vector tiles (PMTiles), spatial database functions, and interactive maps.
  • Modern & Fast: Uses Vite, HTTP/3 ready stack, and efficient vector tiles.
  • Fully Containerized: Docker for easy setup and consistency.
  • Scalable: Separation of concerns with dedicated map tile server (Martin) and Laravel backend.

Project Structure

geoglify/
├── database/           # Database Docker configuration & init scripts
├── martin/            # Martin Tile Server configuration
├── pmtiles/           # Data directory for hosted .pmtiles (Ignored by Git)
├── webapp/            # Main Laravel + Vue.js Application
│   ├── app/
│   │   ├── Http/     # Controllers, middleware, requests
│   │   └── Models/   # Eloquent models (Feature, Layer, Attribute, etc.)
│   ├── resources/
│   │   ├── js/       # Vue components, pages, services
│   │   │   ├── Components/  # Reusable Vue components
│   │   │   ├── Pages/       # Inertia pages
│   │   │   └── translations/ # JSON translations (generated)
│   │   └── lang/     # PHP translation files (source for i18n)
│   ├── database/
│   │   ├── factories/  # Model factories
│   │   ├── migrations/ # Database migrations
│   │   └── seeders/    # Database seeders
│   └── routes/       # API and web routes
└── docker-compose.yml  # Container orchestration

Getting Started

Prerequisites

  • Docker
  • Docker Compose

Installation

Clone the repository:

git clone <repository-url>
cd geoglify

Running the Services

Start the application stack:

docker compose up -d

Services:

Service Ports Description
geoglify-app 8080 (HTTP), 5173 (Vite) Main Laravel + Vue application
geoglify-db 5432 PostgreSQL with PostGIS
geoglify-tiles-server 8081 Martin vector tile server
geoglify-tiles-downloader - Downloads and converts OSM data to PMTiles
geoglify-maputnik 8888 Map style editor
geoglify-mail 8025 Mailhog email testing tool
geoglify-redis 6379 Redis cache and queue

Useful URLs:

Setup Map Data (PMTiles)

The project includes a geoglify-tiles-downloader service to automatically fetch OSM data and convert it to PMTiles format.

docker compose restart geoglify-tiles-downloader

The resulting .pmtiles files are stored in the ./pmtiles directory and served by Martin.

Configuration

Webapp

Configuration is handled via standard Laravel .env files.

Map Server (Martin)

Configured in martin/config.yaml.

  • By default, it looks for .pmtiles in /pmtiles directory.
  • CORS is enabled for all origins (*).

Common Commands

Docker Compose

# Start all services
docker compose up -d

# View logs
docker compose logs -f webapp

# Stop all services
docker compose down

Laravel

# Run artisan commands
docker compose exec webapp php artisan <command>

# Install dependencies
docker compose exec webapp composer install

# Generate translations
docker compose exec webapp php lang/generate-translations.php

# Format code
docker compose exec webapp vendor/bin/pint --dirty

Vue.js

# Install dependencies
docker compose exec webapp npm install

# Development server
docker compose exec webapp npm run dev

# Build for production
docker compose exec webapp npm run build

Translation System

Geoglify uses a PHP-to-JSON translation system:

  1. Source: PHP files in webapp/resources/lang/{locale}/
  2. Generator: webapp/lang/generate-translations.php
  3. Output: JSON files in webapp/resources/js/translations/

Adding new translations:

# 1. Add to PHP files (e.g., resources/lang/en/global.php)
# 2. Add to Portuguese version (resources/lang/pt/global.php)
# 3. Regenerate JSON files
docker compose exec webapp php lang/generate-translations.php

Always edit PHP files, not JSON files directly.

Contributing

  1. Fork repository.
  2. Create your feature branch (git checkout -b feature/amazing-feature).
  3. Commit your changes.
  4. Push to the branch.
  5. Open a Pull Request.

Made with love for technology and open source.

About

A modern starter template for web projects with geospatial features, built with Laravel, Vue.js, InertiaJS, Vuetify, PostgreSQL/PostGIS, and Docker. Easy to adapt for any web application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published