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.
- 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
- 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
- Node.js 22.x or higher
- pnpm (or npm/yarn)
- Clone the repository:
git clone https://github.com/yourusername/brewtuner.git
cd brewtuner- Install dependencies:
pnpm install- 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- Start the development server:
pnpm devThe app will be available at http://localhost:5173
pnpm dev- Start development serverpnpm build- Build for productionpnpm preview- Preview production buildpnpm check- Run Svelte type checkingpnpm check:watch- Run type checking in watch modepnpm format- Format code with Prettierpnpm lint- Lint code with ESLint
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
The application is configured for deployment on Vercel with the @sveltejs/adapter-vercel adapter.
To deploy:
pnpm buildThen deploy the .vercel/output directory or connect your repository to Vercel for automatic deployments.
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
Contributions are welcome! Please feel free to submit a Pull Request.
[Add your license here]