Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 2.7 KB

README.md

File metadata and controls

72 lines (50 loc) · 2.7 KB

Blogging Platform API

Overview

This project is a server-side implementation for a blogging platform. It provides a simple API to perform CRUD (Create, Read, Update, Delete) operations on blog posts using a unique post_id. The platform is designed to manage posts with categories and tags, facilitating efficient content organization and retrieval.

Features

  • Create a Post: Create a blog post with a title, content, and a specific category. Optionally, tags can be appended to enhance searchability.
  • Delete a Post: Delete an existing post using its unique ID.
  • Retrieve All Posts: Fetch all blog posts stored in the database.
  • Retrieve a Specific Post: Fetch details of a single post using its unique ID.
  • Search Posts: Search for posts containing a specific term in their title, content, or tags.
  • Update an Existing Post: Modify the title, content, category, or tags of an existing post.

Tech Stack

  • Java 21: The primary programming language used for development.
  • Spring Boot 3.4.0: A powerful framework for backend development, offering seamless integration and scalability.
  • OpenAPI Generator 7.7.0: Used to generate REST API implementations based on an OpenAPI .yaml specification file.
  • PostgreSQL 14.1: A robust relational database system for storing and managing blog posts.
  • Docker Container: Facilitates containerized deployment, providing scalability, portability, and consistency across different environments.
  • Gradle: A versatile build automation tool to manage dependencies and build processes.

Getting Started

Prerequisites

Ensure you have the following installed:

  • Java JDK 21
  • Docker
  • Docker Compose

Running the Project with Docker Compose

  1. Clone the repository:
    git clone <repository_url>
    cd blogserver
  2. Build the project:
    ./gradlew bootJar
  3. Use Docker Compose to build and start the containers:
    docker-compose up --build
  4. Access the API at http://localhost:8080.

API Documentation

API documentation is generated during the build process and is available in the build/generated/docs/index.html. You can open the HTML documentation file in your browser to explore the API endpoints interactively.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes with clear and concise messages.
  4. Open a pull request to the main branch.

License

This project is licensed under the MIT License.


Sample solution for the Blogging Platform API challenge from roadmap.sh.