{"id":36443078,"url":"https://github.com/lpallavi/covidvacappt","last_synced_at":"2026-01-11T22:00:52.652Z","repository":{"id":230706951,"uuid":"779968580","full_name":"lpallavi/covidvacappt","owner":"lpallavi","description":"The COVID-19 Vaccination Appointment System is a Golang based project that will allow residents of a country to register to the system with their unique Identification number and make/edit COVID vaccination appointments.  ","archived":false,"fork":false,"pushed_at":"2024-03-31T10:10:17.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-31T12:21:11.927Z","etag":null,"topics":["appointment","covid-19","golang","vaccination"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lpallavi.png","metadata":{"files":{"readme":"Readme","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-31T10:08:13.000Z","updated_at":"2024-03-31T12:21:16.315Z","dependencies_parsed_at":"2024-03-31T12:21:14.056Z","dependency_job_id":"348cbfca-f3dd-43ef-9ede-8c63635f86a8","html_url":"https://github.com/lpallavi/covidvacappt","commit_stats":null,"previous_names":["lpallavi/covidvacappt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lpallavi/covidvacappt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpallavi%2Fcovidvacappt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpallavi%2Fcovidvacappt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpallavi%2Fcovidvacappt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpallavi%2Fcovidvacappt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpallavi","download_url":"https://codeload.github.com/lpallavi/covidvacappt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpallavi%2Fcovidvacappt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28324834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appointment","covid-19","golang","vaccination"],"created_at":"2026-01-11T22:00:51.914Z","updated_at":"2026-01-11T22:00:52.636Z","avatar_url":"https://github.com/lpallavi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"OVERVIEW\r\n1. Project Background and Description\r\n The COVID-19 Vaccination Appointment System Prototype will allow residents(users) of a country to sign-up and register to the system with their unique Identification number and unique username and browse and make/edit vaccination appointments. Administrators will be able to access user records and appointment dates and will be able to make changes to them as needed. \r\n\r\n2. Project Scope\r\n The application has two main modes of access: Registration and Login (User or Admin).\r\n\r\nOnly a user with unique identification number will be allowed to register to the system. The user will then need to register with a unique username and password. To ensure security, all passwords will be encrypted before storing in the database.\r\nUsers who have successfully registered can view/change their vaccination appointments. Vaccinations appointments for first and second vaccine are available only for citizens aged 70 years and above. Users who are less than 70 years of age will not be able to make any vaccination appointments till further changes in age criteria are made, or until further communication from MOH.\r\nThe second vaccination needs to be 21-28 days after the first vaccination. Users who have missed their appointments for first and/or second vaccinations can make new appointments within the system. But the second vaccination appointment date will have to be within the 21-28 days after the first vaccination date and also subject to availability of appointment date and time. \r\nFor users who have already taken their first vaccination more than 28 days earlier will not be able to make a second appointment and will need to call MOH for assistance for further advice. \r\nAdmin members can login to the system to view and delete registered users. They can also view the appointment dates (and times) currently present in the system; and add appointment dates as available. Appointment times range from 9:00 am up to 6:00 pm at an interval of every 15 min. That means first appointment is at 9:00 am, followed by 9:15 am, and so on. Last appointment time is at 5:45 pm and will end at 6:00 pm. \r\n\r\n3. Application Setup Requirements and Deliverables\r\n\r\nSystem Requirements: Microsoft Windows OS PC/ Command prompt console\r\n\r\nProcedure to execute the application in a Windows environment:\r\n1. Copy the application to a folder in PC’s Golang path \r\n2. To execute : \r\ngo run .\\source\\\r\n3. Go source code files:\r\nmain.go – file containing main function, const declarations and main function calls\r\nperson.go – file containing person data stored as a struct, and all functions that manipulate it\r\npersonLinkedList.go – file containing linked list data structure for storing data for each person and all functions that manipulate it\r\nbinaryTree.go – file containing Binary Search Tree data structure used for quick search for user identification and username information, and all functions that operate on it\r\nfileHandler.go – file containing read and write functions for CSV files for accessing/storing user data and appointment data\r\nidentityHandler.go – file containing functions used for user registration, user/admin login and logout \r\nuserHandler.go – file containing functions used for operations after user login\r\nadminHandler.go – file containing functions used for operations after admin login\r\nsharedFunctions.go – file containing common functions shared across the application, such as type conversion, calculating age, creating data for templates, formatting output and manipulating time array.\r\n4. Csv files for easy storage and retrieval:\r\npersonData.csv – file containing data for each person/user after successful registration.\r\nfreeappointments.csv – file containing list of all available appointments, with date and 15 min interval time\r\n5. Templates:\r\nheader.gohtml, spacers.gohtml, mainmenu.gohtml – Header, Spaces and main menu templates\r\nindex.gohtml – Home page\r\nregister.gohtml, registerform.gohtml – Registration form\r\nlogin.gohtml – Login page\r\nadmin.gohtml, adminloginmenu.gohtml – Admin page for all admin options\r\nuserloginmenu – Menu after user logs in\r\nviewappt.gohtml, makeappt.gohtml, deleteappt.gohtml – View, make and delete appointments for user\r\nprofile.gohtml – Page for displaying user profile\r\n6. Assets:\r\nbg.jpg – Background image\r\nstyles.css  - Basic CSS styling\r\n\r\n\r\n4.\tApplication Menu : At a Glance\r\n \t COVID-19 Vaccination Appointment System  \r\n\r\nClient\tServer\r\nLogin Menu\r\n•\tNew registration\r\n•\tUser Login\r\n•\tAdmin Login\tLogin \r\n•\tIssue Cookie with UUID\r\n•\tStore session – Username \r\n•\tGet Cookie\r\n•\tGet user information using current cookie UUID and session information\r\nUser Page \r\n•\tView appointments\r\n•\tMake new appointments\r\n•\tDelete appointments\r\n•\tView Profile\r\n•\tLogout\tUser Data\r\n•\tUpdate/sort/insert appointments in the appointments array\r\n•\tUpdate profile of user\r\n•\tStore updated data in csv files at logout\r\nAdmin Page \r\n•\tList all users\r\n•\tDelete a user\r\n•\tView appointments by date\r\n•\tAdd appointments for a date\r\n•\tLogout\tAdmin Data\r\n•\tDelete user information from all data structures (linked list and BST)\r\n•\tUpdate/sort/insert new appointments in the appointments array\r\n•\tStore all updated data in csv files at logout\r\n\r\n\r\n \r\n5.\tDescription of Client/Server System\r\n \tServer and Client system using a localhost at port 5221\r\n\r\n\tClient-Server System:\r\nThe Client-Server system can be divided into two logical parts, viz the client that requests for services, and a server that provides services. The main features of this system are:\r\n•\tIt can be run on separate machines on a network.\r\n•\tIt allows different users to access powerful resources on the server from lower end computers.\r\n•\tThe server holds data while the client is responsible for the user interface.\r\n•\tThe application logic can be distributed between the client and the server.\r\n•\tThe system can be three-tiered, with the middle tier holding most of the application logic.\r\n\tMain Features covered in Go In Action I:\r\na.\tThe net/http package : Handler, ListenAndServe, Request, ResponseWriter\r\nThe two main parts of net/http package are type Handler and method ListenAndServe.\r\nA Handler responds to an HTTP request. It takes in a request (*Request) and writes reply headers and data to the ResponseWriter. It is defined as \r\ntype Handler interface { ServeHTTP(ResponseWriter, *Request) }\r\nListenAndServe is a method attached to type Handler. Hence it is invoked when a Handler interface is used. It is defined as func ListenAndServe(addr string, handler Handler) error\r\nListenAndServe takes an address(the port to listen to) and a value of type Handler. Therefore, when ListenAndServe is passed a value of type Handler, all the methods attached to type Handler can be used.\r\nb.\tTemplates: For serving Client-Side files\r\nTemplates are used to customize data to be present to client interface. They can be used to create personalized webpages. Templates are used with the following two steps:\r\ni.\tParsing the template – This can be done by using ParseFiles(specific array of files) or ParseGlob(entire folder). This should be done during initialization only, and not every time a template is requested by client.\r\nii.\tExecuting the template – Data can be passed to the template in this stage. Templates can take only one variable, but the variable can be of a composite type. The composite data structure can contain map, slice/array, struct, struct of slice, struct of slice of struct, and even functions. Certain global functions such as eq, gt, lt etc can be used inside template as well. All form data, containing user generated information, is read back by the server using post method and request.FormValue(). Get method uses URL to pass data.\r\nc.\tCookies and Sessions: For remembering the current user\r\nCookies are using to maintain state of the current user. A unique ID is generated using UUID and stored in a cookie. UUID generated is so unique that “only after generating 1 billion UUIDs every second for approximately 100 years would the probability of creating a single duplicate reach 50%”. \r\nWhen a client makes a request to a server at a particular domain, if a cookie has been stored on the client’s computer, then it will be included in the request by the browser. The cookie will then be read by the server and the unique ID will be extracted. The UUID will be used to identity the current user who is making the request. \r\nMain features of cookies are: \r\n•\tCookies are domain specific; every domain will create a cookie for itself that will be stored on the client’s computer.\r\n•\tCookies are used to record user activity or to contain state data of user such as User ID, Cart contents, linked clicked etc.\r\n•\tCookies are encrypted during transport from server to client.\r\nThis process of using cookies and storing user data on server is called a session. It is how webpages can ‘know’ information about a user, even after they close the browser. Cookies help the server remember.\r\n\tError handling and Concurrency mechanism incorporated :\r\n \t Error handling mechanism \r\n\r\nUser inputs from are restricted to a certain level inside the form using html “required” fields and type for specifying the type of input needed. Any errors in login or incorrect user inputs are handled by generating an appropriate message using http.Error. All other errors generated within the system create an error message that will be flagged using fmt.Println.\r\n \t Tolerance to potential panics \r\n\r\nAs the code handles most of the errors and flags errors during the execution such as for type conversions and time.Time processing, the only panic scenarios arise while reading the .csv files. If the .csv files are corrupted, or cannot be opened, then there is no way that the application can proceed and is a cause for panic. Panic is handled in this case, and a recover function is deferred at the end of the function call in main. Panic results in terminating the program.\r\n \t Concurrency using mutex \r\n\r\nThe functions that take most amount of CPU time are functions operating on the linked list and BST data structures. That is why these three functions are executed concurrently, drastically reducing processing time when multiple CPUs are available. Since the functions access critical data structures, these data structures are locked using mutex, so that no other function can access and modify them while the goroutines are in progress. Mutex is added to linked data structure, and each BST data structure for individually locking each structure.\r\nHere are the scenarios when the data structures are accessed concurrently :\r\n1.\tDuring the start of the application, when the personData.csv file is being read\r\n\tThe profile information of each registered user is read from csv file and added one by one to the linked list\r\n\tThe usernames obtained from the csv file is also added into the BST data structure for usernames\r\n\tThe identification numbers obtained from the csv file is also added into the BST data structure for identification numbers\r\n2.\tDuring the registration process, when user provides unique username, identification and other required data for registration process\r\n\tThe profile information of the user to be registered is added to the end of the linked list\r\n\tThe username of the user to be registered in inserted in the username BST data structure\r\n\tThe identification of the user to be registered in inserted in the identification BST data structure\r\n3.\tDuring the user deletion process by admin\r\n\tThe username of the user to be deleted in removed from the username BST data structure\r\n\tThe identification of the user to be deleted in removed from the identification BST data structure\r\n4.\tDuring admin or user logout\r\n\tThe updated profile information of all users is stored back into the person csv file.\r\n\tThe updated appointment information is stored back into the appointment csv file.\r\n\r\nUser/Admin Login information for testing : \r\nUsername\tPassword\tCondition\r\nMJ2020\t123456\tFirst vaccine done, second vaccine missed date, 28 days elapsed after first vaccination\r\nj123c\tabcdefg\tBoth vaccinations done, complete\r\nladygaga\tpassword\tNot yet 70 years, does not qualify for vaccination\r\nharrypotter\t123456\tFirst vaccination done on 2021-03-01, second vaccination not yet done.\r\npikachu\tpikapika\tNo appointments taken\r\nadmin\tgoisthebest\tFor logging into admin account\r\n\r\n \r\n \t The following pages are adapted from the Go Advanced Assignment document. This is not part of the assignment requirements, but are included/updated in order to maintain continuity with advanced assignment and provide additional information if reader needs further details.\r\n\r\n6.\tFeatures and Functions – Main Menu \r\n \t COVID-19 Vaccination Appointment System - Main Menu: \r\n\r\nThe COVID-19 Vaccination Appointment System Main Menu offers two main choices: Registration and Login\r\n1.\tUser Registration : \r\nRegistration option allows any user with a unique identification number to register to the system. If the identification number of the user is already present in the system, the user cannot register again. Every user also needs a unique username, which is checked within the system before registration can proceed.\r\nFields for Registration are:\r\n1.\tIdentification (NRIC/FIN/Passport number) – Required, must be unique, first character must be an alphabet \r\n2.\tUsername – Required, must be unique, first letter must be an alphabet. \r\n3.\tPassword – Required, is encrypted before storing.\r\n4.\tFirst Name – Required, first letter must be an alphabet.\r\n5.\tLast Name – Required, first letter must be an alphabet.\r\n6.\tPhone number – Required and must be all digits.\r\n7.\tDate of birth – Required and must be in YYYY-MM-DD format\r\n8.\tEmail address – Optional, user can press enter to skip this field, should be one single string without spaces, first letter must be an alphabet.\r\n9.\tAddress – Optional, user can press enter to skip this field. Address can be composed of multiple strings/words, followed by enter.\r\n2.\tUser Login : \r\nOnce registration is successful, user can login into the system with the unique username and password. After successful login, the user login menu will be displayed for the user to view/edit appointments and view profile information. The COVID-19 Vaccination Appointment System post login Menu offers a different set of choices for User and Admin Login.\r\n3.\tAdmin Login : \r\nAdmin can login with the admin name: “admin”. Password for admin login is “goisthebest”. This is hardcoded in the system. After successful login, the admin login menu will be displayed for the admin to view/delete users and view/add appointments. The COVID-19 Vaccination Appointment System Post Login Menu offers a different set of choices for User and Admin Login. Admin login can be done using the same Login page as User Login.\r\n4.\tLogout : \r\nThis will logout the user or admin and all changes made to user and appointments will be stored in the two csv files.\r\n\r\n \r\n7.\tFeatures and Functions – Post Login Menu – User \r\n \t COVID-19 Vaccination Appointment System – Post Login Menu: User Login\r\n\r\nThe COVID-19 Vaccination Appointment System Post Login Menu offers a different set of choices for User and Admin Login \r\nUser Login : \r\nAfter the user successfully completes log in, user records are accessed by the system. The user can then view the vaccinations appointments if any, make/delete appointments and view the profile information. Upon logout, updated user information is stored back into the CSV file.\r\n \t Option 1: View appointments \r\n\r\nUser can view appointments and make/delete appointments only when he/she meets the age requirements. Currently only users aged 70 years and above are qualified to receive vaccination. Hence, users who do not meet this criterion will not be allowed to access the view/make/delete appointments menu. All users will be allowed to view their profile information, and logout.\r\n \t Option 2: Make new appointments\r\n\r\nIf user chooses to make new appointments, a list of available dates and times are displayed. The list of available dates and time is read during initialization from the freeappointments.csv file. Currently only 15 dates are displayed at a time, all of which are after today’s date/time (the date/time the application is being run). That means, any appointments before today’s date/time (i.e. the date/time the application is run) are not displayed. Hence appointments are always made for a future date/time. \r\nIf first appointment has not been made, a list of available dates/times for first appointment will be displayed – upto 15 only. The user can then choose the radio option for the date/time to book first appointment. All changes made with this option will be saved to freeappointments.csv upon logout. After choosing the radio option, the user can click the confirm button to fix the appointment. If the user clicks on cancel button, no changes will be made.\t\r\nThe user can then make new appointment for second vaccination. In addition to being a date/time after today’s date/time, the second vaccination date/time also needs to be 21-28 days after the first vaccination date. Hence the first vaccination appointment must be done first, and the second vaccination date/time is chosen such that it meets the 21-28 days criterion. If there are no appointments dates/times available which meet this criterion, user can delete first appointment, and make appointments at a later date. \r\nIf the user misses his/her second vaccination appointment, he/she can still make a new appointment for second vaccination provided they are available in list of free appointments and are 21-28 days after the date the first vaccination has been administered. Since it is unclear whether vaccinations are effective if the two doses are more than 21-28 days apart, any user who is unable to secure a second vaccination appointment after being given the first vaccination must contact MOH immediately for further advice and instructions.\r\n\r\n\r\n \t Option 3: Delete appointments\r\n\r\nDepending on whether the user has made first appointment or both appointments, or has missed first or second or both appointments, the user will be given a chance to delete appointments before making new appointments. The user profile is checked, and suggestions are made depending on the date/time of appointments and whether vaccination has been done or is still pending for these dates. If user has successfully taken both first and second doses of the vaccination, then he/she will not be able to delete any appointments, and no further action will be required. All changes made with this option will be saved to freeappointments.csv upon logout.\r\nAlternatively, user can delete first appointment, before making second appointment, in case no second vaccination date is available, or user decides to choose another date for vaccination.\r\nIf user has missed his/her first appointment date, although second appointment date is in the future, user must delete both appointments first before making fresh first and second appointments.\r\nIf user has taken his/her first vaccination dose, but missed the second appointment date, user can still delete second vaccination appointment, and make new one if first vaccination date has not been taken more than 28 days before today’s date/time (i.e. the date/time the application is executed). \r\nDue to some unforeseen reasons, if the user misses his/her second vaccination appointment, after taking first vaccination, and is unable to reschedule a new second appointment in time, the system will not be able to make a new appointment for him/her if 28 days have already elapsed after the first vaccine administration. The user is instructed to contact MOH immediately.\r\n \t Option 4: View Your Profile Information\r\n\r\nAll users can view their profile information with this option. \r\nThe following items of the user profile are displayed:\r\n1.\tFirst name\r\n2.\tLast name\r\n3.\tUsername – unique\r\n4.\tIdentification – Unique \r\n5.\tDate of Birth – YYYY-MM-DD format\r\n6.\tPhone \r\n7.\tEmail\r\n8.\tAddress\r\n9.\tVaccination Qualification – Calculated as per date of birth, only users above 70 years old qualify as of now \r\n \t Option 5: Logout\r\n\r\nUser can logout after he/she finishes using the system. All his profile data will be stored in personData.csv to be retrieved again after successful login. Any changes in appointments are also stored to freeappointments.csv\r\n  \r\n8.\tFeatures and Functions – Post Login Menu - Admin\r\n \t COVID-19 Vaccination Appointment System – Post Login Menu: Admin Login\r\n\r\nAdmin Login : \r\nAfter admin successfully completes log in, he/she can make administrative changes to the system. \r\n \t Option 1: List all users \r\n\r\nAdmin can view the list of all users that have successfully registered to the system. \r\n \t Option 2: Delete a user\r\n\r\nAdmin can delete a particular user by choosing the radio button in front of the user to be deleted. The admin will then click on submit button to initiate deletion of user details. The user information will be deleted from the linked list array as well as from both Binary Search Trees.\r\n \t Option 3: View available appointments by date\r\n\r\nAdmin can view all the dates for which appointments are present in the system. The times for each appointment are displayed horizontally in front of each date for brevity. Currently all the dates which have atleast one free slot available are displayed. Only the appointment dates which are after today’s date/time (when the application is being executed) are displayed. \r\n \t Option 4: Add available appointments for a date\r\n\r\nThe admin can add appointment time slots for specific dates to the system. Each slot is for a duration of 15 minutes for each appointment. The admin can add appointment times in one shot for a particular date, starting from 9am upto 6 pm, with 15 min for each appointment. That means first appointment will be at 09:00:00, second appointment will be at 09:15:00 and so on, with last appointment being at 17:45:00. Appointments are added in chronological order and added in correct position as per value. So all the appointments are always sorted in the appointment array.\r\n \t Option 5: Logout\r\n\r\nAdmin can logout after he/she finishes using the system. All changes made such as deleted usernames, and updated appointments will be stored in personData.csv, and freeappointments.csv.\r\n\r\n\r\n\r\nData Structures – Linked List, Binary Search Tree, Array Slice\r\n\r\nLinked List :\r\nThe primary data structure for storing the data for each user is a linked list. The linked list can store any number of users, in any sequence, and with each user information stored together in a struct. For this application a single linked list is used, instead of any other data structure for the following reasons :\r\n•\tThe size of the linked list can grow according to the need of the application, and hence will not waste storage as the demand for vaccination registration increases.\r\n•\tThe linked list will be created with user data from the personData.csv when application starts. This is done concurrently using Go routines, along with updating the BST data structures for username and identification. This ensures that if multiple CPUs are available, the time taken to create these data structures is reduced and efficiently done.\r\n•\tThe linked list will be traversed only while accessing the user records after successful login, and while storing the user data back into the personData.csv. These are not time critical operations, and although login/logout time might be adversely affected with increase in number of users, the appointment system function remain unaffected and the storage benefits are immensely huge.\r\n•\tThe users can also be deleted by the admin, which is a simple operation with a linked list involving updating of pointers, with no need to shift items or requiring any additional processing. The updated linked list will then be stored into the personData.csv at the time of logout. Because the BST data structures for username and identification are only required at the time of registration, these data structures don’t need to be updated as of now when user is deleted.\r\n•\tUsing arrays, maps, stacks, queues or BST to store user data doesn’t provide any additional benefits, and in fact can be detrimental to making the application sturdy, time-effective, and will involve more memory and will be costly for processing. Hence linked list is the best option for this type of data.\r\nBinary Search Tree :\r\nThe secondary data structure used for storing the username and identification number is a Binary Search Tree. This data structure is used during the registration phase and provide immense savings in time. The reasons for using a binary search tree are :\r\n•\tAs the COVID-19 vaccination system is critical to maintaining the health and well-being of the country, by administering correct and timely dosage to residents, and avoiding any mistakes of double or missed dosage, the identification number must be unique for registering to the system. \r\n•\tThis requires a quick search among the user database, to ensure every citizen registers only once with their unique identification number. The username is used to access the system, hence, it also needs to be unique.\r\n•\tThe Binary Search Tree can quickly search through a list of identification numbers and usernames, without having the need to access the linked list over and over again.\r\n•\tTwo BST data structures are used, one for identification number, and other for username.\r\n•\tThe two BST structures are created from the personData.csv when application starts. They are created concurrently along with the creation of the linked list for storing person data. This ensure the application can start and become operational fast. The BST is already sorted at the time of creation from personData.csv.\r\n•\tDuring registration, the identification number is first searched in the BST for identification, and if not found, then only registration can proceed. The username is then searched in the BST for username, and if not found, then only the rest of the registration can proceed.\r\n•\tAdding a new username or identification to the BST is done after successful registration, so that more than one registration can be done at once with the main menu. \r\nArray Slice for time.Time :\r\nAll appointments are made with a date in YYYY-MM-DD format and exact time in hh:mm:ss format. All available appointments with specific date and time is read from the freeappointments.csv file. First column contains the date and second column contains the time. The data and time are combined to form a single time,Time type variable. This is then appended to an array slice of time.Time. Reasons for using an array slice are:\r\n•\tAn array slice is used to store the appointments, as the array need to be changed during the execution of the program. \r\n•\tFor user login: \r\no\tThe user can make new appointments for first and second vaccination. These entries will then be added to the user’s profile and deleted from the appointment array slice.\r\no\tIf user deletes previously made appointments, these entries will be added back into the appointment array slice to be used by any other user/same user if the date is after today’s date/time.\r\no\tAfter user logs out of the system, the freeappointments.csv file will be updated, with only free appointments available after today’s date stored back as date-column 1 and time-column 2\r\n•\tFor admin login: \r\no\tThe admin can add more dates to the array slice. This can be done very easily by updating the array slice, and appending dates with time ranging from 09:00 hrs to 17:45 hrs which is from 9 am upto 5:45 pm with each appointment being for 15 min.\r\no\tThis will then be written back into the freeappointments.csv file when admin logs out.\r\n•\tAn array slice is chosen as it can expand as per dates added. Deleting a single date/time from an array is not so intensive in terms of computing time. Also it allows for faster access to appointment dates, faster search, faster update, and faster execution of program after login has been done.\r\n\t\r\nAlgorithms – Search, Sort and Recursive\r\n\r\nSearch Algorithm with Linked List : \r\nThe linked list data structure stores all the data pertaining to each user, such as first and last name, username and password, identification number, date of birth for deciding if user meets age criteria, phone number for easy contact, and optional email id and address. It also stores the vaccination information, qualification, date and time and if vaccination has been done or not for both first and second doses. Creating a linked list containing all user’s data is done concurrently to save time by making use of multiple CPUs. Nodes are added \r\nOn login, the linked list needs to be searched to access all user information. This requires a search algorithm, that traverses the linked list one node at a time. Worst case complexity of this algorithm is O(n), for searching a user that might be present at the very end of the linked list. \r\nSearch algorithm is also required while deleting the user profile, as done with admin login. The worst case complexity is still O(n), when the user to be deleted is at the end of the linked list.\r\nThe linked list is not sorted, hence no sort algorithm is used.\r\nSearch Algorithm with BST :\r\nThe BST data structure needs to be searched during the registration process. Searching through a Binary Search Tree is a simple task, as the BST is already sorted at the time of creation, with items from the personData.csv, or when a new username or identification number is added. Searching is done by comparing if each root node is smaller, bigger or equal to the username/identification string. If root bigger, then the search continues on the left of the tree. If the root is smaller, the search continues on the right of the tree. If root is equal to the string being compared then the search is over and the string is found. If string is not found after reaching the end of the tree, then the username or identification number is unique, and registration can continue. Search algorithm for a BST needs a recursive algorithm, as the BST tree is not balanced, and traversal iterations to reach the leaf nodes can vary depending on each item to be searched.\r\nSort Algorithm with BST :\r\nThe BST data structure is sorted at the time of creation, with items from the personData.csv, or when a new username or identification number is added. Inserting an item into the BST is done concurrently to save time by making use of multiple CPUs. If an item to be added is less than the root node, then the item must be added to the left of the root node. If an item to be added is more than the root node, then the item must be added to the right of the root node. Items can never be the same as root node, as all usernames and identification numbers are unique. Sorting is done during insertion itself and needs a recursive algorithm, as the BST tree is not balanced, and traversal iterations can vary depending on each item to be inserted.\r\n \t Additional feature – Encryption of all passwords \r\n\r\nEncryption:\r\nFor providing higher security for protecting personal information, no passwords are stored in the linked list or in the csv file. All passwords are encrypted with \"golang.org/x/crypto/bcrypt\" package, which offers two functions for login purposes.\r\n1.\tbcrypt.GenerateFromPassword – This encrypts the password into bytes, which can then be stored as a string\r\n2.\tbcrypt.CompareHashAndPassword – This compares the encrypted password stored with the database, with the password given by user or admin during login process. If passwords match, then login will be successful.\r\n\r\n \t Significant Constants – defined in main function\r\n\r\nConstants:\r\nConstants help to make the code more readable and resuable. The following constants are declared in the main.go file, and can be changed as per changes in application requirements.\r\n1.\tageQualification = 70 \r\n\tCurrently age criteria for vaccination is 70 years and above.\r\n2.\tnumofApptsShown = 15\r\n\tCurrently only 15 unique appointment dates/time are shown to user for making new appointments for readability purposes\r\n3.\tadminName = “admin” \r\n\tAdmin name is hardcoded to be admin\r\n\tAdmin password is encrypted, so adminPW shows the encrypted string.\r\n\tGood luck figuring out the password after encryption. Okay, its “goisthebest”\r\n4.\tfilePath = “./”\r\n\tThis is used to read the csv files, so changing it will result in panic\r\n5.\tcsvPath = “/csv”\r\n\tThis is the directory structure under filePath, where csv files are stored. Changing this will result in panic.\r\n\tCurrently csv files are overwritten after every update. Backups and file management is required if past data needs to be stored.\r\n6.\thtmlPath = “/html”\r\n\tThis is the directory structure under filePath, where go html templates are stored. Changing this will result in panic.\r\n7.\tapptFileName = “freeappointments.csv”\r\n\tThis is the CSV file that stores all free appointment dates and time.\r\n\tColumn 1 : Date in YYYY-MM-DD format\r\n\tColumn 2 : Time in hh:mm:ss format\r\n8.\tpersonDataFileName = “personData.csv”\r\n\tThis is the csv file that stores each persons data. Data is stored in the same order as the struct for each person in linked list data structure.\r\n \t Final conclusion\r\n\r\nThe COVID-19 pandemic, also known as the coronavirus pandemic, is an ongoing pandemic of coronavirus disease 2019 (COVID-19). The responses to the pandemic have resulted in global social and economic disruption, including the largest global recession since the Great Depression. COVID-19 pandemic response remains till date a war against an unknown and invisible virus. \r\nMany countries have implemented phased distribution plans for vaccines that prioritize those at highest risk of complications, such as the elderly and those at high risk of exposure and transmission, such as healthcare workers.\r\nWith systems such as COVID-19 Vaccination Appointment System, the most basic requirements for administering vaccines can be addressed. Registration, login and appointments can be done easily and can be deployed for large scale usage with additional appointment/information features added as required. \r\nOnly with larger international cooperation, reduced human footprints, increased personal hygiene and safe distancing measures can we hope to defeat this global pandemic.\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpallavi%2Fcovidvacappt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpallavi%2Fcovidvacappt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpallavi%2Fcovidvacappt/lists"}