Introduction

During 2021, in addition to the visualiser, we had discussed the usefulness of integrating learning resources specifically created for COMP1511/COMP2521/COMP**** such as:

A few other motivations for introducing these integrated learning resources include:

How to Implement

The current setup is problematic because:

A better setup this doc proposes involves:

All-in-all, the above approach simplifies both content creation and quality assurance. To contribute a new page of content, authors would just create a new .mdx file and go through the same pull request process.

Note: we should delete the entire backend from 2021 if we take this approach.

Concerns:

Example Workflow

This is an example of how a content creator might make a new contribution to Structs.sh.

Suppose you want to write a page to introduce AVL-trees. You would:

  1. Create a new file at the path: Structs.sh/content/trees/AVL-tree.mdx.

  2. Write the Markdown/LaTeX/JSX source code for that page. Eg.

    import SomeComponent from 'components/SomeComponent'
    
    # AVL Trees
    
    An AVL tree is ... 
    Insertion has time complexity $O(\log{n})$.
    
    <SomeComponent />
    
    ... and so on.
  3. Open a PR and get it merged to the production branch.

Our build process would then run the MDX bundler to convert this .mdx file into a regular React component that can be rendered wherever we’ve chosen to render it on the site.