code a scheduling app based on this project requirement:
Help me with implementing features and functions that will build this app in the project brief. Give me the entire code and files.
Project brief:


Project's Objective
To create a system to facilitate the scheduling of cleaning tasks for works and clients of
Abba Maintenance Services. The system should provide a vision of each daily jobs, and how
to reallocate jobs when cleaning specialist declares MC or AL.
Project Functional Requirements
1. User groups
1. There are 3 different groups of users:
a. Worker: containing the following information:
i. Name
ii. Employee ID
iii. Working hours each day
iv. phone number
v. Direct supervisor (direct administrator)
vi. short bio (worker background/History, pets friendly, skin irritation issues, special condition)
b. Client: containing the following information:
i. name
ii. list of properties
iii. address and postal code for each property
c. Administrator: containing the following information
i. name
ii. Employee ID
iii. List of workers under the direct supervision
2. A worker can accept the cleaning task which may takes 1-4 hours during the working hours from
8:00AM to 10:00PM (contractual hours per week is 44 hours with 6 workings day and 1 off day). A
task will be offered 2.5 hour before the actual timing so that the worker has time to prepare and
arrive the destination. Worker will have to accept. There is no need for a feature for the worker to
accept or reject. A worker will have an hour of lunch break between 12pm – 1pm.
Ideal working timing are as follows (3/4 hours working schedule)
8.00AM – 12.00PM: Morning Shift (12.00PM – 1.00PM Lunch)
1.00PM – 5.00PM: Afternoon Shift (5.00PM – 6.00PM Dinner)
6.00PM – 10.00PM: Night Shift
3. A client can place a cleaning order via the system by selecting the package type, property type,
number of rooms, and preferred timeslot with date (Please refer to the appendix for more
details). After placing a cleaning order, the system should have an algorithm to automatically
compute and assign the best matched workers (nearest distance and shortest time taken based on
Public Transport to commute in Singapore to work) to the client.
SMU Classification: RestrictedSMU Classification: Restricted
a. The client also has the right to select their preferred worker to do the cleaning. Preferably to
block out lunch and dinner hours
b. The system should also consider the travelling time from previous location to current
location and allocate by proximity.
c. The client can only place the cleaning order one day in advance, with a minimum of 24
hours' notice.
4. The Administrator can overwrite the task and can also add/delete/modify worker and client records from
the database. The admin can also assign a pending task to a specific worker (e.g. no one accept the task
within 30 mins). The admin can view statistics
i. monthly statistics (number of jobs per month, number of clients per month, number of new
job and clients per month, number of terminated clients per month, number of cancellation
and reschedule per month)
ii. number of working hours per worker (weekly, monthly, annual)
iii. allow export to csv/excel.
iv. Number worker (AL/MC/HL/EL) per month
v. Over time hours completed per worker
5. All 3 kinds of users need to be authenticated (username and password).
a. There is one initial administrator account (root). The root administrator can add other
administrators. Only the root administrator can delete other administrators.
b. For the worker/client, he will enter his email address. the system will send a link to his email to
complete the registration. The system will capture his name, email and contact number.
2. Cleaning Task
1. If a cleaning worker is on MC (e-mc should be uploaded by the worker) / AL, the direct admin will key in the
info into the system, and the system will attempt to reallocate a worker first (the leave application should be
applied 3 hours in advance, otherwise no enough time to reschedule the sessions or to arrange a
replacement cleaner and to suggest the client to reschedule to another day, and if the client does not want
to reschedule the client can choose to cancel the sessions). If cannot find an appropriate worker the system
will be able to create automation messages to notify the affected clients on the absence. The MC / AL
submission will be forwarded to the direct administrator. If the MC/AL is not approved, the worker’s salary
will be affected.
The cleaner can apply for the MC leave first, while pending their MC certificate to be uploaded before within
the day. In the event the MC slip is not uploaded by the end of the day, a notification will be sent to the back
end for further actions.
2. Once a worker is assigned a cleaning task, the System will send reminder message to the worker to arrive the
destination every 5 mins before he arrives the client’s location. Once the worker arrives and starts the
cleaning, the worker has to acknowledge his arrival by uploading a photo. After the acknowledgement, the
system will label this work’s status as ‘in working’ and the task as ‘in progress’ and other workers cannot
select this task.
3. Once a worker is assigned a cleaning task, he has to arrive the destination and acknowledge his arrival within
5 minutes after the sessions started. If the cleaning task is not acknowledged in 5 mins, the system will
automatically send an alert message to his direct supervisor (administrator). Then, the direct admin will
check with worker, and reschedule the task to another available worker if necessary.
4. When will the job be completed, worker uploads photo to the system to confirm the task completion. Then,
the system will automatically update the task status as ‘finished’. Client can rate (5 ranks maximum) and
leave their feedback after each session on the work done quality.
Appendix
Regular Home Cleaning
Weekly Package
Weekly cleaning refers to the regular cleaning tasks that are typically performed on a weekly basis, including dusting
surfaces, vacuuming or sweeping floors, mopping floors, cleaning bathrooms, cleaning the kitchen, changing bed
linens, and taking out trash.The table below shows our pricing and hours of service based on the number of rooms
that are needed for regular cleaning. Furthermore, we also provide night shift cleaning and the pricing can be
identified at the columns in red.
Do note that we also offer 2-hour services. For more information and to better meet your needs, please contact our
Sales Representatives.
HDB Price Hours Hourly Rate Pax
1 2 Bedrooms and Below - 2 Please contact the sales team
2 3-Room 276 3 23 1
3 4-Room 336 4 21 1
4 5 Bedrooms or More - 5 Please contact the sales team
Condominium Price Hours Hourly Rate Pax
1 2 Bedroom and below 276 3 23 1
2 3 Bedroom 336 4 21 1
3 4 Bedrooms or More - 5 Please contact the sales team
4 2-3 Bedroom Night shift (After 7
pm)
2.5 19 1
5 2-3 Bedroom Night shift (After 6
pm)
3 19 1
6 2-3 Bedroom Night shift (After 6
pm)
4 18 1
Homeowners to provide equipment for all the packages above
Landed
Please note that HomecleaningSg offers regular cleaning services for landed properties. If you are interested, kindly
contact our Sales Representatives at <PRESIDIO_ANONYMIZED_PHONE_NUMBER> for more information.
Bi-weekly Package
Bi-weekly cleaning involves cleaning tasks that are performed every two weeks, typically alternating with another set
of tasks or on a rotation basis. This cleaning frequency falls between weekly and monthly or occasional cleaning.
The table below indicates our available packages for Bi-weekly cleaning service. The pricing differs based on the
number of hours.
Do note that we also offer 2-hour services. For more information and to better meet your needs, please contact our
Sales Representatives.
Regular Cleaning Price Hours Hourly Rate Pax
1 Promotion Bi-weekly $138.00 3 23 1
2 Promotion Bi-weekly $168.00 4 21 1
3 Promotion Bi-weekly - 5 Please contact the
sales team
Homeowners to provide equipment
The highlighted in yellow above are those packages that would be directed to our Sales Team to allow us to manually
handle them and understand further on the requirements, whereas those not highlighted in yellow will be a default
as an option to book by the client on the booking system.
Q&A
G3T5 Clarifications
1. Do we have to implement a client interface? Previously it was mentioned we are only doing the admin console.
Not for now, as shared during the presentation, we will focus on admin console and schedule at the moment.
2. When a worker gets assigned a task, a worker must reject or accept a cleaning task? The brief mentioned that the
worker has no say in the tasks assigned.
Company allocates jobs to the worker and the worker will have to accept. There is no need for a feature for the
worker to accept or reject at the moment.
3. “The client can only place the cleaning order one day in advance, with a minimum of 24 hours' notice.” Do you
mean clients must place the cleaning order one day in advance?
Clients can book a job anytime given that as long as we have availability and the shortest notice for workers to
prepare to go to the job will be at least 3 hours for them to prepare. The 24 hours notice applicable to the
cancellation, rescheduling and chaSMU Classification: RestrictedSMU Classification: Restricted
4. “Once a worker is assigned a cleaning task, the System will send reminder message to the worker to arrive the
destination every 5 mins before he arrives the client’s location. “. The notification message should be sent every 5
mins from what time? This feature seems also also go beyond that of a admin console to include the notification
system.
As shared, we do not limit the creativity of the students to create on the web or app. If app based should be able
to have push notifications to remind workers 5 mins before job starts. However, if it is web based, we will leave it
to the students to think of a way to remind the worker, through email or maybe SMS?
5. "For the worker/client, he will enter his email address. the system will send a link to his email to complete the
registration. The system will capture his name, email and contact number. " This also goes beyond admin console
and includes worker/client registration service system.
As mentioned, we are focusing on the scheduling system and admin console for the internal team to manage and
workers to check the schedule. Client interface should be on the later part.
Ques for client:
1. How long ahead does the "every 5min job reminder" starts for a worker? 30min before a job?
The reminder should be 15 mins before the session starts, and 5 mins before the job starts. This is to notify the
worker before notifying the admin in the absence of the worker. Should be 2 times for the reminder.
2. How long is the grace period / range for task acknowledge
15 mins after job starts time, if it’s more than 15 mins will be considered as absent.
3. What is a job and what is task? The definition is rather unclear. For example, the cleaning task has a "work" and
"task" status.
Work = Tasks


This is how it looks like in my firestore:
{
  "leave": {
    "5fGGjnSTX1BFGI4H0UMJ": {
      "date": "2024-09-22T16:00:00.741000+00:00",
      "status": "pending",
      "employeeId": "E001",
      "leaveType": "AL"
    }
  },
  "orders": {
    "EG7A72NIODCQe0OImEMN": {
      "orderDate": "2024-09-16T02:00:00.456000+00:00",
      "endTime": "2024-09-22T08:00:00.244000+00:00",
      "packageId": " Zx3HpI2wfRjVvj3JPMgb",
      "day": 0,
      "startTime": "2024-09-22T06:00:00.113000+00:00",
      "status": "ongoing",
      "clientId": "C001",
      "location": {
        "address": "address 1",
        "propertyName": "House 1",
        "postalCode": 512345
      }
    }
  },
  "packages": {
    "Zx3HpI2wfRjVvj3JPMgb": {
      "rooms": 3,
      "hourlyRate": 23,
      "hours": 3,
      "price": 276,
      "pax": 1,
      "propertyType": "HDB",
      "packageType": "weekly"
    }
  },
  "tasks": {
    "AGUaG6KO0sC1NzubO49Y": {
      "property": {
        "address": "address 1",
        "propertyName": "House 1",
        "postalCode": 512345
      },
      "feedback": "",
      "endTime": "2024-09-22T08:00:00.477000+00:00",
      "rating": 0,
      "startTime": "2024-09-22T06:00:00.134000+00:00",
      "endPhoto": "collection/photo",
      "status": "pending",
      "orderId": "",
      "clientId": "C001",
      "startPhoto": "collection/photo",
      "workerId": "E001"
    }
  },
  "users": {
    "DVOQcPZTDNzxl3oJArkH": {
      "password": "password",
      "phoneNumber": 90123456,
      "userType": "client",
      "email": "client@email.com",
      "properties": [{
        "address": "address 1",
        "propertyName": "House 1",
        "postalCode": 512345
      }],
      "username": "client1",
      "name": "Client 1"
    },
    "HFII46bc8N6QmgWNt6uz": {
      "password": "password",
      "email": "employee@email.com",
      "phoneNumber": 98765432,
      "bio": "Hi, SG best cleaner here!",
      "userType": "worker",
      "workingHours": 0,
      "supervisorId": "A001",
      "employeeId": "E001",
      "username": "Worker 1",
      "name": "Worker 1"
    },
    "NlwpN9jO8U0H0z0tlMMQ": {
      "password": "password",
      "workers": [
        "E001"
      ],
      "phoneNumber": 91234567,
      "isRoot": true,
      "userType": "admin",
      "email": "admin@root.com",
      "employeeId": "A001",
      "username": "admin",
      "name": "Admin 1"
    }
  }
}