This is a custom task system for managing hardward-related tasks among a group of users. Features include:
- Searching for tasks
- Adding new tasks
- Dynamically loading tasks
- Updating task list
- Responsive design
- REST compliant
To compile, you must be within a docker container. To first pull the docker container to update/install it onto your host system, use the following command: docker pull sebouellette/webserver:shoppingcart
To enter the docker container, find startup.txt in the Shared folder. This file contains the commands to start the docker instance on different types of terminals.
Once you are within the docker container terminal, enter the /Shared
directory using the cd
command. Here, you can run the ./recompile.sh
command to recompile the project. The executable will be placed in the newly created build
folder. If a build folder already exists, it will be deleted and a new one will be created while compiling.
If you only wish to compile without clearing out the current build, you can cd build
, then use make
to compile changes quickly.
To use the compiled executable, simply start it using the following comamnd /Shared/build/tasksystem
.
<hello>
-- Text surrounded by <> is a variable. Do not include <> when using the API.
?foobar?
-- Text surrounded by ?? is content that is to be decided later in development.
GET
http://localhost:8080/
Result: text/html
GET
/help
Result: text/html
GET
/editor
Querystring Parameters: ?id=<task_id>
Result: text/html
GET
/search
Querystring Parameters: ?key=<search_string>
Result: application/json
-> The provided search string is matched against the task title and description then returns an array of all matching tasks
GET
/edit
Querystring Parameters: ?id=<task_id>
Result: application/json
PATCH
/edit
Request body format: application/json
{
"id": <task_id> // required field
}
Result: N/A
POST
/add
Request body format: application.json
{
"title": "<task_title>", // required
"description": "<task_description>", // required
"partid": <part_id>, // required
"assigned": <assigned_user_id>, // required
}
Result: N/A
If a task with this partid and assigned user id already exists, status code 409 Conflict
will be returned. When this result is given, the client must instead perform a PUT request to /add to replace the existing task.
PUT
/add
Request body format: application.json
{
"title": "<task_title>", // required
"description": "<task_description>", // required
"partid": <part_id>, // required
"assigned": <assigned_user_id>, // required
}
Result: N/A
GET
/delete
Querystring Parameters: ?id=<task_id>
Result: N/A
OPTIONS
*