diff --git a/docs/package-structure.md b/docs/package-structure.md new file mode 100644 index 0000000..c88ff85 --- /dev/null +++ b/docs/package-structure.md @@ -0,0 +1,30 @@ +## API package structure + +The api can be broken down into 4 distinct parts: +1. The logger +2. The api +3. The ECNQueue +4. The initialization scripts + +### Logger + +The logger is its own subpackage and script which is used for outputting log information to both the terminal and a specified file. The logger uses the logging module to create log outputs with specified format. + +### API + +The api is the link between the ECNQueue and the frontend. The api continuously runs in the background, and takes urls matching a specified format from the front end and translates those as functions to be executed in the ECNQueue. The api uses flask and flask restful to do this + +### ECNQueue + +The ECNQueue subpackage is a parser in the backend for all of the items in stored in the queue directory. The ECNQueue parses the text documents in the queue and outputs structured json, which is then transfered to the fronted via the api. + +### The initialization scripts + +The initialization scripts take in user input (either via command line or wrapper script) and initialize the logger, ECNQueue, and API according to the user input. After initializing and implementing all of the necessary configurations, the initialization scripts start the api. These scripts use argparse to get user input and subprocess to launch the api via gunicorn. While not its own subpackage, the scripts are located directly in the `webqueue2_api` directory. + + +## Structure + +```none + +``` \ No newline at end of file