https://github.com/codelur/golang_gps
This project is a responsive Go-based web application that integrates with Google Maps and One Step GPS APIs to display real-time GPS device data, allowing users to configure and view specific information fields through a Vue.js front-end and a containerized backend.
https://github.com/codelur/golang_gps
Last synced: 8 days ago
JSON representation
This project is a responsive Go-based web application that integrates with Google Maps and One Step GPS APIs to display real-time GPS device data, allowing users to configure and view specific information fields through a Vue.js front-end and a containerized backend.
- Host: GitHub
- URL: https://github.com/codelur/golang_gps
- Owner: codelur
- Created: 2025-01-06T01:40:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-08T00:22:34.000Z (over 1 year ago)
- Last Synced: 2025-11-23T20:02:46.894Z (7 months ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Golang Server for Vue App and Google Maps Integration
This is a Golang server that provides backend support for a Vue application. The server includes functionality for managing display settings, retrieving GPS information, and integrating with the Google Maps API.
## Features
### 1. Save Settings to Display Fields in the Vue App
The server allows saving customizable settings to control the visibility of fields in the Vue application. These settings determine which data fields are displayed on the frontend.
### 2. Get Settings to Display Fields in the Vue App
Retrieve previously saved settings to dynamically render fields in the Vue application. This ensures a consistent and user-configurable display experience.
### 3. Get Google Maps API URL for Map Rendering
The server provides a secure endpoint to fetch the Google Maps API URL with the API key. This approach helps prevent exposing sensitive credentials directly in the frontend code.
### 4. Get GPS Info of Devices from an External Website
Fetch GPS information of devices associated with a user's account from an external API. This data is utilized for map rendering and device tracking in the Vue app.
## Installation
1. **Clone the Repository**
```bash
git clone https://github.com/codelur/golang_gps.git
Install Dependencies Ensure you have Go installed.
```
Set Environment Variables Create a .env file in the project root and configure the following variables:
API_KEY=your-google-maps-api-key
EXTERNAL_API_URL=your-external-website-url
Run the Server Start the Golang server:
go run main.go
API Endpoints
1. Save Settings
Endpoint: POST /api/savesettings
Description: Save field visibility settings for the Vue app.
2. Get Settings
Endpoint: GET /api/getsettings
Description: Retrieve field visibility settings.
3. Get Google Maps API URL
Endpoint: GET /api/map
Description: Fetch the Google Maps API URL with the API key.
4. Get GPS Info
Endpoint: GET /api/getDevicesInfo
Description: Retrieve GPS data of devices from an external API.
Usage
Integrate this server with a Vue frontend to manage dynamic field rendering and Google Maps integration.
Use the endpoints to store settings, retrieve settings, and fetch GPS data securely.
License
This project is licensed under the MIT License.
Contributions
Contributions are welcome! Feel free to fork this repository, make changes, and submit a pull request.
Contact
For inquiries or support, please contact codelur@gmail.com.