https://github.com/sivaprasadreddy/techbuzz
A place for techie to share knowledge, blog posts, tech news etc
https://github.com/sivaprasadreddy/techbuzz
docker docker-compose java maven postgresql spring-boot thymeleaf
Last synced: about 2 months ago
JSON representation
A place for techie to share knowledge, blog posts, tech news etc
- Host: GitHub
- URL: https://github.com/sivaprasadreddy/techbuzz
- Owner: sivaprasadreddy
- License: apache-2.0
- Created: 2023-01-11T04:07:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-10T15:51:32.000Z (about 1 year ago)
- Last Synced: 2025-05-20T06:04:13.172Z (12 months ago)
- Topics: docker, docker-compose, java, maven, postgresql, spring-boot, thymeleaf
- Language: Java
- Homepage:
- Size: 1.15 MB
- Stars: 54
- Watchers: 4
- Forks: 20
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TechBuzz
TechBuzz is a place to share the interesting tech news such as blog posts, videos, release news etc.
[](https://github.com/sivaprasadreddy/techbuzz/actions/workflows/maven.yml)
[](https://sonarcloud.io/summary/new_code?id=sivaprasadreddy_techbuzz)
[](https://sourcespy.com/github/sivaprasadreddytechbuzz/)
## Features
* Login with username/password
* Register with username/password
* Account activation by email verification
* View posts by category with pagination
* Create post
* Update post
* Delete post
* Up/Down vote a post
## Tech Stack
* Java, SpringBoot
* Postgres, jOOQ, FlywayDb
* Spring Security
* Thymeleaf, Bootstrap, jQuery
* JUnit 5, Testcontainers
## Architecture Decision Records (ADRs)
* [Technology selection for UI](adr/ui-tech-selection.md)
* [Tech selection for database persistence](adr/persistence-library-selection.md)
### Install Prerequisites
1. Install Java, Maven using SDKMAN
```shell
$ curl -s "https://get.sdkman.io" | bash
$ source "$HOME/.sdkman/bin/sdkman-init.sh"
$ sdk version
$ sdk env install
$ java -version
$ mvn --version
```
2. Install Docker
Follow https://docs.docker.com/engine/install/ for installing Docker for your OS.
## HOW TO?
### Run Unit / Integration Tests
```shell
$ ./mvnw verify
```
### Format code
```shell
$ ./mvnw spotless:apply // to formatting code automatically
$ ./mvnw spotless:check // to verify the code formatting
```
### Run application locally
If you want to start the required services (database, mail server) using docker-compose
and run the application locally:
```shell
$ ./run.sh start_infra
$ ./mvnw -pl techbuzz spring-boot:run
```
Instead, you can simply run `./mvnw -pl techbuzz spring-boot:test-run` which will automatically spin up the required services
as docker containers using Testcontainers and starts the application.
## Run application using docker-compose
```shell
$ ./run.sh start
```
* App: http://localhost:8080/
* MailHog: http://localhost:8025/
### Run PlayWright E2E Tests
Make sure the application is running and configure correct values in `src/test/resources/config.json` file.
```shell
$ ./mvnw -pl e2e-tests test -DskipTests=false
```
### Run Gatling Tests
```shell
$ ./mvnw -pl gatling-tests gatling:test
```
## Using Taskfile for running various tasks
[Task](https://taskfile.dev/) is a CLI utility to automate running common tasks.
```shell
$ task format
$ task test
$ task build_image
$ task start_infra
$ task stop_infra
$ task start
$ task stop_infra
$ task restart
```
## How to contribute?
* If you find this project interesting, fork/clone it, run the application and provide feedback.
* If you find any bugs or have suggestions for improvement, then please file an issue.
* Of course, Pull Requests are most welcome.