Work Schedule Organizer is a React and Vite frontend application that helps you manage weekly employee work schedules. It loads employee records from a JSON file, displays them in an alphabetically sorted list, and gives you tools to filter by workday and add new employees — all without a backend or database.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.
This app runs entirely in the browser. All data starts from
public/employees.json and any employees you add during a session exist only in React state — they reset on page reload unless you update the JSON file.Key features
- Employee list: View all employees with their name, phone number, email address, and a checkbox display of their Monday–Friday workdays.
- Alphabetical sorting: Employees are sorted by name on load and after every new addition, so the list stays organized automatically.
- Filter by workday: Check one or more day checkboxes to narrow the list to employees who work on those days.
- Add employees: A form lets you enter a name, phone number, email address, and select workdays. The new employee is inserted into the sorted list immediately.
- JSON data loading: On startup,
Appfetches/employees.jsonfrom thepublic/directory and populates the initial list.
Employee list
Browse all employees with their contact info and weekly schedule.
Add employee
Add new employees with contact details and workday selections.
Filter by workday
Show only the employees working on specific days of the week.
Project structure
The app is a standard Vite project. All React components live insrc/, and the initial employee data is a static JSON file served from public/.
Component overview
The application is split into five focused components. Each one handles a single responsibility.App
File: src/App.jsx
The root component. It owns the employees state array and the showingAddEmployee toggle. On mount, it fetches /employees.json, sorts the results with localeCompare, and stores them in state. It renders the page heading, the Add Employee button, the AddEmployee form (when visible), and the Employees list.
Employees
File: src/employees.jsx
Receives the full employees array as a prop and manages its own filteredEmployees state. It renders the WorkDayFilter bar and maps either the filtered list or the full list to individual Employee components. When no employees match the active filter, it falls back to the unfiltered list.
Employee
File: src/employee.jsx
A presentational component that renders a single employee card. It displays the employee’s name, phone number, and email, then shows five read-only checkboxes — one per weekday — indicating which days that employee works.
AddEmployee
File: src/addEmployee.jsx
A controlled form component with text inputs for name, phone, and email, plus five checkboxes for workdays. On submit, it calls the addEmployee callback passed down from App, which inserts the new employee into the sorted list and hides the form.
WorkDayFilter
File: src/workDayFilter.jsx
Renders a row of five day checkboxes (Monday–Friday). Each change fires the filterEmployees callback in Employees, which filters the employee list to those who work on any of the selected days.