SolSet is an interactive web application that visualizes the sun's position and trajectory on a map for any location and date/time. Similar to tools like SunCalc.org and SunCalc.net, it provides a user-friendly interface to explore sun data including sunrise/sunset times, sun altitude, azimuth, and shadow projections.
- Interactive Map: Displays sun path and position using Leaflet.js with OpenStreetMap tiles
- Location Search: Find any location by address or coordinates
- Geolocation: Use your current location with the "Locate Me" button
- Date Selection: Slider to choose any day of the year
- Time Selection: Slider to choose any time in 15-minute increments
- Sun Data Display: View detailed information about sun position, times, and shadow length
- House Layout Visualization: Visualize optimal house orientation with shadow projections
- Seasonal Sun Paths: Toggle visualization of sun trajectories for solstices and equinoxes
- Responsive Design: Works on desktop and mobile devices
- Real-time Updates: Sun position and data update as you move the map
- Optimal Orientation: Calculate the best orientation for a house based on sun position
- Vue.js 3.5.13 (Composition API)
- Vite 6.3.2 (Build tool)
- Leaflet.js 1.9.4 (Map rendering)
- SunCalc.js 1.9.0 (Sun calculations)
- Bootstrap 5.3.5 (Styling)
- Bootstrap Icons 1.11.3
- D3.js 7.9.0 (SVG manipulation for house layout)
- Axios 1.8.4 (HTTP client)
- Autoprefixer 10.4.21 (CSS processing)
- PostCSS 8.5.3 (CSS processing)
- Node.js (v16 or later)
- npm or yarn
-
Clone the repository:
git clone https://github.com/yourusername/solset.git cd solset
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and visit:
http://localhost:5173
To build the application for production:
npm run build
The built files will be in the dist
directory, ready for deployment.
This application is designed to be deployed as a static site. You can use the included deployment script for easy deployment to either AWS S3 or Alibaba Cloud OSS.
-
Ensure you have the AWS CLI installed and configured with appropriate credentials.
-
Run the deployment script:
./deploy.sh s3 your-bucket-name
-
Configure your S3 bucket for static website hosting:
- Enable "Static website hosting" in bucket properties
- Set "Index document" to
index.html
- Set appropriate CORS configuration if needed
-
Ensure you have the ossutil tool installed and configured.
-
Run the deployment script:
./deploy.sh oss your-bucket-name
-
Configure your OSS bucket for static website hosting:
- Enable "Static Pages" in bucket settings
- Set "Default Homepage" to
index.html
- Configure CORS settings if needed
If you're experiencing issues with geocoding or other API calls, you may need to configure CORS for your hosting environment.
[
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET", "HEAD"],
"AllowedOrigins": ["*"],
"ExposeHeaders": [],
"MaxAgeSeconds": 3000
}
]
- SunCalc for precise sun calculations
- Leaflet for interactive maps
- OpenStreetMap for map data and Nominatim API
This project is licensed under the MIT License - see the LICENSE file for details.