diff --git a/README.md b/README.md index 8682baa..214a173 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ To exit press Ctrl+C Make sure that you are inside the project directory, where `docker-compose.yaml` file is present. Now, building and running the application server container and mongodb container using `docker-compose` : ``` -Building or fetching the necessary images and later, creating and starting containers for the application +Building or fetching the nr3ecessary images and later, creating and starting containers for the application $ docker-compose up -d Go to http://localhost:5000 with any of browsers and DONE !! diff --git a/app.py b/app.py index 2639930..5b896a6 100644 --- a/app.py +++ b/app.py @@ -11,7 +11,7 @@ todos = db.todo #Select the collection app = Flask(__name__) -title = "TODO with Flask" +title = "TODO with RPL UAS" heading = "ToDo Reminder" #modify=ObjectId() diff --git a/classdiagram.puml b/classdiagram.puml new file mode 100644 index 0000000..626915f --- /dev/null +++ b/classdiagram.puml @@ -0,0 +1,36 @@ +@startuml +title Class Diagram - Flask ToDo App + +class TodoApp { + - db: MongoClient + - todos: Collection + - title: str + - heading: str + + + redirect_url() + + lists() + + tasks() + + completed() + + done() + + action() + + remove() + + update() + + action3() + + search() + + about() +} + +class Flask { +} + +class MongoClient { + + insert_one() + + find() + + update_one() + + delete_one() +} + +TodoApp ..> Flask : uses +TodoApp ..> MongoClient : uses + +@enduml diff --git a/docs/uml/class_diagram.png b/docs/uml/class_diagram.png new file mode 100644 index 0000000..362c084 Binary files /dev/null and b/docs/uml/class_diagram.png differ diff --git a/docs/uml/classdiagram.puml b/docs/uml/classdiagram.puml new file mode 100644 index 0000000..626915f --- /dev/null +++ b/docs/uml/classdiagram.puml @@ -0,0 +1,36 @@ +@startuml +title Class Diagram - Flask ToDo App + +class TodoApp { + - db: MongoClient + - todos: Collection + - title: str + - heading: str + + + redirect_url() + + lists() + + tasks() + + completed() + + done() + + action() + + remove() + + update() + + action3() + + search() + + about() +} + +class Flask { +} + +class MongoClient { + + insert_one() + + find() + + update_one() + + delete_one() +} + +TodoApp ..> Flask : uses +TodoApp ..> MongoClient : uses + +@enduml diff --git a/docs/uml/sequencecreateitem.png b/docs/uml/sequencecreateitem.png new file mode 100644 index 0000000..204b30a Binary files /dev/null and b/docs/uml/sequencecreateitem.png differ diff --git a/docs/uml/sequencelogin.png b/docs/uml/sequencelogin.png new file mode 100644 index 0000000..e7a9d71 Binary files /dev/null and b/docs/uml/sequencelogin.png differ diff --git a/plantuml.jar b/plantuml.jar new file mode 100644 index 0000000..0e402de Binary files /dev/null and b/plantuml.jar differ diff --git a/sequencecreateitem.puml b/sequencecreateitem.puml new file mode 100644 index 0000000..fa9ccd2 --- /dev/null +++ b/sequencecreateitem.puml @@ -0,0 +1,21 @@ +@startuml +title Sequence Diagram - Create Task + +actor User +participant Browser +participant FlaskApp +participant MongoDB + +User -> Browser : Isi form to-do +User -> Browser : Klik tombol Submit +Browser -> FlaskApp : POST /action {name, desc, date, pr} +FlaskApp -> MongoDB : todos.insert_one({...}) +MongoDB --> FlaskApp : OK +FlaskApp --> Browser : Redirect ke /list +Browser -> FlaskApp : GET /list +FlaskApp -> MongoDB : todos.find() +MongoDB --> FlaskApp : All tasks +FlaskApp --> Browser : Render index.html +Browser --> User : Tampilkan halaman to-do + +@enduml diff --git a/sequencelogin.puml b/sequencelogin.puml new file mode 100644 index 0000000..bc4bde2 --- /dev/null +++ b/sequencelogin.puml @@ -0,0 +1,16 @@ +@startuml +title Sequence Diagram - Login Flow + +actor User +participant Browser +participant FlaskApp +participant MongoDB + +User -> Browser : Open /uncompleted +Browser -> FlaskApp : GET /uncompleted +FlaskApp -> MongoDB : todos.find({"done": "no"}) +MongoDB --> FlaskApp : List of uncompleted tasks +FlaskApp --> Browser : Render index.html with tasks +Browser --> User : Tampilkan halaman to-do + +@enduml