Background

The Sparks & Smiles programme is a social impact programme run by GIC that aims to empower Singaporean youths from high-needs households to be change-makers who want to pay it forward in their own communities. Students are trained by experienced social service practitioners, engage with GIC senior leaders and receive a grant to support their studies. Each awardee commits 25 hours to community service, particularly mentoring children and youth.

The Sparks system is a workflow management system that alleviates the administrative overhead of running the GIC Sparks & Smiles programme. Prior to the system being built, charity partners had to keep track of the progress of each of their mentees manually. With the Sparks system, all of the data for the Sparks & Smiles programme is centralised in one place. In addition, it also makes the workflow of the Sparks & Smiles program seamless, offering email notifications and reminders to the relevant parties, be it students, school staff, or volunteer staff, as actions are carried out within the system.

Key Contributions

Rewriting the Backend in Go

The main focus for the summer was to rewrite the Ruby on Rails backend for the Sparks system entirely in Go. This was done for the following benefits:

  1. Performance

    Because Go is a compiled language, its execution is much faster than Ruby which has to be interpreted at run-time.

  2. Scalability

    The standard Go networking library provides out-of-the-box support for concurrency. This allows the application to process requests made by many users across multiple clients simultaneously. In contrast, the Sparks Ruby on Rails system is single-threaded as Ruby makes use of a global interpreter lock to prevent threads from running concurrently and running into race conditions.

  3. Fewer Bugs

    Unlike Ruby which is a dynamically typed language, Go is statically typed. This allows us to eliminate an entire class of errors as incorrectly-typed variables are caught at compile-time. In comparison, such errors only surface when the affected parts of the code are executed at run-time for Ruby.

  4. Alignment to Cornerstone

    CVWO’s long term vision involves supporting many clients through a multi-tenancy system, Cornerstone. The new Sparks backend will be one of the first tenants running on Cornerstone’s infrastructure. This move allows CVWO to standardise its software stack and offer software services to VWOs both big and small. For Sparks itself, this move comes with the benefit of a more robust and flexible system, which will be more maintainable and better able to handle new requirements in the future.

Refactoring the Frontend

In preparation for the move over to Cornerstone’s infrastructure, our team performed a major refactor of the frontend to bring it more in line with Cornerstone’s shared frontend. Even though Sparks’ frontend is currently independent from Cornerstone’s, in the future, should there be a move to merge with Cornerstone’s frontend, this refactor will have made migration much easier.

In the process of refactoring, our team has updated crucial dependencies and standarised any inconsistencies that were present in code. We have also updated the API layer to take advantage of new pagination and filtering features implemented in the backend rewrite. Overall, this has resulted in significant performance gains across the board, reducing loading times as the fetching of long lists of resources can now be deferred.

Onboarding A Good Space

The Sparks system will be welcoming a new tenant at the end of 2023, A Good Space (AGS), which is the charity partner in charge of ITE students under the Sparks programme. AGS had been previously managing the programme with a third-party provider, and will be moving to join Beyond Social Services on the Sparks system, sharing common infrastructure and workflows.

In efforts to better support AGS, we worked to implement a programme registration workflow that would allow students to sign up for programmes, and introduced more details for programmes to aid students in making their choice. Before, programmes were very minimal entities that were only assignable to students by their supervisors. In the new workflow, students are provided with a new interface to explore and choose the programmes that they wanted to participate in. This addition allows AGS to retain the workflow that they were used to from the previous system, and adds additional utility for Beyond, our existing tenant.

In the process of developing the workflow, our team faced various design challenges in the code and infrastructure we needed to implement. There were various data schema changes and ad-hoc implementations done to support the features that we wanted to implement. All this was done while our team was rewriting the backend in Go, which presented a unique challenge in working within the confines of the existing system. Overall, the development of this feature represented a valuable learning experience in tackling technically challenging problems.

Bug Fixes and Other Enhancements

Naturally, rewriting and refactoring comes with many issues and bugs. In addition to bugs found in development, we also resolved all outstanding bugs reported by Beyond Social Services and GIC, and added minor enhancements to improve the workflow of the system, such as:

  • Moving to a Policy-Based Access Control system, allowing us to better secure the system with more fine-grained control
  • The ability to export form responses for further data processing
  • Pagination and filtering options for many tables, improving load times
  • More consistent error messages

Screenshots

Project Team

Sparks 2023 Team
  • Chrystal Quek Wan Qi (Project Lead, Year 4)
  • Tu Jia En (Deputy Project Lead, Year 1)
  • Tan Jing Xu Derek (Deputy Project Lead, Year 1)
  • Ng Rui Jie, Solomon (Developer, Year 1)
  • Jin Xunze (Developer, Year 1)
  • Ong Wei Hong (Developer, Year 1)

Afterthoughts

I am grateful for this opportunity to give back to CVWO, and the training that’s has prepared me for future management roles.

– Chrystal

CVWO was a really awesome learning experience that allowed me to explore the many different facets of software engineering. It not only taught me a lot but also got me excited about learning more in the future.

– Jia En

CVWO has been a great learning opportunity!

– Derek

CVWO has been challenging and educationally rewarding. Apart from enhancing technical skills, CVWO has also enabled me to understand Software Engineering principles and tradeoffs better, learn to communicate and work in a development team, and design systems that match business workflows better. Having brilliant and helpful teammates enabled me to learn better and ask questions when help was needed.

– Solomon

CVWO was a fulfilling experience, I am extremely grateful that I was given an opportunity to partake in this programme :)

– Xunze

There’s never a dull moment in CVWO!

– Wei Hong

We would like to express our heartfelt gratitude to the following people who have been influential and supportive during our project:

  • Prof Ben Leong (NUS) for his advice and guidance.
  • GIC for their generous support of the CVWO programme.
  • Chiu Ying Yik (Beyond Social Services), Sylvia Phua (GIC), Stephanie Chee (GIC), Vincent Ng (A Good Space), and Ningpei Chua (A Good Space) for their co-operation and support throughout the GIC Sparks & Smiles project.