A route optimization web application that lets users create, save, and visualize routes using the Google Maps API. Users can also generate a PDF version of each route, including a screenshot of the map, number of stops, addresses, and step-by-step directions.
optimizeWaypoints: true
for efficient ordering of stops.Clone the repository:
git clone https://github.com/your-username/routopia.git
cd routopia
Install dependencies:
npm install
or
yarn install
Create a .env
or .env.local
file in the project root, specifying keys such as:
VITE_GOOGLE_MAPS_API_KEY=your_google_maps_api_key
VITE_AUTH0_DOMAIN=your_auth0_domain
VITE_AUTH0_CLIENT_ID=your_auth0_client_id
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
Development
npm run dev
Launches the dev server at http://localhost:5173 by default.
Production Build
npm run build
Compiles and optimizes files into the dist/
folder.
Preview
npm run preview
Serves the compiled production build locally for testing.
A simplified example of how you might organize things:
src/
├─ features/
│ ├─ auth/
│ │ └─ ...
│ ├─ routes/
│ │ ├─ hooks/
│ │ │ └─ useRouteManager.js
│ │ ├─ RouteManager.jsx
│ │ ├─ MapSection.jsx
│ │ ├─ Sidebar.jsx
│ │ ├─ RouteForm.jsx
│ │ ├─ RouteList.jsx
│ │ └─ ...
├─ components/
│ ├─ Header.jsx
│ └─ AuthButtons.jsx
├─ providers/
│ └─ GoogleMapsProvider.jsx
├─ services/
│ ├─ routeServices.js
│ └─ ...
├─ App.jsx
├─ main.jsx
├─ index.css
└─ ...
public/
├─ favicon.ico
└─ ...
features/routes
: Components, hooks, and services related to route functionality. components
: Shared or global UI components (e.g., Header
, AuthButtons
). providers
: React Context or API providers (e.g., GoogleMapsProvider
). services
: API calls or data-fetching logic (e.g., fetchRoutes
, saveRoute
).Start the Dev Server
npm run dev
Then open http://localhost:5173.
Log In
Add a Route
View a Route
MapSection
) shows the addresses.Generate a PDF
Delete a Route
MIT License
Copyright (c) 2023 ...
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
[ License text continues... ]
Enjoy using Routopia! Feel free to submit issues or pull requests for new features and improvements.