Build your own community system from scratch, this open source project is worth having

Time:2021-5-12

Hello everyone, I’m a heartbroken editor for the majority of programmers. I recommend a small tool / source code every day, fill your favorites, and share a little skill every day, so that you can easily save development efficiency, and achieve the goal of not working overtime, not staying up late and not losing your hair!

Today, Xiaobian recommends an open source community system that does not separate the front and back ends, based on the current mainstream Java Web technology stack, and provides detailed development documents and supporting tutorials. Including posts, comments, private messages, system notification, like, attention, search, user settings, data statistics and other modules.

Open source agreement

Using MIT open source license agreement

Link address

It contains detailed documents and a large number of illustrations to help readers quickly master the project, and provides friendly tutorials to guide readers to realize the project from scratch

The official account [Github navigation station] reply to the key word [ECH] to get the GIT address.

Technology stack

front end

  • Thymeleaf
  • Bootstrap 4.x
  • Jquery
  • Ajax

back-end

  • Spring
  • Spring Boot 2.1.5 RELEASE
  • Spring MVC
  • ORM:MyBatis
  • Database: MySQL 5.7
  • Distributed cache: redis
  • Local cache: cafeine
  • Message queue: Kafka 2.13-2.7.0
  • Search engine: elasticsearch 6.4.3
  • Security: Spring security
  • Mail task: Spring mail
  • Distributed timing task: Spring quartz
  • Log: slf4j (log interface) + logback (log Implementation)

Function list

  • register
  • Log in | log outDynamic generation of captcha remember me
  • Account Settings : change the avatar, change the password
  • Filter sensitive words: prefix tree
  • Post module: Post (filter sensitive words) pagination display all posts support according to “post time” display support according to “heat ranking” (spring quartz) view post details permission management (spring Security + thymeleaf security) no login user can post “moderator” can see the top and refine button of post and execute corresponding operation “Administrator” You can see the delete button of the post and perform the corresponding operation. “Ordinary users” can’t see the top, refine and delete buttons of the post, and can’t perform the corresponding operation
  • Comment module: post comments on posts (filter sensitive words) page display comments post replies to comments (filter sensitive words) permission management (spring security) users without login cannot use comments
  • Private message module: send private message (filter sensitive words) private message list query the current user’s session list. Each session only displays the latest private message. It supports paging display of private message details. When querying all private messages contained in a session to access private message details, the displayed private message is set to read status. It supports paging display of spring security. Users who are not logged in cannot use private message function
  • Unified handling of 404 / 500 exceptions: normal request exception asynchronous request exception
  • Unified logging
  • Like module: support to like posts, comments / replies, like for the first time and cancel like for the second time. The first page counts the number of likes of posts. The details page counts the number of likes of Posts and comments / replies. The details page displays the like status of the current login user (like will be displayed if you like). Count the number of likes I have. Spring security users can’t use the like related functions
  • Focus module: follow function cancel follow function count the number of users’ follow and fans my follow list (query a user’s followers), support paging my fan list (query a user’s fans), support paging permission management (spring security) no login users can use follow related functions
  • System notification module: the notification list displays three types of notification details: comment, like, and follow. The notification details of a certain type of topic are displayed in pagination. The notification details of a certain type of system are entered, Then set the status of all unread system notifications on the page to read unread quantity, respectively display the unread quantity of each type of system notification display the unread quantity of all system notifications navigation bar display the unread quantity of all messages (unread private message + unread system notification) spring security no login user can use the system notification function
  • Search module
  • Website data statistics(exclusive to administrators) independent visitors UV supports single day query and interval date query day active users dau supports single day query and interval date query permission management (spring security) only administrators can view website data statistics
  • Optimize website performance: when processing each request, the interceptor must query the user information according to the login credentials, and the frequency of access is very high. Therefore, the successfully logged in user information is stored in the redis cache for a period of time. When querying the user information, priority is given to the value from the cache; If there is no such user information in the cache, it will be stored in the cache; When the user information changes, clear the corresponding cache data; Introduce a local cache caffeine to cache the list of hot posts and the total number of posts, so as to avoid cache Avalanche (there is also a layer of secondary cache redis).

Partial demo screenshot

home page

Build your own community system from scratch, this open source project is worth having

Landing page

Build your own community system from scratch, this open source project is worth having

Post details page

Build your own community system from scratch, this open source project is worth having

Personal homepage

Build your own community system from scratch, this open source project is worth having

Friends private letter page

Build your own community system from scratch, this open source project is worth having

Private message details page

Build your own community system from scratch, this open source project is worth having

System notification page

Build your own community system from scratch, this open source project is worth having

Notice details page

Build your own community system from scratch, this open source project is worth having

Account settings page

Build your own community system from scratch, this open source project is worth having

Data statistics page

Build your own community system from scratch, this open source project is worth having

Search details page

Build your own community system from scratch, this open source project is worth having

ending

   this issue is to share here, I’m Xiaobian nanfengfeng, focusing on sharing interesting, novel and practical open source projects, developer tools and learning resources! I hope to learn and communicate with you all. Welcome to my official account.[GitHub navigation station]

Recommended Today

Looking for frustration 1.0

I believe you have a basic understanding of trust in yesterday’s article. Today we will give a complete introduction to trust. Why choose rust It’s a language that gives everyone the ability to build reliable and efficient software. You can’t write unsafe code here (unsafe block is not in the scope of discussion). Most of […]