Skip to content

derrickscottux-collab/openbrewerydb-sveltekit

Β 
Β 

Repository files navigation

Open Brewery DB

A free, open-source dataset and API for brewery, cidery, brewpub, and bottleshop information worldwide. Built with Svelte 5, SvelteKit 2, TypeScript, and TailwindCSS 4.

🍺 What is Open Brewery DB?

Open Brewery DB is a community-driven project that maintains a comprehensive dataset of breweries and related establishments. Our mission is to provide free, public access to brewery information for developers, data analysts, and beer enthusiasts worldwide.

Features

  • Free API: Access brewery data through our RESTful API
  • Search & Filter: Find breweries by location, type, and various criteria
  • Interactive Maps: Visualize brewery locations with geographic data
  • Community Driven: Contribute and help maintain accurate brewery information
  • Open Source: All data and code is freely available

πŸš€ Tech Stack

  • Framework: Svelte 5
  • Backend: SvelteKit 2
  • Language: TypeScript
  • Styling: TailwindCSS 4
  • Deployment: Cloudflare Pages/Workers
  • Testing: Playwright for E2E testing
  • Monitoring: Sentry for error tracking
  • Data Visualization: D3.js and Layerchart for maps

πŸ› οΈ Development

Prerequisites

  • Node.js (LTS version)
  • npm or pnpm package manager

Getting Started

  1. Clone the repository

    git clone https://github.com/openbrewery/openbrewerydb-sveltekit.git
    cd openbrewerydb-sveltekit
  2. Install dependencies

    npm install
  3. Start development server

    npm run dev

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

  4. Optional: Open in browser

    npm run dev -- --open

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run check - Run TypeScript checks
  • npm run lint - Run linting and formatting checks
  • npm run format - Format code with Prettier
  • npm run test:e2e - Run Playwright E2E tests
  • npm run authors:build - Build GitHub authors data
  • npm run changelogs:build - Build changelog data

πŸ“ Project Structure

src/
β”œβ”€β”€ lib/                 # Shared utilities and components
β”‚   β”œβ”€β”€ components/      # Reusable Svelte components
β”‚   β”œβ”€β”€ data/           # Static data and generated content
β”‚   └── types.ts        # TypeScript type definitions
β”œβ”€β”€ routes/             # SvelteKit pages and API routes
β”œβ”€β”€ layouts/            # Page layouts
└── styles/             # Global styles and TailwindCSS

🌐 Deployment

This project is configured to deploy on Cloudflare using the @sveltejs/adapter-cloudflare. The build process automatically optimizes for Cloudflare's edge network.

Environment Variables

Create a .env file for local development:

# Sentry (optional)
SENTRY_AUTH_TOKEN=your_sentry_token

# GitHub (for build scripts)
GITHUB_TOKEN=your_github_token

πŸ“Š API Documentation

Complete API documentation is available at /documentation in the application or online at openbrewerydb.org/documentation.

API Endpoints

  • GET /breweries - List all breweries with pagination
  • GET /breweries/{id} - Get specific brewery details
  • GET /breweries/search - Search breweries by query

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • How to contribute data
  • Code contributions
  • Bug reports and feature requests
  • Development setup

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Sponsors

Open Brewery DB is grateful for the support of our sponsors, particularly Sentry for providing application monitoring services.

πŸ”— Links

About

Official Open Brewery DB website built with SvelteKit

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Svelte 50.2%
  • TypeScript 29.6%
  • JavaScript 10.1%
  • mdsvex 5.2%
  • CSS 4.4%
  • HTML 0.5%