# Retail Media Business Case Calculator

This application helps retail media professionals generate business cases by collecting key metrics and calculating potential reach and impressions across different channels.

## Features

- Clean, user-friendly form for collecting retail media data
- Automatic calculation of key metrics:
  - Potential reach in-store (digital screens and radio)
  - Unique impressions in-store
  - Potential reach on-site
  - Unique impressions on-site
  - Potential reach off-site
  - Unique impressions off-site
- Results saved to a JSON file for reporting
- Thank you page with confirmation message

## Installation

1. Clone the repository
2. Install dependencies:

```bash
npm install
```

## Running the Application

Start the server:

```bash
npm start
```

For development with auto-restart:

```bash
npm run dev
```

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

## Project Structure

- `index.html` - Main form interface for collecting user data
- `thank-you.html` - Confirmation page after form submission
- `server.js` - Express server handling form submissions and routing
- `index.js` - Business logic for calculating retail media metrics
- `config.json` - Configuration file with constants and coefficients
- `results.json` - Output file where calculation results are stored
- `public/` - Static assets directory

## How It Works

1. Users fill out the business case form with their retail media data
2. The form validates input and submits data to the server
3. Server processes the data using formulas in `index.js`
4. Results are saved to `results.json` and user is redirected to thank-you page
5. Retail media specialists follow up with the user with a customized business case

## Technologies Used

- Node.js and Express for the backend
- HTML/CSS/JavaScript for the frontend
- TailwindCSS for styling
- Vanilla JavaScript for form validation and interactions

## Configuration

The application uses a `config.json` file that contains constants and coefficients for the formulas. You can modify these values to adjust the calculation logic.

## Development Notes

- Form styling uses a clean white design with accent colors
- Form validation ensures complete and accurate data collection
- The server includes error handling for form submissions
- Calculations are based on industry-standard formulas for retail media 