Skip to content

LubaKaper/BarBreakdownColculator

Repository files navigation

Bar Break-Even Calculator

A simple, mobile-friendly web application that helps bar owners calculate how many drinks they need to sell daily to cover their fixed costs.

Features

  • Calculate daily drink sales needed to break even
  • Mobile-responsive design
  • Real-time calculations
  • Form validation
  • Clear error messaging
  • Detailed results including:
    • Profit per drink
    • Total monthly drinks needed
    • Daily drinks target
    • Monthly costs breakdown

Usage

  1. Open index.html in any modern web browser
  2. Enter your costs:
    • Monthly Rent ($)
    • Monthly Labor Costs ($)
    • Cost to Make One Drink ($)
    • Selling Price Per Drink ($)
    • Days Open Per Month (default: 30)
  3. Click "Calculate" to see your break-even analysis

Formulas Used

  • Profit per drink = Selling price - Cost to make
  • Total monthly costs = Monthly rent + Monthly labor
  • Required drinks per day = (Total monthly costs ÷ Profit per drink) ÷ Days open

Technical Details

  • Single HTML file with embedded CSS and JavaScript
  • No external dependencies
  • Mobile-optimized inputs
  • Responsive layout
  • Accessible form controls with ARIA attributes
  • Client-side validation
  • Formatted currency output

Browser Support

Works in all modern browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge

Deployment

Live Demo

The calculator is available online at: https://lubakaper.github.io/BarBreakdownColculator/

GitHub Pages Setup

This project is hosted using GitHub Pages. To set it up:

  1. Go to your repository on GitHub
  2. Click "Settings"
  3. Navigate to "Pages" in the left sidebar
  4. Under "Source", select "Deploy from a branch"
  5. Under "Branch", select "main" and "/ (root)" folder
  6. Click "Save"

Your site will be published at https://[username].github.io/BarBreakdownColculator/

Local Development

For local development, you'll need to use a development server due to browser security restrictions when loading JSON files.

Option 1: Using VS Code (Recommended)

  1. Install the "Live Server" extension in VS Code
  2. Right-click on index.html and select "Open with Live Server"

Option 2: Using Python

python -m http.server 8000

Then visit: http://localhost:8000

Option 3: Using Node.js

Install and run http-server:

npm install -g http-server
http-server

Project Structure

BarBreakdownColculator/
├── css/
│   └── styles.css
├── js/
│   ├── calculator.js
│   ├── neighborhoods.js
│   └── brooklyn-bar-data.json
└── index.html

Data Updates

Neighborhood comparison data is stored in js/brooklyn-bar-data.json. To update:

  1. Edit the JSON file directly
  2. Maintain the existing data structure
  3. Ensure all required fields are present for each neighborhood:
    • avgCommercialRent
    • avgDrinkPrice
    • avgLaborCost
    • displayName

License

MIT License - Feel free to use and modify for your needs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors