YnTasks is an implementation of a simple TODO list application. The application consists of a backend server, a PostgreSQL database and various clients.
@startuml YnTasks Components
skinparam monochrome true
title <b>Application Components
frame Clients {
component "macOS\nClient"
component "iOS\nClient"
component "Web\nClient"
}
cloud Azure {
component "YnTasks App"
database YnTasks [
<b>YnTasks DB
---
- lists table
---
- tasks table
]
}
@enduml@startuml Sequence
skinparam monochrome true
title <b>Client/Backend Interaction
Client -> App: get api/lists
App -> "YnTasks DB": Query DB
"YnTasks DB" ->> App: [ListModel]
App ->> Client: [ListModel JSON]
@endumlThe macOS and iOS clients are SwiftUI applications located in YnTasksApp/. They share common views and a YnListsViewModel through the YnTasksApp/Shared/ directory, and communicate with the backend via a shared API client (YnTasksAPI).
The server is written using the Vapor framework and uses PostgreSQL for its database.
The application is written using Vapor 4, connecting to a PostgreSQL database.
A list is a way to group a set of tasks together.
- id
- name
- tasks
A task is a single thing to be done. Tasks can belong to a single list.
- id
- title
- notes
- due-date
- priority
- complete
get health: Check application status
get api/lists: Get all lists and their tasksget api/list/listID: Get the tasks forlistIDpost api/lists: Create a new list
get api/tasksget task/taskIDpost api/taskpatch api/task/taskIDdelete api/task/taskID
A PostgreSQL database, named YnTasks is used to store all of the data for the application and contains two tables, lists and tasks.
-
lists
- name
- [tasks]
-
tasks
- title
- priority
- notes
- due date
- complete
A shared Swift library (YnShared) contains Codable models (YnListModel, YnTaskModel) used by both the backend and the client applications.
The server is designed to be deployed as a Docker container. The Docker Compose configuration includes an nginx reverse proxy and Certbot for Let's Encrypt SSL/TLS certificate management.