- Created create_excel_xlsxwriter.py and update_excel_xlsxwriter.py - Uses openpyxl exclusively to preserve Excel formatting and formulas - Updated server.js to use new xlsxwriter scripts for form submissions - Maintains all original functionality while ensuring proper Excel file handling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2.3 KiB
2.3 KiB
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
- Clone the repository
- Install dependencies:
npm install
Running the Application
Start the server:
npm start
For development with auto-restart:
npm run dev
The application will be available at http://localhost:3000
Project Structure
index.html- Main form interface for collecting user datathank-you.html- Confirmation page after form submissionserver.js- Express server handling form submissions and routingindex.js- Business logic for calculating retail media metricsconfig.json- Configuration file with constants and coefficientsresults.json- Output file where calculation results are storedpublic/- Static assets directory
How It Works
- Users fill out the business case form with their retail media data
- The form validates input and submits data to the server
- Server processes the data using formulas in
index.js - Results are saved to
results.jsonand user is redirected to thank-you page - 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