https://github.com/bocaletto-luca/random-advice-generator
Random Advice Generator is a single‑page web application that fetches random advice using the Advice Slip JSON API. In addition to fetching advice, the app allows users to save their favorite advice messages in a list and export this list in various formats (JSON, CSV, and SQL). Built with HTML5, CSS3, and vanilla JavaScript, this app is ...
https://github.com/bocaletto-luca/random-advice-generator
api-free bocaletto-luca javascript random-advice-generator webapp
Last synced: 12 months ago
JSON representation
Random Advice Generator is a single‑page web application that fetches random advice using the Advice Slip JSON API. In addition to fetching advice, the app allows users to save their favorite advice messages in a list and export this list in various formats (JSON, CSV, and SQL). Built with HTML5, CSS3, and vanilla JavaScript, this app is ...
- Host: GitHub
- URL: https://github.com/bocaletto-luca/random-advice-generator
- Owner: bocaletto-luca
- License: gpl-3.0
- Created: 2025-06-01T11:25:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-09T19:59:03.000Z (about 1 year ago)
- Last Synced: 2025-06-09T20:33:46.577Z (about 1 year ago)
- Topics: api-free, bocaletto-luca, javascript, random-advice-generator, webapp
- Language: JavaScript
- Homepage: https://bocaletto-luca.github.io/
- Size: 27.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Random Advice Generator | WebAPP | API Free
**Author:** Bocaletto Luca
**GitHub:** [bocaletto-luca](https://github.com/bocaletto-luca)
**License:** GNU GPL v3




[](https://bocaletto-luca.github.io/Random-Advice-Generator/)
## Overview
**Random Advice Generator** is a single‑page web application that fetches random advice using the [Advice Slip JSON API](https://api.adviceslip.com/). In addition to fetching advice, the app allows users to save their favorite advice messages in a list and export this list in various formats (JSON, CSV, and SQL). Built with HTML5, CSS3, and vanilla JavaScript, this app is lightweight, responsive, and easy to use.
## Features
- **Random Advice Fetching:** Retrieve a new piece of advice instantly by clicking the "Get Advice" button.
- **Save Advice:** Add the displayed advice to a saved list with the "Add to List" button.
- **Export Options:** Export your saved advice list as:
- **JSON:** For data interchange.
- **CSV:** Compatible with spreadsheets and data analysis tools.
- **SQL:** Generates SQL `INSERT` statements for database integration.
- **Responsive Design:** A modern, responsive UI that works seamlessly across devices.
## How It Works
1. **Fetch Advice:** The app sends a request to the Advice Slip JSON API (`https://api.adviceslip.com/advice`) to retrieve a random piece of advice.
2. **Display and Save:** The advice is displayed on the screen. Users can then click "Add to List" to save a copy to an internal list.
3. **Export Data:** Export buttons allow users to download the saved advice list in JSON, CSV, or SQL format. The exported data is generated dynamically using JavaScript and delivered via a download prompt.
## APIs Used
- **Advice Slip JSON API:** Provides random advice slips in JSON format.
[Visit API Documentation](https://api.adviceslip.com/)
## Tech Stack
- **Frontend:** HTML5, CSS3, JavaScript
- **API:** Advice Slip JSON API
## How To Use
1. **Open the Web App:** Simply open the `index.html` file in your preferred web browser.
2. **Get Advice:** Click the **"Get Advice"** button to fetch a new advice message.
3. **Save Your Favorite Advice:** If you like the advice, press **"Add to List"** to store it.
4. **Export Your Saved Advices:** Use the export buttons to download your saved advice in JSON, CSV, or SQL format.
## Contributing
Contributions are welcome! If you'd like to improve the project, please fork the repository and submit a pull request. For issues or feature requests, please use the [GitHub Issues](https://github.com/bocaletto-luca/your-repo/issues) page.
---
This repository documents the **Random Advice Generator** app, a single‑page solution integrating dynamic advice retrieval and data export features using free APIs. Enjoy and happy coding!