Skip to content

Design Documentation

Jaemin Choi edited this page Dec 10, 2023 · 13 revisions

Software Development Principles and Practice 2023

Product : Calendy

Team 10 : Jajuboja (자주보자)

Design & Documentation

Rev. 2023/10/08 17:25 ver 1.0 (By Hochan Bang)

  • Initial creation

Rev. 2023/10/21 00:00 ver 1.1 (By Yoonjae Jung)

  • Updated Class Diagram & Data Model
  • Added ViewModel Diagram
  • Added View Specifications
  • Added Front-End Algorithms
  • Removed redundant data model specification
  • Added API & external library usage details

Rev. 2023/11/05 18:00 ver 1.2 (By Jaemin Choi)

  • Updated Class Diagram & Data Model
  • Updated Testing plan
  • Updated Application design

Rev. 2023/11/19 23:30 ver 1.3 (By Gunwoo Kim)

  • Updated Class Diagram
  • Deleted auth features in View, Implementation Details
  • Deleted auth features in Backend API
  • Updated API & External Library
  • Updated Testing Plan

Rev. 2023/12/03 20:30 ver 1.4 (By Hyehyun Chu)

  • Added User Testing
  • Updated Testing Plan
  • Updated Class Diagram
  • Updated View, Implementation Details

Rev. 2023/12/09 00:39 ver 1.5 (By Yoonjae Jung)

  • Added Manager Implementation Details

Rev. 2023/12/09 11:00 ver 1.6 (By Jaemin Choi)

  • Update Class Diagram, View Details

System Design

System Architecture

image

Android Application Class Diagram

image

image image image

Data Models

image

ViewModel

image

View

  1. Weekly Page
    • View plans for the selected week
    • Navigate to neighboring weeks by swiping horizontally in the Weekly Calendar
    • Add new plan for the selected time and day by tapping the empty block of the Weekly Calendar
    • View details of a plan and navigate to Edit Plan page for the selected plan by tapping on the title of plan in the Weekly Calendar
  2. Monthly Page
    • View plans for the selected month
    • Days with plans that have visibility set to true will be denoted by a dot under the date number
    • View plans for a day as a pop-up by tapping on the date
    • Navigate to neighboring days by swiping horizontally in the View Day pop-up
    • Add new plan for the selected day by tapping the add button in the View Day pop-up
    • Navigate to Edit Plan page for the selected plan by tapping on the title of plan in the View Plan pop-up
  3. To-Do List page
    • View all To-Do’s in chronological order
    • Filter To-Do’s by status of complete
    • View details of a To-Do and navigate to Edit Plan page for the selected To-Do by tapping on the title
  4. Edit Plan page
    • Add/Edit/Delete plans
    • Add new plan by specifying required attributes(title, priority, start time(for schedules), end time) and optional attributes(category, memo)
    • Edit attributes(title, priority, start time, end time, category, memo) of an existing plan
    • Delete an existing plan
  5. Manager page
    • Chat with AI Manager
    • Add, edit, delete, and view plans by sending a message in natural language(Korean)
    • Receive a summarized report of the plans in the desired time scope

Implementation Details

1. Application Design

Front-End Algorithms

  1. Bottom Navigation
  • Week button : navigate to Weekly Page

  • Month button : navigate to Monthly Page

  • Mic button : open voice assistant popup

    Voice Assistance Popup:

    • startVoiceRecognition: Start listening user’s voice
    • stopVoiceRecognition: Stop listening user’s voice
  • Todo button : navigate to Todo List Page

  • Manager button : navigate to Manager Page

  1. Weekly Page
    • onClickTimeSlot: Navigate to EditPlanPage to add new Plan at selected time
    • onClickPlan: Open EditPlanPage for the selected Plan
    • onLongClickTodo: Change the completion status of selected Todo
    • onClickWeekLeftButton: View previous week
    • onClickWeekRightButton: View following week
  2. Monthly Page
    • onClickMonthLeftButton: View previous month

    • onClickMonthRightButton: View following month

    • onDoubleClickDayButton: Show ViewDayPopupView for the selected date

      Plan List Popup:

      • onClickAddButton: Navigate to EditPlanPage to add new Plan for the selected day
      • OnClickPlan: Open EditPlanPage for the selected Plan
      • onClickCheckbox: Change the completion status of selected ToDo
      • onClickLeftButton: Navigate to Plan List Popup of previous day
      • onClickRightButton: Navigate to Plan List Popup of following day
  3. TodoList Page
    • onClickAddButton: Navigate to EditPlanPage to add new Todo
    • onClickCheckbox: Change the completion status of selected ToDo
    • onClickTodo: Open EditPlanPage for the selected Todo
    • onClickMonthLeftButton: View previous month
    • onClickMonthRightButton: View following month
    • onClickMonthButton: open month selecting bottomSheet
    • onClickHideSwitch: Set visibility for completed Todo
  4. EditPlanPage
    • onClickSubmitButton: Apply changes to add/edit Plan

    • onClickCancelButton: Cancel changes and go back to previous screen

    • onClickDeleteButton: Delete the selected Plan

    • PlanTypeRadioButton: Set Type(Schedule,Todo) for the selected Plan

    • TitleTextField: Set Title for the selected Plan

    • DateSelector: Set time for the selected Plan

    • CategorySelector: Set category for the selected Plan

      CategorySelectorPopup:

    • TextFiled: Set Title for the selected Plan

    • MemoTextField: write memo for the selected Plan

  5. ManagerPage(Message Page)
    • onClickHelpButton: Show Help messages for user

    • onClickSendButton: Send the content in the message box to AI Manager

    • MessageInputField: Write the content in the message box

    • onDoubleClickUserMessage: Copy the content of the selected message in the message box

    • ShowDetailButton: Open Plan Revision List Popup

      Plan Revision List Popup

      • onClickUndoButton: Revert all changes in popup
      • OnClickModiefiedPlan: View a modified plan on the EditPlanPage or revert it

ViewModels

  1. WeeklyViewModel : manage Weekly Page UIState & connect WeeklyPage with PlanRepository
  2. MonthlyViewModel : manage Monthly Page UIState & connect Monthly Page with PlanRepository
  3. TodoListViewModel : manage TodoList Page UIState & connect TodoList Page with TodoRepository
  4. EditPlanViewModel : manage EditPlan Page UIState & connect EditPlan Page with PlanRepository, CategoryRepository
  5. MessagePageViewModel : manage Manager Page UIState & connect Manager Page with MessageRepository
  6. MessagePlanLogViewModel : connect Manager Page with HistoryRepository

Data Layers

  • PlanRepository: Expose Plan data to the rest of the app that integrate Schedule and Todo

    getPlansStream(filter): Flow<List<Plan>>: retrieves plan data

    getPlanById(id): Flow<Plan>: retrieves Plan data by Id

    getAllPlans(): Flow<List<Plan>>: retrieves whole plan data

  • ScheduleRepository: Expose Schedule data to the rest of the app

    getSchedulesStream(filter): Flow<List<Schdule>>: retrieves schedule data

    insertPlan(Plan): insert a schedule data

    updatePlan(Plan): update a schedule data

    deletePlan(Plan): delete a schedule data

  • TodoRepository: Expose Todo data to the rest of the app

    getTodosStream(filter): Flow<List<Todo>>: retrieves todo data

    getYearlyTodosStream(filter): Flow<List<Todo>>: retrieves yearly todo data

    getMonthlyTodosStream(filter): Flow<List<Todo>>: retrieves monthly todo data

    getDailyStream(filter): Flow<List<Todo>>: retrieves daily todo data

    insertTodo(Todo): insert a todo data

    updateTodo(Todo): update a todo data

    deleteTodo(Todo): delete a todo data

  • MessageRepository: Expose Message data to the rest of the app

    getMessagesStream(filter): Flow<List<Message>>: retrieves Message data

    insertTodo(Category): insert a Category data

    updateTodo(Category): update a Category data

    deleteTodo(Category): delete a Category data

  • CategoryRepository: Expose Category data to the rest of the app

    getCategoriesStream(filter): Flow<List<Category>>: retrieves Category data

    getCategoryById(id): Flow<Category>: retrieves Category data by Id

    insertTodo(Category): insert a Category data

    updateTodo(Category): update a Category data

    deleteTodo(Category): delete a Category data

  • HistoryRepository: Save history about plan revision log

  • CalendyAPI: define Backend API to communicate with server

2. Backend API

use retrofit library https://square.github.io/retrofit

URI GET POST PUT DELETE
/manager/send send a user’s talk to the server
/manager/briefing send user’s briefing request to the server

4. APIs & External Libraries

Room Library

  • Used to enable simplified local database operations

Retrofit Library

  • Used to connect with server with java/kotlin interfaces

OpenAI API - GPT-4

  • Used to parse text prompt given by the user into pre-trained format
  • Fine-tuned to reduce increase accuracy and reduce redundancy in specifying requirements

Google TextToSpeech API

  • Used to convert voice prompt given to AI Manager to text

Material CalenderView Library

  • Used as basis for Monthly Calender page

Compose Wheel Picker Library

  • Used as Time Picker basis for Edit Plan page

Compose Rating Bar Library

  • Used as Priority Rating basis for Edit Plan page

Testing Plan

Frontend Testing

  • Objective: To validate the unit of the software performance in frontend

  • Unit Test - JUnit, Mockito

    Do Unit Testing for Viewmodel

    Get test coverage report by Jacoco

  • Integration Test - Espresso

    Do Integration Testing for Data Layer

    Do Integration Testing for application UI

GPT Testing

User Testing

  • Objective: To estimate the ease of managing schedules after using the application.
  • Method: 2 days of deployment study
    • SUS-based pre-survey on existing scheduling methods used
    • Use application(least 1 week of schedule should be migrated to Calendy)
    • SUS-based post-survey about Calendy
    • Compares the results of the pre-survey and post-survey
  • Survey Questions
    • Usefulness of app (rated with 7 point Likert scale)
    • User satisfaction with AI Manager (rated with 7 point Likert scale)
  • Goal: Overall increase in SUS-based survey and willingness to continue using