Supermarket Shifts

Supermarket Shifts is a custom-built tool I created to automatically synchronize my supermarket work schedule with my personal digital calendar. The idea came about in December when I started my job and my mom kept asking when I was working so she could plan family activities around my shifts. Manually telling her every week quickly became annoying—so I built an automated solution.

Project Overview

My goal was to fetch my work schedule directly from my employer's app and have it appear in my calendar without manual effort. This way, I could see my shifts, my break times, and even who I was working with—all in one place.

Reverse Engineering the Schedule

To start, I installed Android Studio and launched a virtual Android phone. Using HTTP Toolkit, I intercepted the network requests made by my work app after logging in.

I identified the API endpoint that returned my schedule in JSON format. However, it required an authenticated session cookie that came from a different request—specifically, the one triggered when visiting the schedule page in a browser.

Without that cookie in the request header, the API returned the login page HTML instead of JSON. To get the cookie, I logged into the work portal manually in a browser, opened the developer tools, went to the Storage tab, and copied the session cookie value into my local .env file. This cookie needed refreshing about every two months.

JSON to Calendar Conversion

Once I had the raw schedule data, I transformed it into a live .ics feed using ical-generator. The feed included:

  • Shift start and end times
  • Break duration
  • Names of colleagues working that day

[
  { start: 1733653200, end: 1733682000, breakDuration: 1800, colleagues: ["Dwayne Johnson", "Kevin Hart"] },
  { start: 1733816400, end: 1733845200, breakDuration: 2700, colleagues: ["Chris Pratt", "Jack Black"] }
]
  

Result

The final result was a live-updating work calendar that I could share with my mom, making it easy for her to know when I was available. Below is a screenshot of the calendar with all shift details included:

Technology Stack

  • Node.js — Backend JavaScript runtime
  • Express — Web framework for Node.js
  • HTTP Toolkit — Tool for intercepting and debugging network requests
  • Android Studio — Android emulator for running and testing the work app
  • ical-generator — Programmatic iCalendar feed creation
  • JavaScript (ES6+) — Core language used throughout
  • HTML/CSS — Frontend markup and styling

This project gave me hands-on experience with reverse engineering, API analysis, and calendar integrations. Most importantly, it solved a real-life problem for me and my family in a way that was both efficient and reusable.