A full-stack application that provides sunrise and sunset times for cities worldwide. Built with Java Spring Boot backend and React frontend, SolarWatch helps you plan your day around natural light conditions in any location.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
SolarWatch is a comprehensive application that provides accurate sunrise and sunset times for any location worldwide. Whether you're a photographer planning the perfect golden hour shot, a traveler organizing your day, or simply someone who wants to make the most of natural daylight, SolarWatch offers precise solar event information at your fingertips.
This project was an excellent opportunity to work with geolocation services, integrate with external APIs for astronomical data, and implement robust error handling for various edge cases. The application features a secure user authentication system, efficient data caching, and a responsive user interface built with modern web technologies.
To get a local copy of SolarWatch up and running, follow these simple steps.
Before you begin, ensure you have the following installed on your system:
- Docker (v20.10.0 or higher)
- Docker Compose (v2.0.0 or higher)
- Node.js (v18.0.0 or higher)
- Git
-
Clone the repository
git clone https://github.com/CodecoolGlobal/solar-watch-async-java-polobence.git cd solar-watch-async-java-polobence -
Set up environment variables
- Navigate to the backend directory:
cd backend/src/main/resources - Create a new file called
application-secret.propertiesand add your API keys:api.openweathermap.key=your_openweathermap_api_key api.timeapi.key=your_timeapi_key
- For production, set up these environment variables in your deployment environment
- Navigate to the backend directory:
-
Start the application
- From the project root, run:
docker-compose up --build
- The application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8080
- PostgreSQL: localhost:5432
- PGAdmin: http://localhost:5050 (if enabled in docker-compose)
- From the project root, run:
-
Development Mode
- For frontend development:
cd frontend npm install npm run dev - For backend development, import the project into your favorite IDE and run the
SolarWatchApplicationclass
- For frontend development:
