With this ToDo App you can create and Manage your ToDos. When creating the ToDo you can specify the Label of the Todo and the Priority. Once created The ToDos are shown in a Ordered List in the Application. With the Drag and Drop feature you can rearrange the ToDos. Double Clicking on the Label/Priority of the ToDo, enables the edit mode. All changes gets saved automatically on the Database. When a ToDo gets checked of as done it moves to the Marked as Done ToDo list in the Application.
- Clone the Git-Repository.
git clone https://github.com/FreakeyPlays/todo-app.git
-
Install Docker, Docker-Compose and WSL2.
Docker Desktop -
If
make
is not provided in your OS, install a custom make like GNUmake.
GNUmake -
Create the
.env
File in the Base Directory accoringly to the.env.sample
File.
Read more at: π§° - Environment variables -
Make sure you are in the Root Directory of the Repository, then build and run the Project using make.
make build
make run
- Now you can visit the Application via
http://localhost:8080
.
.
β # The Angular Frontend
βββ /client
β βββ /src
β β βββ /app
| | | | # Interfaces of different Objects
β β | βββ /_interface
| | | | βββ ...
| | | |
| | | | # Connection to the Database
β β | βββ /_service
| | | | βββ ...
| | | |
| | | | # Components witch get used more than once
β β | βββ /_template
| | | | βββ ...
| | | |
| | | | # Bigger Components like whole sites
| | | βββ /...(components)
| | | | βββ ...
| | | |
| | | | # App Component Files
| | | βββ ...
| | |
β β βββ /assets
| | | | # All fonts files
β β | βββ /font
| | | | βββ ...
| | | |
| | | | # All svg Images
β β | βββ /svg
| | | βββ ...
| | | |
| | | # Different Environment files
β β βββ /environment
β β β βββ ...
| | |
| | | # Sass Files (e.g. _var, _font, ...)
β β βββ /sass
| | | βββ...
| | |
| | | # Angular starter Files and setEnv.ts
| | βββ ...
| |
| | # Config Files for Angular
| βββ ...
β
β # The NestJS Backend
βββ /server
β βββ /src
β β βββ /todo
β β | βββ /controller
| β β | βββ ...
| β β |
β β | βββ /models
| β β | βββ ...
| β β |
β β | βββ /service
| β β | βββ ...
| β β |
| | | βββ todo.module.ts
| β β
β β βββ app.module.ts
β β βββ main.ts
| β
β βββ /test
| | βββ ...
β βββ ...
β
β # Config Files for Editor and Application
βββ .configFiles
β
β # Project Description
βββ README.md
Name | Type | Description | Default |
---|---|---|---|
NG_APP_DATABASE_URI |
string |
The Base URI String to the Database. Example: http://localhost:5000 |
http://localhost:8081 |
SERVER_PORT |
number |
The Port of the Server Application. Example: 5000 |
3000 |
PGDB_HOST |
string |
The Hostname of the Database Container. Example: postgres-db |
postgres-db |
POSTGRES_PORT |
number |
The Port of the PostgresSQL Database. Example: 4321 |
5432 |
POSTGRES_USER |
string |
The Username of the PostgresSQL Database. Example: user |
postgres |
POSTGRES_PASSWORD |
string |
The Password of the PostgresSQL Database. Example: root |
password |
POSTGRES_DB |
string |
The Name of the PostgresSQL Database. Example: todo_db |
postgres |
NGINX_PORT |
number |
The Port of the NGINX server Environment. Example: 480 |
80 |
DOCKER_CLIENT_PORT |
number |
The Port of the Client Container server Environment. Example: 7200 |
8080 |
DOCKER_SERVER_PORT |
number |
The Port of the Server Container server Environment. Example: 6800 |
8081 |
DOCKER_POSTGRES_PORT |
number |
The Port of the PostgresDB Container server Environment. Example: 39200 |
35000 |
NODE_ENV |
string |
The Name of the NodeJS Environment. Example: development |
To read more about the Todo API, run the Project and visit /api
at port 8081
, to see the swagger documentation.
POST /todo Content-Type: application/json {"label": "new ToDo", ...}
Parameter | Type | Description |
---|---|---|
label |
string |
Required. The Label of the ToDo. |
position |
number |
Required. The Position of the ToDo. |
priority |
number |
Optional. Default: 5 .The Priority of the ToDo (0-10). |
done |
boolean |
Optional. Default: false .The status of the ToDo. |
{
id: number,
label: string,
priority: number,
done: boolean,
position: number
}
GET /todo
[
{
id: number,
label: string,
priority: number,
done: boolean,
position: number
},
...
]
GET /todo/{id}
Parameter | Type | Description |
---|---|---|
id |
number |
Required. The id of the ToDo. |
{
id: number,
label: string,
priority: number,
done: boolean,
position: number
}
PUT /todo/{id} Content-Type: application/json {"label": "updated ToDo", ...}
Parameter | Type | Description |
---|---|---|
id |
number |
Required. The ID of the ToDo. |
label |
string |
Required. The Label of the ToDo. |
position |
number |
Required. The Position of the ToDo. |
priority |
number |
Required. The Priority of the ToDo (0-10). |
done |
boolean |
Required. The status of the ToDo. |
{
generatedMaps: array,
raw: array,
affected: number
}
DELETE /todo/{id}
Parameter | Type | Description |
---|---|---|
id |
number |
Required. The id of the ToDo. |
{
raw: array,
affected: number
}