Explore your favorite Star Wars characters with this interactive application! ✨ This project uses the Star Wars API (SWAPI) to fetch data about characters, including their homeworld, species, starships, vehicles, and appearances in films. 🌟
- 🧑🚀 Interactive Dropdown: Select your favorite Star Wars character.
- 🌐 API Integration: Fetch real-time data from the SWAPI.
- 🎥 Film Appearances: View all the films a character appeared in.
- 🚀 Starry Background Animation: Enjoy a dynamic starry sky in the background.
- 🔄 Caching: Optimized for performance with caching and parallel data fetching.
📦 Project Root
├── 📁 scripts
│ ├── apiCalls.js # API interaction logic
│ ├── domElements.js # DOM element references and UI updates
│ ├── eventHandlers.js # Event listeners and app interactions
│ ├── starwars.js # Main entry point
│ ├── starCanvas.js # Starry background animation
├── 📁 styles
│ └── style.css # Main styles
├── index.html # Main HTML file
└── README.md # Project documentation
- Starry Background: The dynamic starry background gives an immersive space theme.
- Character Selection: Choose a character from the dropdown menu.
- Character Details: Click "Get Character" to view detailed information.
- Data Sources: Real-time data fetched from the Star Wars API:
- 🌍 Homeworld
- 🧬 Species
- 🎥 Films
- 🚀 Starships
- 🚗 Vehicles
- Clone the repository:
git clone https://github.com/analyticadam/star-wars-character-viewer.git
- Navigate to the project directory:
cd star-wars-character-viewer
- Open
index.html
in your browser using a local server like Live Server.
- Caching: Reduces API calls for previously fetched data.
- Parallel Fetching: Enhances performance by fetching multiple resources simultaneously.
Enjoy a dynamic starry canvas animation implemented using the <canvas>
element and JavaScript. ✨
Before Optimization:
- 🌐 Multiple redundant API calls.
- 🕒 Slower data fetching due to sequential requests.
After Optimization:
- ✅ Caching for repeated requests.
- ✅ Parallel Fetching for faster data loading.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature name"
- Push to your fork:
git push origin feature-name
- Open a Pull Request.
This project is licensed under the MIT License.
- SWAPI: The Star Wars API for providing data.
- Font Awesome: For the icons used in the project.