Welcome to the Trips Sandbox repository! This project is a React + TypeScript + Vite application designed to interface with the DIMO Network's Trips API and Telemetry API. The application pulls trip data and displays the trips using Mapbox for each specific vehicle ID.
The Trips Sandbox allows users to view and analyze trip data for specific vehicles. It uses Mapbox for visualizing the trips on a map. This README provides instructions on how to set up the project locally, details on deployment, and guidelines for contributing.
Before you begin, ensure you have the following installed on your system:
-
Clone the repository:
git clone https://github.com/DIMO-Network/trips-web-app.git cd trips-web-app
-
Install the dependencies for the frontend:
cd app-login npm install # or yarn install
-
Create a
.env
file in theapp-login
directory -
Start the frontend development server:
npm run dev # or yarn dev
-
Navigate to the directory where
main.go
is located and run the backend server:go run ./cmd/trips-web-app
The backend Go server will be hosted on http://localhost:3003.
Deploying the Trips Sandbox involves a few steps:
-
Build the frontend:
cd app-login npm run build # or yarn build
This will create a
dist
directory with the production build of your app. -
Copy the build output:
cp -r dist ../api
-
Run the backend server:
cd ../api go run ./cmd/trips-web-app
- Environment Variables: Ensure all necessary environment variables are correctly set up in your hosting environment.
- API Access: Make sure the hosting service can access the DIMO Network's Trips API and Telemetry API.
- SSL/TLS: Secure your application using SSL/TLS if it's accessible over the internet.
We welcome contributions to the Trips Sandbox! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Create a new Pull Request.