Skip to content

Data flow

Thomas Herzog edited this page Sep 4, 2021 · 2 revisions

Data flow

understanding were all the data is coming from and how it moves through through the C0D3.com app

The Data

  • Lesson Material - currently hosted on notion.io docs *Also have unlinked mdx versions
  • Lessons - metadata for each lesson (js0, js1 , js2 ...)
  • Challenges - the instructions for each challenge (ie js0/problem 1)
  • Submissions - users answers to challenge questions with status (open/passed/needMoreWork,overwritten)
  • Comment - a message connected to a submission review
  • User - user identification information (name, id, email, ect)
  • UserLesson - track when user passed lesson and star status
  • Star - tracks stars given to mentors by students
  • Session - User, submissions, lessonStatus (UserLesson)
  • Alerts - admin added notification messages for all users

Sources

We currently have two sources of data in the code app. One is the github repo with all the mdx document pages and the other is the database with all the user submitted data. Below is a rough breakdown of all the layers of abstraction along the way.

  1. Github repo <- stores all full page lesson docs and extra learning docs (along with all the app source code)

    • MDX - An extension to markdown that allows react jsx components to be embedded in markdown documents
      • @mdx-js/loader - webpack plugin that converts mdx to jsx pages at build time
  2. PostgreSQL Database - Stores all user generated data, lesson material and challenge material

    • Digitalocean - hosts all our docker images
      • Docker - lightweight, portable, self-sufficient container
        • caprover - manages our docker containers
          • Prisma - ORM (Object–relational mapping) package for node/typescript apps
            • schema.prisma - prisma generated source of truth for all database stored data
              • graphQL - Query Language used to access the database data
Clone this wiki locally