Skip to content

Reddit and Stackoverflow Like app built using Spring boot 2.x

Notifications You must be signed in to change notification settings

spider0cta/ask-answer-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redit -Stackoverflow Clone

Ask-Answers is a fullstack Redit - Stackoverflow Clone . this project is useful for learning and experimenting with Spring 5 , Spring Boot ,Spring Security , Thymeleaf and JPA.

The Application is implemented as a Spring Boot app running an embedded version of Tomcat. the data storage is H2 Database which is an in-memory database And MySql Database accessed via Spring JPA.

Built With

  • Maven - Dependency Management
  • JDK 11 - Java™ Platform, Standard Edition Development Kit
  • Spring Boot - Framework to ease the bootstrapping and development of new Spring Applications
  • Mysql - Open-Source Relational Database Management System
  • git - Free and Open-Source distributed version control system
  • Bootstrap - front-end open source toolkit
  • thymeleaf - server-side Java template engine
  • Spring Security -Spring Security is a powerful and highly customizable authentication and access-control framework

External Tools Used

  • Postman - API Development Environment (Testing Docmentation)

UI Template

Front End Ui - springit-templates Spring Reddit Clone Layouts & Templates

Database Configuration

Ask-Answer app uses an in-memory database (H2) seeded with a commandLineRunner. The h2 console is automatically exposed at http://localhost:1010/h2-console and it is possible to inspect the content of the database using the jdbc:h2:mem:testdb url.

A similar setup is provided for Mysql in properties file in case a persistent database configuration is needed.

first you need to create a local database[Schema] called askanswer using mysql command Line.

create database askanswer;

Deploying the application to OpenShift or AWS

To deploy the sample application to OpenShift you can use the OpenShift CLI:

oc new-app codecentric/springboot-maven3-centos~https://github.com/Urodacus/ask-answer-app

This will create:

  • An ImageStream called "springboot-maven3-centos"
  • An ImageStream called "askanswerapp"
  • A BuildConfig called "askanswerapp"
  • DeploymentConfig called "askanswerapp"
  • Service called "askanswerapp"

If you want to access the app from outside your OpenShift installation, you have to expose the askanswerapp service:

oc expose askanswerapp --hostname=www.example.com

To deploy the sample application to AWS or Container

you can check these links :

maven

Build Spring Boot Project with Maven mvn install / mvn clean install

run spring boot using maven : mvn spring-boot:run

or load it into your ide then run it.

access it via local host after configuring the port in properties file .

 server.port = <<port number>>

Contributions and Future improvements

In case you find a bug or have a suggested improvement

The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests.

finished

  • RESTful Web Service
  • Bootstrap - CSS
  • Web - Thymeleaf, JavaScript
  • Spring Data JPA
  • H2
  • Spring AOP
  • Spring boot Security
  • Authentication
  • Actuator
  • MySql Configuration

sample screenshot of the completed app

home home home home home

Contributions can be made by following these steps:

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

About

Reddit and Stackoverflow Like app built using Spring boot 2.x

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published