{"id":28248092,"url":"https://github.com/mvt-proj/mvt-rs","last_synced_at":"2026-04-13T04:27:06.311Z","repository":{"id":280536989,"uuid":"690617644","full_name":"mvt-proj/mvt-rs","owner":"mvt-proj","description":"Simple and high-speed vector tile server developed in Rust","archived":false,"fork":false,"pushed_at":"2026-04-13T02:35:35.000Z","size":12354,"stargazers_count":30,"open_issues_count":0,"forks_count":6,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-13T04:22:25.961Z","etag":null,"topics":["gis","maplibre-gl-js","maps","postgis","postgresql","rust","salvo","vector-tiles"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mvt-proj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-12T14:35:31.000Z","updated_at":"2026-04-13T02:34:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"e71e6821-c723-4a8c-b367-c4c75ce1ed9d","html_url":"https://github.com/mvt-proj/mvt-rs","commit_stats":null,"previous_names":["mvt-proj/mvt-rs"],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/mvt-proj/mvt-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvt-proj%2Fmvt-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvt-proj%2Fmvt-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvt-proj%2Fmvt-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvt-proj%2Fmvt-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvt-proj","download_url":"https://codeload.github.com/mvt-proj/mvt-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvt-proj%2Fmvt-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31740260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T03:27:07.512Z","status":"ssl_error","status_checked_at":"2026-04-13T03:26:53.610Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gis","maplibre-gl-js","maps","postgis","postgresql","rust","salvo","vector-tiles"],"created_at":"2025-05-19T11:12:21.196Z","updated_at":"2026-04-13T04:27:06.301Z","avatar_url":"https://github.com/mvt-proj.png","language":"Rust","funding_links":["https://paypal.me/josejachuf"],"categories":["Rust","Servers"],"sub_categories":[],"readme":"# MVT Server: A Simple Vector Tile Server\n\nThis is a simple and high-speed vector tile server developed in Rust, using the Salvo web framework. It provides an efficient way to serve vector geospatial data over the web.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/f7726fd2-bd84-463b-8389-44d6a43fcef5\" width=\"40%\" /\u003e\n\u003c/div\u003e\n\n**MVT Server** will allow you to publish any table or view with a geometry field as vector tiles through the definition in the layers' configuration. It will also enable the publication of styles to be used in tools like QGIS. These styles define how layers are displayed, including visualization scales, colors, labels, and other visual elements. This functionality ensures seamless integration with GIS tools, guaranteeing that vector tiles are rendered consistently and as intended across different platforms.\n\nRequires a PostgreSQL server with PostGIS version 3.0.0 or higher, either local or remote. It relies on the use of the PostGIS function ST_AsMVT. More information can be found at https://postgis.net/docs/en/ST_AsMVT.html.\n\n## Key Features\n\n- Layer server, maps server (through Maplibre Style) and legends server.\n- On-the-fly vector tile generation using PostgreSQL/PostGIS.\n- Web-based administration for managing users, groups, layers, styles, categories, and more.\n- Integrated caching with support for disk or Redis storage.\n- Granular cache control at the layer level.\n- Multiple source variants:\n  - **Single layer**: one layer per source.\n  - **Multi-layer by composition**: combining multiple layers into a single source.\n  - **Multi-layer by category**: grouping layers by thematic categories.\n- Built-in glyph and sprite server for custom styles.\n- Layer access control via Basic Authentication or JWT.\n- Initial i18n support.\n- Max records control at the layer level.\n- Alpha-stage API for querying and managing the layer catalog.\n- Monitoring and Metrics\n\n\n## Tutorial\n\n[Show tutorial](TUTORIAL.md)\n\n## Environment Variables (.env)\n\n\n### Starting from version `0.13.2`, a CLI assistant is available to help you create your `.env` file.\nTo launch it, simply run:\n\n```sh\n./mvt-server -C\n```\n### The server uses environment variables for its configuration.\n### Make sure to create a `.env` file at the root of your project with the following variables:\n\n\n```sh\n# Database connection URL (PostgreSQL)\nDBCONN=postgres://user:pass@host:port/db\n\n# Connection pool size\nPOOLSIZEMIN=3   # Minimum size of the connection pool\nPOOLSIZEMAX=5   # Maximum size of the connection pool\n\n# Server settings\nIPHOST=0.0.0.0  # The IP address where the server will listen\nPORT=5880       # The port on which the server will run\n\n# Redis connection (optional, overrides disk cache if provided)\nREDISCONN=redis://127.0.0.1:6379\n\n# Security settings\nJWTSECRET=supersecretjwt # Used to create and validate JWT tokens\nSESSIONSECRET=supersecretsession # Secret key for session management\n\n# Directories\nCONFIG=/path_to/config_dir             # Directory path for configuration files\nCACHE=/path_to/cache_dir               # Directory path for cache storage\nMAPASSETS=/path_to/map_assets_dir      # Directory path for map_assets storage\n```\n\nRemember the `.env` file has to kept secure and not shared in public repositories.\n\n## About the Cache\n\nThere are two ways to perform caching:\n\n- In-memory using MokaStore through the framework itself with a duration of 30 seconds.\n- On disk or on Redis server following the layer's configuration. The disk cache is asynchronous, using **tokio::fs**\n\nIf a Redis connection is provided, either through the environment variable REDISCONN or the --redisconn argument, it will serve as the default cache. Otherwise, disk storage will be employed.\n\nRegarding caching and filter application, it will only be saved when the filter is provided in the layer's configuration and will not be applied when it comes from a request to the server.\n\nBy default, the cache files are stored in the \"cache\" directory located at the root of your project. However, you can also specify a different location for the cache directory as an argument when starting the server. Example:\n\n`./mvt-rs --cache /tmp/cache`\n\n\n## Installation\n\nTo run the server, ensure you have Rust installed on your system.\n\nhttps://www.rust-lang.org/tools/install\n\n\nThen, you can compile and run the project as follows:\n\n```sh\n# Clone the repository\ngit clone https://github.com/mvt-proj/mvt-rs.git\n# Navigate to the project directory\ncd mvt-rs\n\n# Create the .env file with the required environment variables\n\n# Compile and run the server\ncargo run\n\n# Compile for production\ncargo build --release\n```\n\n\n## Arguments\n\n```\nUsage: mvt-server [OPTIONS]\n\nOptions:\n  -c, --config \u003cCONFIGDIR\u003e             Directory where config file is placed [default: config]\n  -b, --cache \u003cCACHEDIR\u003e               Directory where cache files are placed [default: cache]\n  -m, --mapassets \u003cMAPASSETS\u003e          Directory where map_assets files are placed [default: map_assets]\n  -i, --host \u003cHOST\u003e                    Bind address [default: 0.0.0.0]\n  -p, --port \u003cPORT\u003e                    Bind port [default: 5800]\n  -d, --dbconn \u003cDBCONN\u003e                Database connection\n  -n, --dbpoolmin \u003cDBPOOLMIN\u003e          Minimum database pool size [default: 2]\n  -x, --dbpoolmax \u003cDBPOOLMAX\u003e          Maximum database pool size [default: 5]\n  -r, --redisconn \u003cREDISCONN\u003e          Redis connection\n  -j, --jwtsecret \u003cJWTSECRET\u003e          JWT secret key\n  -s, --sessionsecret \u003cSESSIONSECRET\u003e  Session secret key\n  -h, --help                           Print help\n```\n\n## Example\n\n```\n./mvt-server \\\n  --config config_folder \\\n  --cache cache_folder \\\n  --mapassets mapassets_folder \\\n  --host 127.0.0.1 \\\n  --port 8000 \\\n  --dbconn \"postgres://user:password@localhost:5432/mydb\" \\\n  --dbpoolmin 5 \\\n  --dbpoolmax 20 \\\n  --redisconn \"redis://127.0.0.1:6379\" \\\n  --jwtsecret \"supersecretjwt\" \\\n  --sessionsecret \"supersecretsession\"\n```\n\n## Logging\n\nYou can control the logging verbosity using the `RUST_LOG` environment variable. This allows you to filter logs dynamically without recompiling the project.\n\n**Common Examples:**\n\nRun with full debug information (Global):\n```sh\nRUST_LOG=debug cargo run\n```\n\nShow debug logs for the server application only, but keep dependencies on error level:\n```sh\nRUST_LOG=error,mvt_server=debug cargo run\n```\n\n**Advanced Filtering:**\n\nUseful for development to see route details but reduce database (SQLx) noise:\n```sh\nRUST_LOG=info,sqlx=warn,mvt_server::routes=debug cargo run\n```\n\nProduction recommendation (Info and Warnings only):\nShow debug logs for the server application only, but keep dependencies on error level:\n```sh\nRUST_LOG=info ./mvt-server\n```\n\n## 🙌 Support This Project\n\nIf you find **MVT Server** useful, please consider supporting its development.\nYour contribution helps improve the project and keep it actively maintained.\n\n[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/josejachuf)\n\nThank you for your support! 💖\n\n## To-Do\n\n- [ ] Metadata management\n- [ ] Improve the API\n- [ ] Create tutorial\n- [x] Filter module (Initial version implemented)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvt-proj%2Fmvt-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvt-proj%2Fmvt-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvt-proj%2Fmvt-rs/lists"}