Giter VIP home page Giter VIP logo

back-end's Introduction

build

webBudget back-end

Welcome to the back-end application for webBudget project!

The project is based on:

  • Kotlin 1.9
  • Spring Boot 3
  • Postgres 15
  • Testcontainers

Project setup

If you are familiar with Java projects using maven, there is nothing too different here. The project is using Gradle as build tool and Kotlin will compile through it.

Quick note before start: your docker environment is running? Since we use testcontainers to run the tests and also to develop things in the project, is required to have a docker instance running.

Clone the project, and:

gradlew clean build

This will clean (older builds), run Detekt, some automated tests, and compile the project. If everything goes well, you will see a message of build success at the end of the process.

To just lint the project and check if the code is compliant with our Detekt rules, run: gradlew detekt. At the first run it should fix some simple problems, at the second run only the ones that require your manual intervention should be reported.

If you plan to develop in the project, after cloning it, go in the root of the project, run this command:

docker compose -p web-budget up

It should start some required services to run the project locally and after that you just need to import the project in your favorite IDE, happy coding!

Since this is a Kotlin project is highly recommended to use IntelliJ IDEA for development, if you don't have it, please click here to download.

FAQ

General questions about the project:

  • Why separate front-end and back-end? Basically because this will make people more confortable to develop inside the project, not everyone are able to work in big monolith full of files and with trick configurations to deal with. Doing like this will help beginners searching for a cool project to start with some contributions.
  • How can I start contributing? You can start by looking to the project board here!
  • Why not stay with Java? For me Kotlin is more complete in terms of functional programming if compared to Java. This makes it better? Of course not, but is not possible to ignore the fact that Kotlin has a much more interesting toolset if compared to his "old brother".

back-end's People

Contributors

arthurgregorio avatar

Stargazers

 avatar  avatar Ihury Costa avatar Matheus Fongaro avatar Gabriel Costa Silva avatar Pedro Costa avatar

Watchers

James Cloos avatar  avatar Breno Vinicius avatar  avatar

back-end's Issues

[BE] CRUD credit cards

Create all the flow to create, read, update and delete credit cards

Tasks

Remove use of converter service from spring

Today we are using converter service from spring to convert DTO to model and vice-versa, the thing is: testing it is a bit hard and we don't need it now.

Remove the use of converter service and make use of pure interfaces with mapstruct to map between DTO and model.

Refactor tests

Look to the already done tests and improve it. The objective for this task is to have less duplicated code and create more parameterized tests

Prevent admin being deleted

If someone try to delete admin, the backend should bot permiti it since there will be no user able to login in the application, instead, it only permits locking it

Refactor BE tests

Refactor BE tests to make a good use of kotlin default parameters and named parameters

Mock controller tests and integrate service tests

Some tests started to become a problem to maintain, to solve it a good approach might be:

  • mock all tests done in the controller layer and let it check just the input of data (validation) and output (payload contents)
  • in the service layer, integrate it with persistence layer and do a service to db and db to service check

In the future this will help when some complex scenario should be tested and starting from the controller might trigger a lot of services and the test could be easily bigger than the implementation

Improve toSpecification method

The toSpecification method in the filter DTO's is not good, it is using some parts of the infrastructure layer and those classes used there can be hidden by the repository since it should provide support for other classes that want's to query domain objects/entities

We should move it from there and put in a better place to have a good encapsulation of this query behavior.

[BE] CRUD financial period

Create all the flow to create, read, update and delete financial periods

Tasks

[BE] CRUD movement classes

Create all the flow to create, read, update and delete movement classes

Tasks

Password change endpoint broken

The method on the endpoint to change the user password is not considering the future feature about making the password temporary.

We should add the flag there and later implement the rest of feature.

Fix unique constraints

Unique constraints are not created correctly for the tables, id and externalId should be separated unique constraints and not composite ones

Add validator for bank info

When creating a new wallet, bank information should be validated to guarantee that is unique if filled correctly

Add more info to the token

Add the user name and e-mail to the token response, this will be used to fill the user menu int the frontend

Endpoints to CRUD users

Create endpoints to have a CRUD for users

  • list
  • create
  • edit
  • delete
  • add integration and unit tests

Make test containers work once

Today every time we need to use test containers, it starts and stops for every integration tests. There is better ways to work with the tool to make it run once and also improve the speed of our tests

Upgrade libs

Update BE libs:

  • Spring boot 3.1
  • Kotlin 1.8.22

Refactor authentication/authorization process on backend

Spring has dreprecated WebSecurityConfigurerAdapter and the auth process seens not be consistent. We do really need redis?

The goal here is to review it beginning from the backend and look for improvements or pieces that can be removed to have a lighter auth process

CRUD for cost centers

Backend work for the cost centers CRUD:

  • create endpoint to add
  • create endpoint to edit
  • create endpoint to find/list
  • create automated tests (unit and integration)

Cannot delete user with activation pending

A user with pending account activation can't be deleted because an error of data integrity violation, something related to the fact that this user is linked to the activation attempt.

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.