Project Overview

Project Purpose and Objectives

This project implements a Meeting Cost Calculator designed to track and compute the real-time cost of meetings based on attendee count, average hourly wage, and meeting duration. The system enables users to start, pause, and reset meetings while continuously updating the monetary cost incurred. It also maintains a history of past meetings for review.

Key objectives include:

Core functionalities are implemented as follows:


Example Workflows and Use Cases

Starting a Meeting and Tracking Cost

  1. User inputs number of attendees, average wage, and meeting purpose.

  2. User clicks Start:

    • Meeting instance initializes increments and sets start time.

    • A timer begins updating the displayed cost every second.

  3. As time progresses, the system calculates elapsed time and multiplies by attendee count and wage to determine the current cost burn rate.

  4. User can update attendee count or wage during the meeting; the system pushes current increments and starts new increments with updated values.

  5. User clicks Stop:

    • Meeting clock stops, final increment is saved, and the meeting data is stored in the warehouse (localStorage).

  6. The UI updates the current cost display and refreshes the past meetings list with the newly saved meeting.

Resetting Meeting Data

Reviewing Past Meetings


Stack and Technologies

These technologies were selected for their wide browser support, simplicity in client-side storage, and ease of integration into a modular JavaScript codebase. The modular ES6 approach facilitates separation of concerns and maintainability.

Key libraries and modules essential to the system:


High-Level Architecture

The architecture follows a modular front-end design pattern focusing on separation of concerns between models, views, and controller logic.

Major Components

Interaction Flow

graph TB
UI[index.html / index.js] --> MeetingModel(Meeting Model)
MeetingModel --> IncrementModel(Increment Model)
MeetingModel --> WarehouseModel(Warehouse Model)
MeetingModel --> MeetingView(MeetingTemplate)
WarehouseModel --> PastMeetingsView(PastMeetingsTemplate)
UI --> MeetingView
UI --> PastMeetingsView

Developer Navigation

Frontend Developers Start Here

Focus on how user input triggers meeting state changes and UI refreshes.

Backend/Model Developers Focus Here

Focus on extending or optimizing meeting cost logic, persistence mechanisms, or adding new data attributes.

Data Persistence and Storage Exploration


Visual Diagrams

Component Diagram: High-Level Architecture

graph TB
UI[UI Layer]
Meeting[Meeting Model]
Increment[Increment Model]
Warehouse[Warehouse Model]
MeetingView[Meeting View]
PastMeetingsView[Past Meetings View]
UI --> Meeting
Meeting --> Increment
Meeting --> Warehouse
Meeting --> MeetingView
Warehouse --> PastMeetingsView
UI --> MeetingView
UI --> PastMeetingsView

Flowchart: Meeting Cost Calculation Workflow

flowchart TD
Start[Start Meeting]
Init[Initialize Meeting Instance]
Timer["Start Timer (1s interval)"]
UpdateInputs[User Updates Attendees/Wage]
PushIncrement[Push Increment for elapsed time]
CalculateCost[Calculate current cost]
UpdateUI[Update Cost Display]
StopMeeting[Stop Meeting]
SaveData[Save Meeting to Warehouse]
Reset[Reset Meeting Data]
Start --> Init --> Timer
Timer --> CalculateCost --> UpdateUI
UpdateInputs --> PushIncrement --> Init
StopMeeting --> PushIncrement --> SaveData
SaveData --> UpdateUI
Reset --> Init

This overview guides developers through the core technical structure, workflows, and navigation paths necessary to understand, maintain, and extend the meeting cost calculator project efficiently.