Skip to content
Snippets Groups Projects
Commit 9899be16 authored by n.hoeller's avatar n.hoeller
Browse files

updated README

parent f50ac100
No related branches found
No related tags found
No related merge requests found
......@@ -4,9 +4,12 @@ An integrated Todo List application designed as a CI/CD demonstration.
## Project Overview
This project consists of a Spring Boot backend consumed by an Angular frontend. The components communicate using a RESTful API. All data is persistently stored on the backend application server using an in-file H2 database.
This project consists of a Spring Boot backend consumed by an Angular frontend. The components communicate using a
RESTful API. All data is persistently stored on the backend application server using an in-file H2 database.
## Task Entity
## Backend
### Task Entity
The `Task` entity represents an entry in the Todo List.
......@@ -15,10 +18,8 @@ The `Task` entity represents an entry in the Todo List.
| `id` | Long | Unique identifier for the task. Auto-generated. |
| `title` | String | The title of the task. |
| `completed` | boolean | Whether the task is completed or not. |
| `createdAt` | LocalDateTime | Timestamp when the task was created. |
| `updatedAt` | LocalDateTime | Timestamp when the task was last updated. |
## API Endpoints
### API Endpoints
All API endpoints are prefixed with `/api/v1/tasks`.
......@@ -30,3 +31,58 @@ All API endpoints are prefixed with `/api/v1/tasks`.
| `/{id}` | `PUT` | Updates a specific task by ID. | Updated `Task` object. | Updated `Task` object. |
| `/{id}` | `DELETE` | Deletes a specific task by ID. | - | - |
## Frontend
### Routes
| Path | Component | Description |
|---------------|-------------------|-------------------------------------------------------------------------------------------|
| `/` | `TodoComponent` | Displays a list of all tasks and allows the user to create, update, and delete tasks. |
## Testing
This application includes rudimentary tests for both the frontend and backend applications to demonstrate the testing
capabilities of the CI/CD pipeline.
### Backend
All backend tests use the `test` profile, which uses an in-memory H2 database.
#### Unit Tests
Unit tests are found in the directory `test.java.de.fhac.simpletodo.unit` and follow the naming convention `*Test.java`.
To run the tests, execute the following command from the `backend` directory of the project:
```shell
./mvnw test
```
#### Integration Tests
Integration tests are found in the directory `test.java.de.fhac.simpletodo.integration` and follow the naming convention
`*IT.java`. To run the tests, execute the following command from the `backend` directory of the project:
```shell
./mvnw verify
```
### Frontend
#### Component Tests
Component tests are found in the component directories and follow the naming convention `*.spec.ts`. To run the
tests, execute the following command from the `frontend` directory of the project:
```shell
ng test
```
**Note**: Ensure the Angular CLI is installed.
## Deployment
This project is deployed using GitLab CI/CD. The workflow can be found in `.gitlab-ci.yml`. This project
makes use of the [WinSW](https://github.com/winsw/winsw) Windows Service Wrapper to run both the backend and frontend
applications as Windows services. The services are configured using the XML files found in the root directory of the
project.
**Note**: Adjust the paths in the CI/CD workflow to match your environment.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment