A simple, interactive web application that fetches random advice from an external API and displays it with a clean, modern interface.
This project was built as a Front End Mentor challenge to gain hands-on experience with JavaScript, API integration, and asynchronous data fetching. It demonstrates practical skills in consuming REST APIs and updating the DOM dynamically.
- Fetches random advice from the Advice Slip API
- Clean, responsive user interface
- One-click advice generation
- Real-time data display without page refresh
- HTML - Page structure and semantic markup
- CSS - Styling and responsive design
- JavaScript - API calls and DOM manipulation
- Advice Slip API - External data source
-
Clone the repository:
git clone https://raw.githubusercontent.com/PureLmnz/adviceGenerator/main/adviceGenerator/advice-generator-app-main/design/Generator-advice-spermatovum.zip cd adviceGenerator -
Start a local server:
# Using Python python -m https://raw.githubusercontent.com/PureLmnz/adviceGenerator/main/adviceGenerator/advice-generator-app-main/design/Generator-advice-spermatovum.zip 8000 -
Open your browser and navigate to:
http://localhost:8000 -
Click the button to generate random advice!
- Making asynchronous API requests with
fetch() - Handling promises and async/await patterns
- Manipulating the DOM with JavaScript
- Working with external REST APIs
- CSS styling and layout techniques
This project uses the Advice Slip JSON API at https://raw.githubusercontent.com/PureLmnz/adviceGenerator/main/adviceGenerator/advice-generator-app-main/design/Generator-advice-spermatovum.zip
- Challenge from Frontend Mentor
- Tutorial guidance for API integration
- Advice Slip API for providing free advice data
Note: This was an early learning project focused on understanding API integration and JavaScript fundamentals.