Coder Social home page Coder Social logo

bitirmeprojesi-batuhanbay's Introduction

Bootcamp Graduation Project

Requried Technologies:

  • JDK 11.0.13
  • Maven 4
  • IntelliJ IDEA (Optional IDE)
  • MySql Workbranch
  • Jasper Studio (version 6.19.0) (Optional)

How Do I Setup Project?

  • Run bitirme_ddl_script.sql and bitirme_dml_script.sql respectively which are located under the scripts folder on MySql server.
└───bitirmeprojesi-batuhanbay
         └───scripts
               └──bitirme_ddl_script.sql
               └──bitirme_dml_script.sql
 
  • Open the project in the IDE.
  • Set spring.datasource.password to your database server password in the application.properties
└───bitirmeprojesi-batuhanbay
        └───bitirme
              └───src
                    └───main
                          ├───resources
                                  ├───application.properties
  • Assign your own database server password to the password variable in the getMySQLConnection method of MySQLConnUtils.java class under the Utils package.
└───bitirmeprojesi-batuhanbay
                   └───bitirme
                           └───src
                                 └──main
                                       ├──java
                                             ├──com
                                                 ├──softtechbootcamp
                                                               ├──bitirme
                                                                       ├──app
                                                                            ├──utils
                                                                                 ├──MySQLConnUtils

image

Security

  • JWT

Test

  • Unit
  • Integration

81% of the classes in the project were tested and 62% of the rows were covered in the entire project. A total of 121 tests, 44 integration tests and 77 unit tests, were successfully running. Also, H2 database has been used for integration test.

How to Run Test?

  • Before run all test be ensure resources package where under the test package, is pointed as test resources in the project structure. (Ctrl + Alt + Shift + S for open project structere in the IntelliJ)
 └───bitirmeprojesi-batuhanbay
    └───bitirme
          └───src
                └──main
                └──test
                     └──resources
  

Project Features

  • Base model implemented for all entiy and service classes.
  • Errors, warnings, and information received while running the project locally are logged. As information, all entities are logged as information in the log file before saving, updating and deleting. Reflection was used to get the entity names while logging these informations. You can find log file under the logs folder with softtech_bitirme_logger.log file. For logging logback.xml file is used.
 └───bitirmeprojesi-batuhanbay
    └───bitirme
          └───logs
                └──softtech_bitirme_logger.log
  
└───bitirmeprojesi-batuhanbay
          └───bitirme
                └───src
                      └───main
                            ├───resources
                                    ├───logback.xml
 > Example of logs:

image

  • Log tables were created for user, product, product types and settings tables in the database. Scripts are in the bitirme_ddl_script.sql file. The created log tables are filled by triggers after the update and delete operation in the records of user, product, product types and settings tables. You can find triggers in the bitirme_dml_script.sql file.
 └───bitirmeprojesi-batuhanbay
          └───scripts
                └──bitirme_ddl_script.sql
                └──bitirme_dml_script.sql
  
  • For the process that returns the details of the product type according to the desired product type in the project requirements, an additional pdf file which is generated by service, showing the product type details was generated and dowlanded your copmtuter.

Note: The generated pdf template was designed using Jasper Studio.

Note: To create the detail pdf file of the desired product type, a request should be sent to the http://localhost:8080/api/v1/products/types/{productTypeId}/detail/pdf enpoint.

Note: You can find the generated and downloaded pdf file under the default D:\jasper_reports\ folder. The folder given in this file path will be created automatically by the service. To update the file path, you can update the savedDirectoryPath value in the settings using the service.

 > Template of Report

image

 > Example of Generated Pdf By Service

image

  • Swagger used for Open API Specification.

image

Projenin Konusu: Bir marketteki ürünlerin satış fiyatlarına göre son fiyatlarını belirleyen servisin Spring Boot Framework kullanılarak yazılması ve isteğe bağlı olarak önyüzünün yazılması.

Gereksinimler:

Backend:

  • Kullanıcıdan kullanıcı adı, şifre, isim, soy isim bilgilerini alarak sisteme kayıt yapılır.
  • Sisteme kayıtlı kullanıcılar market ürünlerinin veri girişini yapabilir.
  • Ürün türlerine göre KDV oranları değişiklik göstermektedir. Bu oranlar aşağıdaki tabloda belirtilmiştir. Zaman zaman KDV oranları değişiklik gösterebilmektedir.

Image

  • Ürün için veri girişi yapacak kullanıcı; ürünün adı, ürünün türü ve vergisiz satış fiyatı alanlarını doldurur. Her bir ürün için KDV Tutarı ve ürünün son fiyatı da hesaplanarak sisteme kaydedilir.

Kurallar ve gereksinimler:

  • Sisteme yeni kullanıcı tanımlanabilir, güncellenebilir ve silinebilir.
  • Sisteme yeni ürünler tanımlanabilir, güncellenebilir ve silinebilir.
  • Ürünlerin fiyatları güncellenebilir.
  • KDV oranları değiştiğinde sistemdeki ürünlere de bu değişiklik yansıtılmalıdır. Herhangi bir hata durumunda tüm işlemler geri alınmalıdır.
  • Tüm ürünler listelenebilmelidir.
  • Ürün türlerine göre ürünler listelenebilmelidir.
  • Belirli bir fiyat aralığındaki ürünler listelenebilmelidir.
  • Ürün türlerine göre aşağıdaki gibi detay veri içeren bir bilgilendirme alınabilmelidir.

Image

Validasyonlar:

  • Aynı kullanıcı adı ile kullanıcı tanımı yapılamaz.
  • Kullanıcı girişi kullanıcı adı & şifre kombinasyonu ile yapılır.
  • Ürün türü, fiyatı, adı gibi alanlar boş olamaz.
  • Ürün fiyatı sıfır ya da negatif olamaz.
  • KDV oranı negatif olamaz.

Authentication:

  • Güvenli endpointler kullanınız. (jwt, bearer vs. )

Response:

  • Başarılı ve başarısız responselar için modeller tanımlayın ve bunları kullanın.

Dökümantasyon:

  • Open API Specification (Swagger tercih sebebi)

Exception Handling:

  • Hatalı işlemler için doğru hata kodlarının dönüldüğünden emin olunuz.

Test:

  • Unit ve integration testleri yazınız.

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.