Coder Social home page Coder Social logo

cloudbonus / blog Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.83 MB

This repository contains all the completed assignments for the SENLA course. It serves as a personal archive and reference for the coursework.

License: Creative Commons Zero v1.0 Universal

Java 98.59% PLpgSQL 1.41%
docker hibernate java junit5 mockito postgresql rest-api spring jwt-authentication

blog's Introduction

Blog REST

Overview

The Blog is a sample application created as an interactive platform for IT students. Authorized users can leave reactions and write comments. Both students and company representatives can publish posts, but company representatives, acting as ambassadors, cannot create posts freely; they must purchase them (e.g., a post about internship recruitment).

When a company representative creates a post, an order is automatically generated. The post will not be publicly visible until the order is paid. The application includes validation and allows users to leave reactions on posts or comments, as well as create comments.

User verification is also present to assign roles as either a student or a company representative. The application uses Spring Security to ensure that only authorized users can perform certain actions. It also supports pagination, making it easy to navigate through large amounts of data.

Pagination and Sorting examples

http://localhost:8080/blog-1.0/user
http://localhost:8080/blog-1.0/user?pageSize=2
http://localhost:8080/blog-1.0/user?pageSize=2&pageNumber=2
http://localhost:8080/blog-1.0/user?pageSize=2&pageNumber=2orderBy=asc

Schema

schema

Running the Application

  1. Clone the repository
    git clone https://github.com/cloudbonus/senla-course.git 
  2. Run the scripts
    • Execute docker-compose.yaml to set up the PostgreSQL database and Tomcat server.
    • Execute gradlew bootRun (or gradle) and then go to localhost:8080 http://localhost:8080/blog-1.0/auth/sign-up.
    • (OPTIONAL) Execute init-db.sql in the resources folder to initialize the database with starter data.

To-Do

  • Refactor the code.
  • Make the state machine operate at its full potential.
  • Migrate to Spring Boot and Spring Data JPA.
  • Fix bugs (I'm sure they exist).

Contributing

Feel free to explore the code and make improvements. Contributions are welcome!

License

This project is released under the CC0 License.

blog's People

Contributors

cloudbonus avatar senlacoursesadmin avatar

Watchers

 avatar

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.