A Vue.js application with a Django backend that connects to the Open Brewery API, retrieves brewery data, and displays it in a table view. The frontend is built with Vue 3 and Vite, while the backend is built with Django and Django REST Framework.
- Connects to the Open Brewery DB API
- Fetches a list of breweries from across the United States
- Display the fetched data in a table or list view.
- Filtering: Provide at least one filter input or dropdown (e.g., search by name, type, or category).
- Grouping: Group items by a relevant attribute (e.g., brewery type, etc.) and display grouped totals or subtotals.
- Include a simple chart to visualize the grouped data (pie chart, bar chart, etc.).
- Django backend for data persistence and API endpoints
The site is available at: https://lukatavcer.github.io/open_brewery/
cd frontend
npm install- Create a virtual environment (recommended):
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit the .env file to configure your environment variables
# Make sure to change the SECRET_KEY for production- Run migrations:
python manage.py migrate- Create a superuser (optional, for admin access):
python manage.py createsuperusercd frontend
npm run devcd backend
python manage.py runserverThe Django admin interface will be available at http://localhost:8000/admin/
To fetch brewery data from the Open Brewery DB API and save it to the Django database, visit: http://localhost:8000/api/breweries/fetch_from_api/
cd frontend
npm run buildThis project uses ESLint for code linting and Prettier for code formatting.
cd frontend
npm run lintcd frontend
npm run format