The Work Schedule Organizer loads its initial employee roster from a static JSON file served alongside the app. Understanding this format lets you seed the app with your own team data, validate records before import, and build tooling around the data model.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/y-broad/workschedule/llms.txt
Use this file to discover all available pages before exploring further.
How employee data is loaded
On startup,App.jsx issues a fetch('/employees.json') request to load the roster from public/employees.json. The response is parsed as JSON, sorted alphabetically by name, and stored in React state. Employees added through the UI during a session exist only in memory — they are not written back to the file.
public/employees.json must be a valid JSON array at the top level. A single object or any non-array value will cause the fetch to fail silently and the employee list will be empty.JSON schema
Each item in the array represents one employee and must conform to the following shape.Unique numeric identifier for the employee. Used internally to distinguish records. Assign sequential integers starting from
1 and never reuse an id.Employee’s full name. This value is displayed as the card heading and is used for alphabetical sorting via
localeCompare.Employee’s phone number. Any format is accepted (e.g.
"123-456-7890", "(123) 456 7890"). The value is displayed as-is on the employee card.Employee’s email address. Displayed on the employee card. No validation is applied at the data-loading stage.
An object with exactly five boolean properties — one for each weekday. A value of
true means the employee works that day; false means they do not. All five keys must be present.Single record example
The following is Bob’s record taken directly from the defaultemployees.json. Bob works Monday, Wednesday, and Friday.
Complete employees.json structure
The file must be a JSON array. Each element is an employee object. The default file ships with twelve employees.Editing the JSON file
Follow these tips to avoid common mistakes when adding or removing employees. Adding an employee- Open
public/employees.jsonin any text editor. - Copy an existing object and paste it as a new element inside the top-level array.
- Update each field with the new employee’s information.
- Assign an
idvalue that is not already used by any other record in the file. - Set each
workdaysproperty totrueorfalseto match the employee’s schedule. - Confirm the file is still valid JSON — use a linter or paste it into a JSON validator.
- Refresh the browser (or restart the dev server) to see the change.
{}. Make sure the remaining array elements are separated by commas with no trailing comma after the last element.
Sorting
You do not need to sort the array manually. App.jsx sorts all records alphabetically by name each time the data is loaded.