Wallo is a financial education platform that allows users to learn about personal finance, investing, and other financial topics. This repository contains the code for the Wallo backend. The backend is responsible for serving the course content to the frontend, as well as handling user authentication and other backend operations.
- Introduction
- Setting up the environment
- Running the application
- Creating new course content
- Publishing courses to users
- Install the required packages by running the following command:
yarn install
- Create a
config/.env.dev
andconfig/.env.prod
file in the root directory. These files should match the entries of theconfig/.env.schema
file.
Run the following command to start the application in development mode:
yarn dev
Tip
Press 'C' at any time to clear the console.
Run the following command to create a new course.
yarn create-course
- You will see that a 'content' folder has been created in the root directory with a new course folder inside of it. The course folder is
formatted as
<course_name>-<course_id>
. - Inside the course folder, you will find a
course.json
file. This file contains the course data that you can edit. You will also find alessons.json
file. This file contains every lesson that belongs to the course. - Finally, each lesson has a
content
attribute that allows for an array of strings. These strings are relative paths to the markdown files that contain the lesson content. These markdown files must be placed in thecontent
folder.
Note
The course will NOT be published to the database/users until you run the yarn publish-courses:dev/prod
command. You can read more about this below.
- Any markdown file in content//content can be used as a 'slide' in a lesson. Each lesson takes an array of markdown files that will be displayed.
- Markdown files can use any formatting that is supported by the markdown parser. This includes headers, lists, images, and more.
- We offer a few special syntaxes that are non-standard markdown. These are
{definition: <term> | <definition>}
: This will create underlined text, that, when clicked, will show the definition.{info: <text>}
: This will create a blue box with the text inside of it.{warning: <text>}
: This will create a red box with the text inside of it.
Run one of the two following commands (depending on your environment) to publish the courses to the database/users.
yarn publish-courses:dev
yarn publish-courses:prod
This will create the documents for courses and lessons if they do not already exist in the database. If they do exist, the documents will be updated with the new course data.
Warning
Do NOT change the _id
of a course or lesson once it exists in the database. This can cause data loss and other issues. Similarly, do NOT change the folder name of a course (only the ID part of the folder name) after it has been published to the database.