Skip to content

nordic96/taskapp

Repository files navigation

TaskApp

Task App is a simple task management application, where you can simply retrieve, create, update and delete your tasks in real-time.

Below is the tech stack and major dependencies used for developing this application;

  1. Front-end: ReactJS, Typescript, Redux, Material UI,
  2. Back-end: Java, Dropwizard, Maven, Swagger
  3. Data Storage (DB): MongoDB
  4. Testing:
    • End 2 End Testing: Cypress
    • Integration Testing: Cypress (API integration testing)
    • Component Testing: Jest, Enzyme, React Testing Library
  5. Deployment: Docker
  6. CI/CD: Github Actions

task app screenshot

1. Project Environment Setup and Running

pre-requisite: Docker machine is required to be installed in your machine to run it locally.

Simply run the command below using docker to run task application services and task application UI.

docker-compose up -d

2. Task-App-Server

2.1 Swagger API Documentation

pre-requisite: Task 1 (Set up and Running) should be completed in order to view API documentation on local.

Once docker container is up and running on your local machine, simply navigate to this address to view API documentation below;

localhost:8080/swagger

swagger api documentation screenshot

2.2 Health Check API

Health check API is available for testing DB connection with MongoDB from server. Port 8081 is opened for accessing health check. Simply navigate to the address on your local for viewing

localhost:8081

health check api screenshot

Below is the sample health check response for database connection and default deadlock checks

{
"database" : {
    "healthy" : true,
    "duration" : 324,
    "timestamp" : "2022-07-23T07:58:15.130Z"
},
"deadlocks" : {
    "healthy" : true,
    "duration" : 1,
    "timestamp" : "2022-07-23T07:58:15.131Z"
}
}

3. Cypress E2E Testing

pre-requisite:

  • cypress should be installed in your local machine
  • task-app-ui should be running in development mode with port 3000
  • Switch current directory to task-app-ui
  • Run the command npx cypress open
  1. From the screenshot below, click E2E Testing

    Cypress GUI screenshot 1

  2. Click whichever browser that is available in your local machine (chrome suggested) Cypress GUI screenshot 2

  3. Click whichever spec file to test manually Cypress GUI screenshot 3

  4. Sample result after running e2e specification test script Cypress GUI screenshot 4

4. Unit Component Testing

pre-requisite: run npm i to install all necessary dependencies under task-app-ui directory

Simply run the command below to run component level testing

npm test

npm test screenshot