A wee web application that generates random coordinates within a specified radius from a starting point. Perfect for discovering new places to explore!
If you live near the coast please bear in mind that some of the random places might be underwater: so get your diving gear ready 🤿 😉
- Generate random coordinates within a customizable radius
- Display coordinates in both decimal and DMS (Degrees, Minutes, Seconds) format
- Calculate exact distance from starting point
- Direct link to Google Maps for easy navigation
- Modern, responsive design with Tailwind CSS
- Fast and lightweight React/Next.js application
- Place search with automatic coordinate filling
- Manual coordinate editing capabilities
- Unit toggle between miles and kilometers
Visit the live application at: [https://radius-roulette.vercel.app/]
- Node.js 18+
- npm or yarn
- Clone the repository:
git clone <your-repo-url>
cd radius-roulette- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
This application is optimized for deployment on Vercel:
- Push your code to GitHub
- Connect your repository to Vercel
- Deploy automatically on every push
The app includes a vercel.json configuration file for optimal deployment settings.
The application uses mathematical formulas to generate truly random coordinates within a specified radius:
- Haversine Formula: Calculates distances between coordinates on Earth's surface
- Spherical Trigonometry: Generates random points within a circular radius
- Coordinate Conversion: Converts between decimal degrees and DMS format
- Geocoding: Uses OpenStreetMap's Nominatim service for place search
The app uses Edinburgh, Scotland as the default starting point:
- Latitude: 55°46'27"N
- Longitude: 3°55'6"W
You can easily modify this in the code to use any location as your starting point.
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Vercel - Deployment platform
- OpenStreetMap Nominatim - Geocoding service
- Include automatic geolocation option
This project was developed with the assistance of Claude Sonnet 4, an AI coding assistant, through the Cursor IDE. The AI helped transform a simple Python script into a full-featured web application, implementing:
- Modern React/Next.js architecture
- Responsive UI design with Tailwind CSS
- Place search functionality with geocoding
- Unit conversion features
- Deployment optimization for Vercel
Special thanks to the Cursor team for providing an excellent development environment that makes AI-assisted coding a seamless experience.
This project is licensed under the MIT License - see the LICENSE file for details.