Skip to content

A simple web app so I can track my grind profiles for various beans in an effort to save coffee when dialing in beans I've had before.

Notifications You must be signed in to change notification settings

antschmidt/brewtuner

Repository files navigation

BrewTuner

BrewTuner is a web application designed to help coffee enthusiasts dial in the perfect grind settings for their coffee brewing. Track your grind profiles, log your results, and achieve consistent, delicious coffee every time.

Features

  • Personalized Grind Profiles: Create and save settings for each combination of coffee bean, grinder, and brewing method
  • Grind Logging System: Track each grind attempt with detailed parameters:
    • Grinder setting (via interactive dial or numeric input)
    • Coffee weight in grams
    • Tamping status
    • Adjustment rating (coarser/good/finer)
    • Outcome notes and observations
    • Automatic timestamps
  • Profile Management: Easily select from existing roasters, beans, grinders, and brewing methods, or create new ones on-the-fly
  • Log History: View, edit, and delete historical grind logs to compare and optimize your results
  • Secure Authentication: Multiple sign-in options including:
    • Email/password
    • Magic link (passwordless)
    • OAuth 2.0 (Google, GitHub)
    • WebAuthn/Security Keys
  • Dark Mode: Automatic theme switching with system preference detection
  • Progressive Web App (PWA): Install as a standalone app with offline support

Tech Stack

  • Frontend: SvelteKit 2 with Svelte 5 (Rune-based reactivity)
  • Backend: Nhost (Backend-as-a-Service with Hasura GraphQL)
  • Styling: CSS Custom Properties with responsive design
  • Build Tool: Vite 6
  • Deployment: Vercel (with serverless adapter)
  • Package Manager: pnpm

Getting Started

Prerequisites

  • Node.js 22.x or higher
  • pnpm (or npm/yarn)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/brewtuner.git
cd brewtuner
  1. Install dependencies:
pnpm install
  1. Set up environment variables:

Create a .env file in the root directory with your Nhost credentials:

PUBLIC_NHOST_SUBDOMAIN=your-subdomain
PUBLIC_NHOST_REGION=your-region
  1. Start the development server:
pnpm dev

The app will be available at http://localhost:5173

Development

Available Scripts

  • pnpm dev - Start development server
  • pnpm build - Build for production
  • pnpm preview - Preview production build
  • pnpm check - Run Svelte type checking
  • pnpm check:watch - Run type checking in watch mode
  • pnpm format - Format code with Prettier
  • pnpm lint - Lint code with ESLint

Project Structure

src/
├── routes/
│   ├── +page.svelte          # Main application interface
│   ├── +layout.svelte        # Authentication wrapper and layout
│   ├── privacy/              # Privacy policy page
│   └── terms/                # Terms of service page
├── lib/
│   ├── graphQLClient.ts      # GraphQL queries, mutations, and types
│   ├── nhostClient.ts        # Nhost configuration
│   ├── themeStore.ts         # Theme management store
│   ├── Dial.svelte           # Interactive grinder setting dial
│   ├── LogDisplay.svelte     # Grind log viewer and editor
│   ├── Selector.svelte       # Reusable collapsible selector component
│   └── [Bean|Grinder|BrewMethod]Selector.svelte
└── app.css                   # Global styles and CSS variables

Deployment

The application is configured for deployment on Vercel with the @sveltejs/adapter-vercel adapter.

To deploy:

pnpm build

Then deploy the .vercel/output directory or connect your repository to Vercel for automatic deployments.

Database Schema

The application uses the following main entities:

  • Roasters: Coffee roasting companies
  • Beans: Specific coffee beans from roasters
  • Grinders: Coffee grinding equipment
  • Brew Methods: Brewing techniques (espresso, pour over, etc.)
  • Profiles: Saved settings for bean + grinder + brew method combinations
  • Grind Logs: Individual grind attempt records with all parameters

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

[Add your license here]

Acknowledgments

Built with SvelteKit and powered by Nhost

About

A simple web app so I can track my grind profiles for various beans in an effort to save coffee when dialing in beans I've had before.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •