https://github.com/destafajri/java-springboot-cerpen-backend
Develop Backend Service for Cerpen Apps Using Spingboot-Java
https://github.com/destafajri/java-springboot-cerpen-backend
docker docker-compose elasticsearch java postgresql spring-boot spring-security
Last synced: 3 months ago
JSON representation
Develop Backend Service for Cerpen Apps Using Spingboot-Java
- Host: GitHub
- URL: https://github.com/destafajri/java-springboot-cerpen-backend
- Owner: destafajri
- Created: 2023-09-29T15:55:33.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-01T18:07:56.000Z (over 2 years ago)
- Last Synced: 2025-01-27T06:45:31.812Z (over 1 year ago)
- Topics: docker, docker-compose, elasticsearch, java, postgresql, spring-boot, spring-security
- Language: Java
- Homepage:
- Size: 238 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Cerpen Application





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](https://java-springboot-cerpen.onrender.com/).
## Table of Contents
- [Database Schema](#database-schema)
- [Getting Started](#getting-started)
- [Authentication](#authentication)
- [API Endpoints](#api-endpoints)
- [Contributing](#contributing)
- [License](#license)
## 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:
```bash
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
[](https://www.postman.com/gold-station-218460/workspace/cerpen-app-java/collection/22138766-d10db559-036a-451d-b2f0-ecab9f04ccee?action=share&creator=22138766)