Storage for coding questions

I am building a platform to solve coding questions (only python) and I started by storing the questions in the file system of the backend so that they could be easy to edit but I do not know how to move forward with this. I am already having trouble managing this. The current structure looks like this: questions ├── Add Nums │ ├── boilerplate.json │ ├── cases.py │ ├── hint.md │ ├── question.md │ └── solution.md ├── Muliply Nums │ ├── boilerplate.json │ ├── cases.py │ ├── hint.md │ ├── question.md │ └── solution.md └── etc ... │ ... And the files look like this: boilerplate.json (This is the function that the questions will evaluate and it used to create the boiler plate code (Think of the boiler plate code you see when you open Leetcode )) { "function_name": "add", "function_args": ["x: int", "y: int"] } cases.py (This is use when evaluating the results of a submission. The keys are the arguments and the value is the expected result. Since all questions use python the native format helps.) cases = {(1, 2): 3, (2, 3): 5, (13, 6): 19} And the markdown files are just rich text. It is important that these files remain in markdown format as my front-end has a markdown parser. I have no idea on how to represent this in a database. I am also concerned about how hard it would be to edit these questions when using a database. Please help me improve this architecture. I am not sure if these kind of questions are allowed here. If not, some guidance on where to go would be nice.

May 20, 2025 - 18:30
 0

I am building a platform to solve coding questions (only python) and I started by storing the questions in the file system of the backend so that they could be easy to edit but I do not know how to move forward with this. I am already having trouble managing this.

The current structure looks like this:

questions
├── Add Nums
│   ├── boilerplate.json
│   ├── cases.py
│   ├── hint.md
│   ├── question.md
│   └── solution.md
├── Muliply Nums
│   ├── boilerplate.json
│   ├── cases.py
│   ├── hint.md
│   ├── question.md
│   └── solution.md
└── etc ...
│ ...

And the files look like this:

boilerplate.json (This is the function that the questions will evaluate and it used to create the boiler plate code (Think of the boiler plate code you see when you open Leetcode ))

{
  "function_name": "add",
  "function_args": ["x: int", "y: int"]
}

cases.py (This is use when evaluating the results of a submission. The keys are the arguments and the value is the expected result. Since all questions use python the native format helps.)

cases = {(1, 2): 3, (2, 3): 5, (13, 6): 19}

And the markdown files are just rich text. It is important that these files remain in markdown format as my front-end has a markdown parser.

I have no idea on how to represent this in a database. I am also concerned about how hard it would be to edit these questions when using a database.

Please help me improve this architecture. I am not sure if these kind of questions are allowed here. If not, some guidance on where to go would be nice.