Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This repository implements a simple online community website in Java and Spring Boot with Model-view-controller design pattern. Currently, this application can show a list of all the posted questions in several pages. Users can post their own questions, reply questions, reply to comments, and up vote or down vote to questions and comments. Users can log in and create an account using their github accounts.

Structure of the Project

src/main/java/com/jw22/community/

  • advice: this directory contains the exception handlers for server requests and responses
  • cache: this directory stores some information that should be displayed on the pages
  • controller: this directory contains the controllers that handle the request from user and display the correct web page.
  • dto: this directory contains classes that facilitate the data transfer between the database and the web pages
  • enums: this directory stores some predefined data types
  • exception: this directory handles customized exceptions
  • interceptor: this directory checks if the user has an unterminated when first visiting the website
  • mapper: this directory has the functions that interact with the MySQL database
  • model: database model generated by MyBatis
  • provider: handles the request and response from third-party logins
  • service: this directory contains the functions that will be called on the frontend web pages
  • CommunityApplication: this is main java file to run

src/main/resources/

  • mapper: mapper configuration files for MyBatis
  • static: css and javascript configuration files
  • templates: implementation of all the web pages that are displayed on the user side
  • application.properties: all the required configurations required for running the application, including url, port, database, provider, etc.
  • generatorConfig.xml: configuration file used by MyBatis

Demo

  • The image below shows the main page that lists all the posted questions and relavent information. For each question section, the profile image of the user who posts the question is on the left. Title and description of the question are also shown. Below the description, it shows the count of comment, view, up vote, down vote, relavent tags, and the posted time. index.html

  • The image below shows the profile page, and it lists all the questions that the current user has posted. After login, the user name will appear on the upper right corner in the navigation bar. profile.html

  • The image below shows the publish page where user can post their questions. They should type the question title and description, otherwise the question cannot be posted and a warning will generate. They can also select tags that are relavent to their questions, and they can also choose to post the question anonymously. publish.html

  • The image below shows some comments to the question posted. Users can reply to the question itself, or they can also reply to the comments under the question. Comments replied to the question have blue background, and the replies to comments have yellow background. question.html

  • The image below shows the page when an error has encountered (e.g. the url is wrong or reply to a question that is already deleted). All server errors should redirect to this page. error.html

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages