This document serves as a comprehensive guide for the Space Route Planning System developed to assist astronauts in planning trips throughout the solar system. The system is designed to be intuitive and functional, incorporating a realistic simulation of fuel consumption and identifying optimal refueling points. To know more, here's the .pdf of the challenge.
The system was developed with the following functional requirements in mind:
- Determine and display the user's current location in the solar system.
- Display the user's current planet on the system interface.
- Simulate the trip when a destination is selected.
- Calculate the required fuel based on the distance to the destination and the spacecraft's fuel consumption ratio.
- Allow the trip if there is sufficient fuel.
- Update the user's position to the selected destination.
- Update the remaining fuel amount.
- Recommend the nearest planet with a refueling station if the fuel is insufficient.
- Refueling stations are located on Mercury, Earth, Saturn, and Uranus.
- Precise distances between planets have been defined and are used to calculate the necessary fuel.
- The spacecraft's fuel tank capacity is 90,000 liters.
- The spacecraft's fuel consumption ratio is 0.0001 liters per kilometer.
- Display all planets with icons indicating refueling stations.
- Dynamically position a spacecraft icon on the map as the user travels.
- Store all trips during the browser session.
- Detailed information about each trip, including date, time, origin, destination, fuel before and after the trip.
- Toasts for successful or failed travel feedback.
- Interactive alerts for refueling when you are on a planet with a station or when you are isolated.
- Support for English and Portuguese, making it easy for a global audience to use.
- Next.js (App Router)
- TypeScript
- TailwindCSS
- Shadcn
- Next intl
- react-share
- jotai
- lucide-react
- framer-motion
- dayjs
- Vercel
- Cypress
- Clone this repository:
git clone https://github.com/mateussp97/space-route-planning.git- Navigate to the project directory:
cd space-route-planning- Navigate to the project directory:
pnpm install- Start the development:
pnpm run dev-
Open http://localhost:3000 in your browser to view the application.
-
(Optional) Running Cypress Tests:
npx cypress runThis system represents an effort to combine technical accuracy with usability, ensuring that astronauts and space enthusiasts can efficiently and informatively plan their trips through the solar system. The integration of various modern technologies and design practices provides an exceptional user experience that is accessible globally.
