Skip to content

destafajri/java-springboot-cerpen-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

198 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cerpen Application

Java Spring Boot PostgreSQL Elasticsearch Docker Compose

This is a Cerpen (short story) application built with Java Spring Boot for the backend. The application includes two roles: Admin and Author and implements JWT (JSON Web Tokens) for authentication and authorization. The technology stack includes Java 17, Spring Boot, PostgreSQL for the database, Elasticsearch for text search, and Docker Compose for containerization.

You can access the project here.

Table of Contents

Database Schema

Here's an overview of the database schema for this project:

Users Table

Column Name Data Type Constraints
id UUID PRIMARY KEY
email VARCHAR(255) NOT NULL, UNIQUE
username VARCHAR(255) NOT NULL, UNIQUE
password VARCHAR(255) NOT NULL
role VARCHAR(255) NOT NULL
is_active BOOLEAN NOT NULL
created_at TIMESTAMP NOT NULL
updated_at TIMESTAMP

Admin Table

Column Name Data Type Constraints
id UUID PRIMARY KEY
user_id UUID NOT NULL, UNIQUE
name VARCHAR(255) NOT NULL

Author Table

Column Name Data Type Constraints
id UUID PRIMARY KEY
user_id UUID NOT NULL, UNIQUE
name VARCHAR(255) NOT NULL

Cerpen Table

Column Name Data Type Constraints
id UUID PRIMARY KEY
author_id UUID NOT NULL
title VARCHAR(255) NOT NULL, UNIQUE
tema VARCHAR(255) NOT NULL
cerpen_contains TEXT NOT NULL, UNIQUE
is_active BOOLEAN NOT NULL
created_at TIMESTAMP NOT NULL
updated_at TIMESTAMP

Getting Started

To get started with this project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/destafajri/java-springboot-cerpen-backend
  2. Set up the database (PostgreSQL and Elasticsearch) and configure the application.yml.

  3. Build and run the application.

API Endpoints

You can access the Postman collection for this project

Run in Postman

About

Develop Backend Service for Cerpen Apps Using Spingboot-Java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors