This project showcases a simple one-page React app that allows users to submit their favorite flavor. The flavor data is collected through the React frontend, sent to the FastAPI backend, and stored in a SQLite database using SQLAlchemy. Users can also retrieve all the saved flavors through the API.
I had the following software installed:
- Node.js - JavaScript runtime environment for the frontend.
- Python - Programming language for the backend.
- FastAPI - Modern, fast (high-performance) web framework for building APIs.
- SQLAlchemy - SQL toolkit and Object-Relational Mapping (ORM) library.
- SQLite - Self-contained, serverless, zero-configuration, transactional SQL database.
Access the React frontend at http://localhost:3000.
Submit your favorite flavor through the provided input form on the webpage. The flavor data will be sent to the FastAPI backend and stored in the database.
To retrieve all flavors saved in the database, make a GET request to http://localhost:8000/flavors.