An open API service indexing awesome lists of open source software.

https://github.com/krisnaajiep/java-personal-blog

A simple personal blog web app built with HTML, CSS, and Java to write and publish articles on various topics..
https://github.com/krisnaajiep/java-personal-blog

basic-authentication css filesystem gson html java json personal-blog servlet servlets-jsp-html-css webapp

Last synced: about 1 month ago
JSON representation

A simple personal blog web app built with HTML, CSS, and Java to write and publish articles on various topics..

Awesome Lists containing this project

README

          

# Java Personal Blog

> Simple personal blog web app built with HTML, CSS, and Java.

## Table of Contents

- [General Info](#general-information)
- [Technologies Used](#technologies-used)
- [Features](#features)
- [Setup](#setup)
- [Usage](#usage)
- [Project Status](#project-status)
- [Acknowledgements](#acknowledgements)
- [License](#license)

## General Information

Java Personal Blog is a simple web application used to write and publish articles. This project is designed to explore and practice basic authentication, working with filesystem, HTML, CSS, and server in Java.

## Technologies Used

- HTML
- CSS
- Java 21.0.6 LTS
- Maven 3.9.9
- Jakarta Servlet 6.1.0
- Gson 2.12.1

## Features

- **View all articles**: Display a list of all existing articles with their title and publishing date.
- **Admin login**: A basic authentication for the admin section to be able to manage articles.
- **Add a new article**: Create a new article with a title, publishing date, and content.
- **View an article**: Display an article with their title, publishing date, and content.
- **Update an article**: Modify an existing article.
- **Delete an article**: Remove an existing article.

## Setup

To run this web app, you’ll need:

* **Java**: Version 21 or higher
* **Maven**: Version 3.x
* **Apache Tomcat**: Version 11.0.0-M20

How to install:

1. Clone the repository

```bash
git clone https://github.com/krisnaajiep/java-personal-blog.git
```

2. Change the current working directory

```bash
cd java-personal-blog
```

3. Build the project

```bash
mvn clean package
```

4. Copy the WAR file from the target/ directory to the webapps folder in your Apache Tomcat directory

```bash
cp target/java-personal-blog-1.0-SNAPSHOT.war path/to/tomcat/webapps/personal-blog.war
```

5. Run the Apache Tomcat and access the URL

```bash
http://localhost:8080/personal-blog
```

## Usage

1. Select `Admin` to enter dashboard.

![enter-dashboard](docs/image1.png)

2. Use the following credentials for authentication.

```text
Username: admin
Password: password
```

3. Select `+Add` to add new article.

![select-add](docs/image2.png)

4. Fill all input in the add article form and select `Publish` button.

![add-new-article](docs/image3.png)

5. Select an article title in the dashboard to view the content.

![view-article](docs/image4.png)

6. Select `Go back` for return to the previous page.

![go-back-in-article-page](docs/image5.png)

7. Select `Edit` to update an article.

![select-edit](docs/image6.png)

8. Fill all inputs in the edit article form and select `Update` button.

![edit-an-article](docs/image7.png)

9. Select `Delete` to delete an article.

![delete-article](docs/image8.png)

## Project Status

Project is: _complete_.

## Acknowledgements

This project was inspired by [roadmap.sh](https://roadmap.sh/projects/personal-blog).

## License

This project is licensed under the MIT License—see the [LICENSE](./LICENSE) file for details.