Code Monkey home page Code Monkey logo

kanban-board's Introduction

Kanban Application

This is a simple implementation of a Kanban Board, a tool that helps visualize and manage work. Originally it was first created in Toyota automotive, but nowadays it's widely used in software development.

A Kanban Board is usually made of 3 columns - TODO, InProgress & Done. In each column there are Post-it notes that represents task and their status.

As already stated this project is an implementation of such board and made of 3 separate Docker containers that holds:

  • PostgreSQL database
  • Java backend (Spring Boot)
  • Angular frontend

The entry point for a user is a website which is available under the address: http://localhost:4200/

Kanban

More information about this project you can found in blog post: https://medium.com/@wkrzywiec/how-to-run-database-backend-and-frontend-in-a-single-click-with-docker-compose-4bcda66f6de


Prerequisites

In order to run this application you need to install two tools: Docker & Docker Compose.

Instructions how to install Docker on Ubuntu, Windows, Mac.

Docker Compose is already included in installation packs for Windows and Mac, so only Ubuntu users needs to follow this instructions.

How to run it?

The entire application can be run with a single command on a terminal:

$ docker-compose up -d

If you want to stop it, use the following command:

$ docker-compose down

kanban-postgres (Database)

PostgreSQL database contains only single schema with two tables - kanban and task table.

After running the app it can be accessible using these connectors:

  • Host: localhost
  • Database: kanban
  • User: kanban
  • Password: kanban

Like other parts of application Postgres database is containerized and the definition of its Docker container can be found in docker-compose.yml file.

kanban-postgres:
    image: "postgres:9.6-alpine"
    container_name: kanban-postgres
    volumes:
      - kanban-data:/var/lib/postgresql/data
    ports:
      - 5432:5432
    environment:
      - POSTGRES_DB:kanban
      - POSTGRES_USER:kanban
      - POSTGRES_PASSWORD:kanban

kanban-app (REST API)

This is a Spring Boot (Java) based application that connects with a database that and expose the REST endpoints that can be consumed by frontend. It supports multiple HTTP REST methods like GET, POST, PUT and DELETE for two resources - kanban & task.

Full list of available REST endpoints could be found in Swagger UI, which could be called using link: http://localhost:8080/api/swagger-ui.html

swagger-ui

This app is also put in Docker container and its definition can be found in a file kanban-app/Dockerfile.

kanban-ui (Frontend)

This is a real endpoint for a user where they can manipulate their kanbans and tasks. It consumes the REST API endpoints provided by kanban-app.

It can be entered using link: http://localhost:4200/

kanban-board's People

Contributors

ramazansakin avatar wkrzywiec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kanban-board's Issues

metrics endpoint not found

i used this app.propetie file and i didnt found the metrics endpoints

server.servlet.context-path=/api

spring.datasource.url=jdbc:postgresql://${DB_SERVER}/${POSTGRES_DB}
spring.datasource.username=${POSTGRES_USER}
spring.datasource.password=${POSTGRES_PASSWORD}
spring.liquibase.change-log=classpath:/db/changelog/db.changelog-master.xml
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
management.endpoints.web.exposure.include=*
management.endpoint.metrics.enabled=true
// those are the exposed endpoints and i cant find the metrics endpoint
{
"_links": {
"self": {
"href": "http://localhost:8080/api/actuator",
"templated": false
},
"health-component": {
"href": "http://localhost:8080/api/actuator/health/{component}",
"templated": true
},
"health": {
"href": "http://localhost:8080/api/actuator/health",
"templated": false
},
"health-component-instance": {
"href": "http://localhost:8080/api/actuator/health/{component}/{instance}",
"templated": true
},
"info": {
"href": "http://localhost:8080/api/actuator/info",
"templated": false
}
}
}

Page does not update with new items

When creating a Kanban or New Task, it doesn't update the page. Hitting refresh shows the new items. Shouldn't the new items be seen after clicking "Save" in the dialog?

Several broken dependencies

Apologies in advance, I am not a webdeveloper. I am trying to get this application running on Mac catalina via docker, however it seems quite a few dependency issues pop-up.

npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended

Cannot download "https://github.com/sass/node-sass/releases/download/v4.10.0/linux_musl-x64-72_binding.node" -- I went to Github, there is no "72" version, highest I believe was 67?

Finally, this last one that looks like the node-gyp version needs updated (due to Python 2 EOL):

gyp ERR! System Linux 4.19.76-linuxkit
gyp ERR! command "/usr/local/bin/node" "/usr/src/app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /usr/src/app/node_modules/node-sass
gyp ERR! node -v v12.7.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1

I would be more than happy to try to troubleshoot/test anything if that helps? I am just not sure where to edit the package calls without breaking everything!

Create Kanban does not work

Kanban-board's web application throws an exception when trying to create a new kanban through kanban-ui.

Steps to reproduce:

  1. clone repository

  2. launch the application through docker-compose

  3. open kanban-ui (http://localhost:4200)

  4. click on the button "+ Create Kanban"

  5. Fill in a title and click on the button "Save"

Outcome: nothing happens

Checking the logs outputted by kanban-app shows the following exception:

org.postgresql.util.PSQLException: FATAL: role "kanban" does not exist

npm error deploy kanvan-ui

Hi, i clone your project to use the kanvan board (I run the project on Mac and Ubunut virtual Machine x86 architecture), but when i type docker-compose up the step 6 on the first docker file fails as follow:

Step 6/10 : RUN npm run build
---> Running in 8d05f88f96ce

[email protected] build /usr/src/app
ng build --prod

Schema validation failed with the following errors:
Data path "" should NOT have additional properties(es5BrowserSupport).
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: ng build --prod
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-04-28T14_36_37_649Z-debug.log
ERROR: Service 'kanban-ui' failed to build: The command '/bin/sh -c npm run build' returned a non-zero code: 1

Thanks a lot for your attention, and i wait some idea of solve the error.

WebUI and API connectivity

First of all, thanks for the great opportunity to work and practice with a real and useful application.

I tried to run this application on a k8s cluster that was deployed with vagrant (https://github.com/scriptcamp/vagrant-kubeadm-kubernetes).

I created containers from the provided Docker files in that repository and placed them in my dockerhub repository.
I then modified the docker-compose file as shown in the example below:


version: '3'
services:

kanban-postgres:
image: `postgres:9.6-alpine'
container_name: kanban-postgres
volumes:
- kanban-data:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
- POSTGRES_DB=kanban
- POSTGRES_USER=kanban
- POSTGRES_PASSWORD=kanban

kanban-app:
image: "martold/itmo:app_v1.1"
container_name: kanban-app
environment:
- DB_SERVER=kanban-postgres
- POSTGRES_DB=kanban
- POSTGRES_USER=kanban
- POSTGRES_PASSWORD=kanban
ports:
- 8080:8080
references:
- kanban-postgres

kanban-ui:
image: "martold/itmo:webui_v1.1"
container_name: kanban-ui
ports:
- 4200:80
references:
- kanban-app

volumes:
kanban-data:


I used the kompose application to create the yamls for the cluster.
Finally, the cluster was started with nodeport functions and port forwarding in VirtualBox.

Webui and swagger can be accessed on my local host:
http://localhost:8080/
http://localhost:8082/api/swagger-ui.html#

Problem:
Whenever I try to make a POST or PUT request, I get a 403 response if I use webui.
If I repeat the request from swagger, everything is fine and I can see the changes in webui.

Can you please explain to me why this is happening and how I can solve this problem?

Any help would be appreciated!

Using JDK 11 Error

HI @wkrzywiec , I have an error when Using JDK 11.

I am using this Dockerfile:

FROM maven:3.6.3-jdk-11-slim AS build
MAINTAINER Hendi Santika "[email protected]"
RUN mkdir -p /workspace
WORKDIR /workspace
COPY pom.xml /workspace
COPY src /workspace/src
RUN mvn -f pom.xml clean package
FROM adoptopenjdk/openjdk11:alpine-jre
COPY --from=build /workspace/target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","/application.jar"]

The error as follow:

org.postgresql.util.PSQLException: The connection attempt failed.
Caused by: java.net.UnknownHostException: ${DB_SERVER}

Do You have any suggestion to fix ${DB_SERVER} running?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.