A modern web application for viewing and filtering coffee brewing profiles optimized for the Aiden brewer. Browse coffee profiles by origin/source, view detailed brewing parameters, and enjoy a responsive design with light/dark theme support.
- Display coffee profiles with detailed brewing parameters
- Filter profiles by origin/source
- Light/dark theme toggle with persistent user preference
- Responsive design for desktop, tablet, and mobile
- Download data for offline use with visual progress indicator
- Toggle between online and offline data sources
- Automatic fallback from online β local β sample data
- Comprehensive error handling with retry options
- Last updated timestamp display
- Installation
- Development
- Building for Production
- Testing
- Linting
- Configuration
- Data Source
- Project Structure
- License
- Credits
- Node.js (v16 or higher)
- npm or Yarn (v1.22 or higher)
- Git
-
Open Terminal
-
Clone the repository:
git clone https://github.com/yourusername/aiden-profiles.git cd aiden-profiles -
Install dependencies:
# Using npm npm install # OR using Yarn yarn install
-
Start the development server:
# Using npm npm run dev # OR using Yarn yarn dev
-
Open your browser and navigate to http://localhost:5173
-
Open Command Prompt or PowerShell
-
Clone the repository:
git clone https://github.com/yourusername/aiden-profiles.git cd aiden-profiles
-
Install dependencies:
# Using npm npm install # OR using Yarn yarn install
-
Start the development server:
# Using npm npm run dev # OR using Yarn yarn dev
-
Open your browser and navigate to http://localhost:5173
-
Install WSL2 by opening PowerShell as Administrator and running:
wsl --install -
Restart your computer and follow the Ubuntu setup process
-
Open Ubuntu terminal
-
Install Node.js and npm:
sudo apt update sudo apt install nodejs npm # Upgrade to latest Node.js using nvm (recommended) curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash source ~/.bashrc nvm install --lts
-
Install Yarn (optional):
npm install --global yarn
-
Clone the repository:
git clone https://github.com/yourusername/aiden-profiles.git cd aiden-profiles -
Install dependencies:
# Using npm npm install # OR using Yarn yarn install
-
Start the development server:
# Using npm npm run dev # OR using Yarn yarn dev
-
Open your browser in Windows and navigate to http://localhost:5173
During development, you can use the following commands:
# Start development server with hot-reload
npm run dev
# OR
yarn dev
# Run tests
npm test
# OR
yarn test
# Run tests in watch mode
npm run test:watch
# OR
yarn test:watch
# Lint code
npm run lint
# OR
yarn lint
# Automatically fix lint issues
npm run lint:fix
# OR
yarn lint:fix- For Ubuntu/Debian: Install build essentials if you encounter compilation issues:
sudo apt install build-essential
- Install Xcode Command Line Tools if you encounter compilation issues:
xcode-select --install
- Use Homebrew to install Node.js and Yarn:
brew install node yarn
- Make sure you have the Windows Build Tools installed for npm:
npm install --global --production windows-build-tools
- Consider using WSL2 for a more Linux-like development experience
- For GUI apps like browsers, use Windows browsers
- Enable the Windows Firewall to allow connections from WSL2
- Use VS Code's Remote WSL extension for a seamless experience
To build the application for production:
# Build the app
npm run build
# OR
yarn build
# Preview the production build locally with Vite
npm run preview
# OR
yarn preview
# Serve the production build with 'serve' package
npm run serve
# OR
yarn serve
# Build and immediately serve (all-in-one command)
npm run build:serve
# OR
yarn build:serveThe production build will be created in the dist directory.
The project includes comprehensive unit tests for components and stores with a visual dashboard for monitoring progress and results:
# Run tests once
npm test
# OR
yarn test
# Run tests with visual dashboard
npm run test:dash
# OR
yarn test:dash
# Run tests with detailed summary report
npm run test:full
# OR
yarn test:full
# Run tests in watch mode
npm run test:watch
# OR
yarn test:watch
# Run tests with coverage report
npm run test:coverage
# OR
yarn test:coverageThe test dashboard provides:
- Visual progress spinner while tests are running π
- Detailed statistics about test runs π
- Pass/fail status with a visual progress bar π
- Coffee-themed ASCII art that changes color based on results β
- Clear pass/fail summary π―
We use ESLint for code quality and consistency:
# Run linter
npm run lint
# OR
yarn lint
# Automatically fix lint issues
npm run lint:fix
# OR
yarn lint:fixCreate a .env file in the root directory for custom environment variables:
VITE_API_URL=https://your-api-url.com
The application uses Vite for fast development and optimized builds. Configuration options can be found in vite.config.js.
The application is designed to fetch coffee profiles from a Google Spreadsheet with offline capabilities:
- Online Data: Fetches coffee profiles directly from a Google Spreadsheet published as CSV
- Offline Data: Uses locally stored data (downloaded from the spreadsheet)
- Sample Data: Falls back to built-in sample data if network or storage is unavailable
The application includes a local CSV file for data and supports two data modes: direct CSV access and browser-stored data.
When developing web applications, direct requests to external services like Google Sheets are typically blocked by browsers due to Cross-Origin Resource Sharing (CORS) policies. For this reason:
- The app uses a local CSV file located at
/public/data/coffee-profiles.csv - The data source toggle demonstrates the concept of switching between different data sources
- In a production environment, you would use a backend proxy or serverless function to access Google Sheets
For local development, the app includes:
- CSV File Data Mode: Reads directly from the included CSV file
- Stored Data Mode: Uses data that has been stored in the browser's localStorage
To use Google Sheets in a production environment:
- Create a backend proxy (using Node.js, serverless functions, etc.)
- Configure the proxy to fetch data from Google Sheets
- Have your application fetch from your proxy instead of directly from Google Sheets
- Update the constants file:
// In src/config/constants.js const API_ENDPOINT = "https://your-backend-api.com/coffee-profiles"; export const COFFEE_PROFILES_SPREADSHEET_URL = API_ENDPOINT;
Why This Approach Is Necessary:
- Browser security prevents direct CORS requests to Google Sheets
- A backend proxy can add the proper headers and handle authentication
- This pattern is standard for web applications that need to access third-party APIs
Make sure your CSV follows the expected data structure as outlined below.
The app includes a built-in download feature that:
- Downloads and stores the spreadsheet data locally
- Shows download progress in real-time
- Allows switching between online and offline data sources
- Automatically falls back to offline data if online fetch fails
Your spreadsheet should have these columns:
name: Coffee name (e.g., "Ethiopia Yirgacheffe")source: Coffee origin/country (e.g., "Ethiopia")roast: Roast level (e.g., "Light", "Medium", "Dark")process: Processing method (e.g., "Washed", "Natural", "Honey")variety: Coffee variety (e.g., "Heirloom", "Bourbon")altitude: Growing altitude (e.g., "1800-2200m")notes: Flavor notes, comma-separated (e.g., "Floral, Citrus, Bergamot")description: Text description of the coffeetemperature: Brewing temperature (e.g., "92Β°C")grind_size: Recommended grind size (e.g., "Medium-Fine")brew_ratio: Coffee-to-water ratio (e.g., "1:16")brew_time: Recommended brewing time (e.g., "3:30")
Your local CSV file is located at public/data/coffee-profiles.csv. You can edit this file directly to add or modify coffee profiles.
aiden-profiles/
βββ public/ # Static assets
βββ src/ # Source code
β βββ assets/ # CSS, SCSS, and other assets
β βββ components/ # Vue components
β βββ router/ # Vue Router configuration
β βββ store/ # Pinia stores
β βββ utils/ # Utility functions
β βββ views/ # Page components
β βββ App.vue # Root component
β βββ main.js # Application entry point
βββ tests/ # Test files
β βββ unit/ # Unit tests
βββ .eslintrc.js # ESLint configuration
βββ index.html # HTML template
βββ LICENSE # MIT License
βββ package.json # Project dependencies and scripts
βββ README.md # Project documentation
βββ vite.config.js # Vite configuration
βββ vitest.config.js # Vitest configuration
- Implemented a robust data handling system with multiple modes
- Added CSV data parsing capabilities for structured coffee profile data
- Created data download and storage functionality for offline use
- Added visual progress indicators for data operations
- Implemented data source toggle for switching between data modes
- Added visual indicators for current data source with profile counts
- Enhanced error handling with multiple fallback methods
- Improved code organization with utility files and constants
- Implemented comprehensive unit tests with CSV data validation
- Added persistent theme and data preferences with localStorage
- Improved mobile responsiveness
- Enhanced documentation with detailed technical explanations
This project is licensed under the MIT License - see the LICENSE file for details.
- Coffee icons: Coffee Icons
- Design inspiration: Coffee Brewing Guides
- Built with Vue 3 and Pinia
- Testing with Vitest and Vue Test Utils
