Bar tally webapp

A full-stack web application for managing bar tabs. This system handles user ordering, financial tracking, gifting, and leaderboards with a modern, mobile-first interface.

HTML CSS PHP MySQL JS SMTP
← Back to Projects

Project Overview

This application modernizes traditional bar tab management by providing a mobile-first web platform where users can browse items, place orders, manage their balance, send gifts to friends, and compete on leaderboards. The system includes comprehensive admin tools for managing users, menu items, and finances.


Key Features

User Experience

Account Management - Secure registration and login system with email verification - Profile customization with avatar uploads - Password reset functionality via email - User preferences including theme selection and sound settings - Account privacy controls and data management



Ordering System - Visual grid-based menu interface with item images and pricing - Real-time cart management with quantity controls - Smart payment system that automatically applies available gifts - Order confirmation with detailed payment breakdown - Success animations and audio feedback - Responsive design optimized for mobile devices



Financial Management - Real-time balance tracking with visual indicators - Bank transfer integration with unique user references - Detailed transaction history with filtering options - Spending analytics (monthly, yearly, all-time) - One-click copy functionality for payment details - Per-item spending breakdowns



Social Features - Gift system supporting both monetary and item-based gifts - User directory for selecting gift recipients - Optional personalized messages with gifts - Notification system for received gifts - Automatic gift application during checkout



Leaderboards - Competitive rankings based on various metrics - Multiple time period views (week, month, year, all-time) - Podium display for top 3 users - Detailed statistics including favorite items - Achievement system with milestone tracking



Games - A bunch of popular multiplayer bar games. All condensed into one platform, easily create a lobby invite friends and play.


Administrative Features

The admin system is the most technical part of this application, featuring enterprise-level functionality for complete system control and automation.


Comprehensive User Management - Real-time user directory with sortable columns and filtering - Instant balance modifications with audit trail logging - Account status management (active, blocked, deleted) - Detailed per-user analytics showing consumption patterns and spending trends - Bulk operations for managing multiple users simultaneously - User activity monitoring with login history and last active timestamps - Export user data to Excel/CSV for external reporting



Advanced Financial Administration

Automated Bank Integration - CSV import system for bank statements with automatic transaction matching - Smart algorithm matches bank transfers to users via structured references - Unmatched transaction queue for manual review and assignment - Transaction status tracking (matched, unmatched, ignored) - Import history with rollback capabilities - Duplicate detection preventing double-credit errors



Payment Reminder System - Bulk email system for users with negative balances - Customizable email templates with dynamic variables (name, balance, reference) - Email history tracking showing sent date, recipients, and amounts - SMTP configuration panel supporting multiple email providers - Batch sending with individual email tracking - Automatic email cleanup for old records



Financial Reporting & Export - Export transaction history to Excel/PDF formats - Generate custom date range reports - Revenue analytics with visualization - User spending reports with charts - Export formats include CSV, Excel (XLSX), and PDF



Menu Management System - Drag-and-drop interface for menu item reordering - Bulk image upload with automatic optimization - Price history tracking for all menu items - Availability scheduling (enable/disable items by date) - Item statistics showing popularity and revenue per item - Soft delete system preserving historical order data - Duplicate item detection - Batch price updates across multiple items



Email Management System

Email Domain Control - Whitelist system for allowed registration domains - Blacklist for blocking specific email addresses - Pattern matching for subdomain handling - Bulk domain import from CSV - Domain verification status tracking

Email History & Analytics - Complete log of all system-sent emails - Email type categorization (reminders, verifications, approvals) - Delivery status tracking with error logging - Recipient count and total amount summaries - Email preview and resend functionality - Automatic cleanup of old email records (configurable retention)

SMTP Configuration Panel - Support for multiple SMTP providers (Gmail, SendGrid, custom) - Secure credential storage - Connection testing tool - Fallback email configuration - Email rate limiting to prevent spam flags


Database Backup & Restore System

Automated Backup System - Scheduled automatic backups (daily, weekly, monthly) - Manual one-click backup creation - Incremental and full backup options - Backup size optimization with compression - Automatic retention policy (keep last N backups) - Storage space monitoring with alerts

Backup Management - Download backups directly from admin panel - One-click restore functionality with confirmation - Backup verification before restore - Backup history with file sizes and dates - Backup deletion with safety confirmations - Email backup copies to admin addresses


System Configuration & Monitoring

Maintenance Mode - System-wide maintenance toggle - Custom maintenance message editor - Admin bypass (admins can access during maintenance) - Scheduled maintenance windows - Maintenance notification system

Global Statistics Dashboard - Total revenue tracking with charts - Active user count and growth metrics - Most popular items with visual rankings - Average order value calculations - Peak usage time analytics - User acquisition trends - Revenue forecasting based on historical data

Security & Access Control - Role-based permission system - Admin action logging for audit trails - IP blocking for suspicious activity - Session management with timeout controls - Failed login attempt tracking - Security event notifications via email

System Health Monitoring - Database performance metrics - Storage space monitoring - Error log viewing and downloading - Active session tracking - API response time monitoring - Automated health checks with email alerts



Technical Implementation

Technology Stack

Frontend - HTML5 semantic markup for accessibility - CSS3 with custom properties for dynamic theming - Vanilla JavaScript (ES6+) for interactivity - Bootstrap 5.3.0 for responsive layouts - Font Awesome 6.4.0 icon library - Progressive Web App (PWA) capabilities

Backend - PHP 7.4+ with object-oriented architecture - MySQL 8.0+ relational database - PDO for secure database interactions - PHPMailer for email functionality - RESTful JSON API design - Session-based authentication

Infrastructure - Apache/Nginx web server - Secure file upload handling - Automated backup system - Database optimization with proper indexing - Production-ready security measures

Architecture Highlights

Security - Industry-standard password hashing - Prepared statements preventing SQL injection - XSS protection through output escaping - CSRF protection via same-origin policy - Role-based access control - File upload validation and sanitization - Session security with timeout handling

Database Design - Normalized relational schema - Efficient indexing strategy - Transaction support for data consistency - Time-series data for analytics - Soft deletion preserving historical records - Optimized queries for performance

API Design - Consistent JSON request/response format - Proper HTTP status codes - Error handling with descriptive messages - Session-based authentication - Stateless design for scalability

Performance Optimizations - Lazy loading for images - Database query optimization - Frontend asset minification - Browser caching strategies - Efficient data pagination - Connection pooling


User Interface Design

Responsive Design - Mobile-first approach - Breakpoint optimization for tablets and desktop - Touch-friendly controls on mobile - Hover states for desktop users - Adaptive layouts across screen sizes

Theming System - Multiple built-in themes - Light and dark mode support - CSS custom properties for easy customization - User preference persistence - Smooth theme transitions




Interactive Elements - Smooth animations and transitions - Audio feedback for user actions - Loading states and progress indicators - Toast notifications for important messages - Celebration animations for successful actions - Modal dialogs for confirmations


Advanced Functionality

Order Processing - Multi-step validation system - Automatic gift detection and application - Payment hierarchy (gifts first, then balance) - Atomic transactions preventing data corruption - Real-time balance updates - Comprehensive statistics tracking

Analytics Engine - Time-bucketed data aggregation - Multiple granularity levels (daily, weekly, monthly, yearly) - User-specific and global statistics - Favorite item detection algorithms - Spending pattern analysis - Ranking calculation system

Gift System - Dual gift types (monetary and item-based) - Quantity tracking with partial consumption - Value preservation across uses - Automatic expiration handling - Gift history and audit trail


Development Practices

Code Quality - Modular component architecture - Reusable PHP includes for consistency - Consistent naming conventions - Comprehensive error handling - Input validation throughout

Version Control - Git repository with meaningful commits - Feature branch workflow - Clean commit history

Deployment Considerations - Environment-specific configuration - Database migration system - Automated backup procedures - Maintenance mode for updates - Rollback capabilities


Project Complexity

This application demonstrates proficiency in:


Scalability

The application is designed with growth in mind: - Stateless API architecture supports horizontal scaling - Efficient database indexing for large datasets - Optimized queries preventing N+1 problems - Caching strategies for frequently accessed data - Modular codebase allowing feature expansion - Documented code for team collaboration


User Experience Highlights

Intuitive Navigation - Bottom navigation bar for easy thumb access on mobile - Clear visual hierarchy - Consistent UI patterns throughout - Minimal clicks to complete tasks - Breadcrumb trails where appropriate

Feedback and Confirmation - Instant visual feedback for all actions - Confirmation dialogs for destructive operations - Success messages with clear next steps - Error messages with actionable solutions - Loading states preventing confusion

Accessibility - Semantic HTML structure - ARIA labels where needed - Keyboard navigation support - Color contrast compliance - Screen reader compatibility


Progressive Web App

The application can be installed on mobile devices like a native app: - Add to home screen functionality - Custom app icon and splash screen - Standalone display mode (no browser chrome) - Offline fallback page - Fast loading with caching - Native app-like experience


Maintenance and Support

Monitoring - Error logging system - Activity tracking - Performance monitoring - Security audit trails

Backup System - Automated daily database backups - File system backups - Easy restoration procedures - Off-site backup storage

Update Process - Maintenance mode during updates - Database migration system - Testing procedures - Rollback capabilities