Giter Site home page Giter Site logo

mcpringle / komunumo Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 3.0 3.19 MB

the open source community management

Home Page: https://komunumo.org

License: GNU Affero General Public License v3.0

Dockerfile 0.18% CSS 8.09% Java 91.46% JavaScript 0.15% HTML 0.08% TypeScript 0.04%
java spring vaadin flow vaadin-flow community usergroup jug jooq

komunumo's Introduction

Komunumo

All Tests

Open Source Community Manager

Komunumo is an esperanto noun with a meaning of community.

Architecture

The server of Komunumo is written using the Java programming language. The main framework is Spring. For the user interface, we use Vaadin Flow. To access the database, we rely on jOOQ.

Configuration

The file application.properties contains only some default values. To override the default values and to specify other configuration options, just set them as environment variables. The following sections describe all available configuration options. You only need to specify these options if your configuration settings differ from the defaults.

Server

The server runs on port 8080 by default. If you don't like it, change it:

PORT=8080

Mail

To be able to send mails, you need to specify an SMTP server (defaults are localhost and port25):

MAIL_HOST=localhost
MAIL_PORT=25

Database

Komunumo needs a database to store the business data. By default, Komunumo comes with MariaDB drivers by default, which is recommended because we are using it during development and it is highly tested with Komunumo. All JDBC compatible databases are supported, but you need to configure the JDBC driver dependencies accordingly. Please make sure that your database is using a unicode character set to avoid problems storing data containing unicode characters.

The DB_USER is used to access the Komunumo database including automatic schema migrations and needs ALL PRIVILEGES.

DB_URL=jdbc:mariadb://localhost:3306/komunumo?serverTimezone\=Europe/Zurich&allowMultiQueries=true
DB_USER=johndoe
DB_PASS=verysecret

The database schema will be migrated automatically by Komunumo.

Important MySQL and MariaDB configuration

MySQL and MariaDB have a possible silent truncation problem with the GROUP_CONCAT command. To avoid this it is necessary, to configure these two databases to allow multi queries. Just add allowMultiQueries=true to the JDBC database URL like in this example (you may need to scroll the example code to the right):

DB_URL=jdbc:mariadb://localhost:3306/komunumo?serverTimezone\=Europe/Zurich&allowMultiQueries=true

Admin

Only members with administrative privileges are allowed to login to the backend. You should add yourself as admin to the database, after you have started Komunumo (because the database tables will be created at the first start):

insert into member (id, first_name, last_name, email, registration_date, membership_begin, admin, account_active)
values (1, 'First name', 'Last name', '[email protected]', now(), null, true, true);

Then, open http://localhost:8080/admin, enter your email address, and click on "I forgot my password" to start the password reset process (you will receive a one time password via email), and set your own admin password.

Running and debugging the server

Running the server from the command line.

To run from the command line, use mvn and open http://localhost:8080 in your browser.

Running and debugging the server in Intellij IDEA

  • Locate the Application.java class in the Project view. It is in the src folder, under the main package's root.
  • Right-click on the Application class
  • Select "Debug 'Application.main()'" from the list

After the server has started, you can view it at http://localhost:8080/ in your browser. You can now also attach breakpoints in code for debugging purposes, by clicking next to a line number in any source file.

Running and debugging the server in Eclipse

  • Locate the Application.java class in the Package Explorer. It is in src/main/java, under the main package.
  • Right-click on the file and select Debug As --> Java Application.

Do not worry if the debugger breaks at a SilentExitException. This is a Spring Boot feature and happens on every startup.

After the server has started, you can view it at http://localhost:8080/ in your browser. You can now also attach breakpoints in code for debugging purposes, by clicking next to a line number in any source file.

Deploying using Docker

To build the Dockerized version of the project, run

docker build . -t komunumo:latest

Once the Docker image is correctly built, you can test it locally using

docker run -p 8080:8080 komunumo:latest

Development

Build

We are using Maven to build the Komunumo project. You do not need to have Maven installed! Komunumo makes use of the Maven Wrapper. In the root folder of this project, instead of using the mvn command directly just call the wrapper script ./mvnw (or .\mvnw on Windows).

Test

The integration tests need a database. To provide a temporary MariaDB database, the Testcontainers framework is used. This framework needs a working Docker environment.

Mail

While developing, I highly recommend not to use your real mail server. Instead, I suggest using FakeSMTP. It runs locally on your machine and does not deliver any mail to a real mail account. Instead, all mails are kept locally inside the FakeSMTP client. You can be sure not to accidentally send mails.

Database

Reset

While developing, sometimes it is very useful to reset the database manually. You can do this very easily using Maven and Flyway:

mvn flyway:clean \
    -D'flyway.user'='johndoe' \
    -D'flyway.password'='verysecret' \
    -D'flyway.url'='jdbc:mariadb://localhost:3306/komunumo?serverTimezone\=Europe/Zurich'

This command will clean your database (erase everything). You need to specify the credentials for a database user with administrative privileges to the database and the database URL.

Komunumo will automatically migrate the database schema on the next start.

Repair

When you modify the database schema during development, Flyway will detect the change and complain. If you update the Flyway SQL scripts and don't want to clean your database, you can manually update the schema in your database, too. Then start a repair using Maven and Flyway:

mvn flyway:repair \
    -D'flyway.user'='johndoe' \
    -D'flyway.password'='verysecret' \
    -D'flyway.url'='jdbc:mariadb://localhost:3306/komunumo?serverTimezone\=Europe/Zurich'

This command will update the flyway database history table, so Komunumo will start again without complaining about the database schema. The database schema itself will not be modified. You need to specify the credentials for a database user with administrative privileges to the database and the database URL.

Komunumo will not migrate the database schema on the next start.

Security

There are three levels of security for three areas of the website:

Public access

Most pages are public. There is no authentication or authorization needed to access public pages. These contain public informations only.

Self-service

Members can enter a self-service area to change their email address, postal address, newsletter subscription, etc. The member must be authenticated to access this area. The authentication process is very easy: Komunumo will send an email to the member with a random code valid for five minutes. Within these five minutes the member must enter this code on the website to get access to the self-service area. In the self-service area the member has access to his own information only and the access is limited to the self-service area itself plus the public pages.

Administration

The admin area is protected by a traditional login with username and password. Once authenticated, the user has access to all administrative informations and can execute standard CRUD operations (create, read, update, delete).

Copyright and License

AGPL License

Copyright (C) Marcus Fihlon and the individual contributors to Komunumo.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Authors

Komunumo is led by Marcus Fihlon and has received contributions from many individuals in Komunumo’s awesome community. The project was initiated in 2017 by Marcus Fihlon.

komunumo's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar knoobie avatar mcpringle avatar renovate-bot avatar renovate[bot] avatar shreegilliorkar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

komunumo's Issues

Create permanent event URLs

On the website, the event detail page should have a unique and permanent URL.

Possible template:
/events/<location>/<year>/<simplified-title>

Example:
/events/online/2021/java-17-release-party

Verify and migrate the database on each start

The verification and migration process is done manually using the Maven Flyway plugin. This should be done automatically on each start before the application accesses the database.

Add padding after action buttons on events view

On the left side of the grid in the first column, there is nice padding. On the right side of the last column, there is no padding. It looks like it has been "cut off". I want the same padding there as on the left side of the first column.

image

Speaker can update the event with a personalized link

Generate a personalized link and send it to the speaker(s). The link will display a form with some fields end to enable the speaker(s) to update the event data and the speaker data (like the photo, bio, etc). If the event was in the past, the link will permanently redirect to the event page.

So we don't need to exchange all the data via email between the speaker(s) and the organizer, and by Jira between the organizer and Ursula, who will add it to the website. Streamlining the process…

Implementing BigMarker Excel import of attendees

Upload Bigmarker Excel file to update the attendee list of past events.

  • create form (select event and upload file)
  • read attendee data and update event_member table
  • add missing attendees to table
  • update no-show information

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Branch Automerge

These updates await pending status checks before automerging. Click on a checkbox to abort the branch automerge, and create a PR instead.

  • ⬆️ Update dependency org.apache.maven.plugins:maven-deploy-plugin to v3.1.3
  • ⬆️ Update dependency org.apache.maven.plugins:maven-install-plugin to v3.1.3
  • ⬆️ Update dependency org.apache.maven.plugins:maven-failsafe-plugin to v3.4.0
  • ⬆️ Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.4.0

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/add-to-project.yml
  • actions/add-to-project v1.0.2
.github/workflows/all-tests.yml
  • actions/checkout v4
  • actions/setup-java v4
.github/workflows/codacy-analysis.yml
.github/workflows/contributors.yml
  • minicli/action-contributors v3.3
  • test-room-7/action-update-file v1
maven
pom.xml
  • org.springframework.boot:spring-boot-starter-parent 3.3.2
  • com.vaadin:vaadin-bom 24.4.3
  • org.vaadin.artur:a-vaadin-helper 1.9.0
  • com.vaadin.componentfactory:multi-combo-box-flow 23.1.2
  • org.vaadin.reportui:report-ui 4.0.2
  • org.parttio:line-awesome 2.0.0
  • com.opencsv:opencsv 5.9
  • org.apache.poi:poi 5.3.0
  • org.apache.poi:poi-ooxml 5.3.0
  • org.jsoup:jsoup 1.18.1
  • org.jetbrains:annotations 24.1.0
  • com.google.guava:guava 33.3.0-jre
  • com.github.spotbugs:spotbugs-annotations 4.8.6
  • org.awaitility:awaitility 4.2.2
  • com.icegreen:greenmail-junit5 2.0.1
  • io.github.bonigarcia:webdrivermanager 5.9.2
  • com.github.mvysny.kaributesting:karibu-testing-v10-spring 2.1.8
  • org.testcontainers:junit-jupiter 1.20.1
  • org.testcontainers:mariadb 1.20.1
  • org.apache.maven.plugins:maven-clean-plugin 3.4.0
  • org.apache.maven.plugins:maven-compiler-plugin 3.13.0
  • org.apache.maven.plugins:maven-deploy-plugin 3.1.2
  • org.apache.maven.plugins:maven-install-plugin 3.1.2
  • org.apache.maven.plugins:maven-jar-plugin 3.4.2
  • org.apache.maven.plugins:maven-resources-plugin 3.3.1
  • org.apache.maven.plugins:maven-site-plugin 3.20.0
  • org.apache.maven.plugins:maven-surefire-plugin 3.3.1
  • org.apache.maven.plugins:maven-failsafe-plugin 3.3.1
  • org.apache.maven.plugins:maven-enforcer-plugin 3.5.0
  • com.vaadin:vaadin-maven-plugin 24.4.3
  • org.jooq:jooq-meta-extensions 3.19.11
  • org.apache.maven.plugins:maven-checkstyle-plugin 3.4.0
  • com.puppycrawl.tools:checkstyle 10.17.0
  • com.vaadin:vaadin-maven-plugin 24.4.3
maven-wrapper
.mvn/wrapper/maven-wrapper.properties
  • maven 3.9.9

  • Check this box to trigger a request for Renovate to run again on this repository

Support "members only" events

  • add a new property members_only to the events entity (default: false)
  • add members only option to event admin
  • import members only option from jug.ch
  • add validation for members only events to registration form

Limit events registrations

Depending on the location, there might be only enough seats for a limited number of attendees.

  • add property attendee_limit to the event property
  • add property attendee_limit to the event admin
  • add validation to the registration form
  • show events as "sold out" or "fully booked"
  • send email to the organizer when more than 80% of the limit is reached
  • treat a limit of 0 as unlimited
  • default limit is 0 (unlimited)

Create a speaker entity

  • properties: id, firstname, lastname, email, photo, bio, twitter-handle, linkedin-url
  • own view with grid and details
  • main menu entry
  • linked with events (n:n relationship)

Support different event types

  • add new property type to the event entity
  • type: enum (values: talk, workshop, interview, other)
  • show event type on the website
  • show event type in the grid in admin view

Remove event agenda

Was only used twice the last two years. If the event needs an agenda, it can be added to the description.

Add guest logins

add property status to member entity

Type: enum
Values: member, guest

Members should be able to register for events

  • create a mapping table event_member to store the associations of members to events
  • create a registration form using an email address for members only
  • handle registration event (add entry to event_member table)
  • send registration info mail to attendee
  • handle duplicate registrations
  • handle cancelations (remove entry from event_member table)
  • show number of registered members on event grid in admin view
  • show number of registrations on the dashboard
  • show rate of no-shows on the dashboard
  • show monthly visitors per location on the dashboard

Guests should be able to register for events

  • create a registration form using an email address, first name, and last name
  • create a new entry in the member table
  • handle registration event (add entry to event_member table)
  • handle duplicate registrations
  • handle cancelations (remove entry from event_member table)
  • show number of registered members including guests on event grid in admin view
  • add email address to newsletter

Show active sponsors in website footer

A sponsor is active when the actual date is between valid_from and valid_to.
The value of valid_to might be null if the sponsor contract renews automatically.

Finishing event entity

  • add all missing properties to the event entity
  • add all missing properties to the event view
  • completing test data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.