Coder Social home page Coder Social logo

scionaltera / redemption Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 895 KB

An asset management system for organizations to award prizes for contests and drawings.

License: Apache License 2.0

Java 90.11% CSS 0.78% JavaScript 8.01% Dockerfile 0.46% TSQL 0.63%
contest-management-system charity cancer giveaway-site

redemption's Introduction

Redemption

AWS CodeBuild Dependabot Status Website

Introduction

Redemption is a platform for the folks at 1UpOnCancer to use to manage the competitions and giveaways they do. They have to manage a lot of Steam keys and other prizes, participants and events and needed a database to help with that. I have decided to make it an open source project in case there are other organizations that need a similar way to organize their contest assets.

Running

Locally

The easiest way to get Redemption running is to use the Docker container. To run Redemption on your local machine, make sure you have Docker installed and simply type:

docker-compose up

Deployed

To deploy a production version of Redemption you will need a database. Redemption is only tested using MySQL because that is what our production deployment uses, but other databases should work if they are compatible with Spring Data JPA. You may need to modify the SQL scripts under src/main/resources/db/migration because they may contain features specific to MySQL that don't work on your database.

You will need to change the values in redemption.env to point at the database you have set up, and you will either need to deploy the Redemption Docker container in a service like ECS or Kubernetes, or run the executable JAR on your server. It has Jetty embedded in it, so you shouldn't need to install anything else except Java 8.

Configuration Properties

Redemption needs the properties from redemption.env in order to start up successfully, no matter how it's deployed. You can provide them in any of the various ways that Spring Boot supports. This is not a comprehensive list, but should cover most use cases.

  1. Just edit redemption.env and supply it to docker-compose.
  2. Modify src/main/resources/application.yaml and recompile with ./gradlew clean buildDocker.
  3. Supply the properties as environment variables.
  4. JSON in the SPRING_APPLICATION_JSON environment variable: { "redemption.datasource.username": "admin" }

First Run

The first time Redemption starts up it will create a default user with the username and password admin. When you log in, there will be a banner across the top warning you that your copy of Redemption is not secure. The very first thing you should do is to create a new user, give that user all the permissions, and delete the admin user. Log out and log back in as your new user, and the banner will go away.

Support

The best way to get support for Redemption is to file a GitHub issue. We do not have a large development team and this work is being done on a volunteer basis, so support is on a best-effort basis only.

There currently is no documentation, but we are going to start building out a wiki in the near future. Contributions are welcome.

redemption's People

Contributors

dependabot-preview[bot] avatar scionaltera avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

redemption's Issues

CRUD operations for Participants

As a staff member I need to create, read, update and delete Participants from the system so they can participate in our contests.

Visible alert when deletes fail

When a participant is associated with an event, they cannot be deleted due to a foreign key constraint. The exception is visible in the logs but there is no feedback to the user to explain why clicking Delete didn't work. That exception should be caught and pushed as an explanatory message for the user.

The same is true for deleting events that have assets.

Migrate from MongoDB to PostgreSQL

The data for this project is going to be highly relational, and would benefit from ACID compliance. MongoDB is sufficient for prototyping but not really up to the task when you start adding a lot of foreign keys.

CRUD events

As a staff member I need to create, read, update and delete events to represent our contests and drawings so that we can give away the assets we have created.

Claim an asset

As the winner of an event I need to follow the link in the email I received and claim my asset from the website so that I can get my prize.

Permission groups

As an administrator setting up staff accounts I would like to see permissions grouped by topic (e.g. "asset" permissions grouped together) rather than an unsorted list so it is easier to find the permissions I'm looking for.

It also wouldn't hurt if CRUD permissions had some kind of natural ordering to them.

Associate assets with events

As a staff member I need to add and remove assets from events so that we can track which assets are awarded in each event.

Protect admin accounts

As someone with a brand new Staff account I should not be able to edit or delete the account that created mine, so that the system is protected against bad actors.

Manually close an event

As a staff member I need to be able to manually select the winner(s) and close an event so that it will send out emails to the winner(s).

Bulk load assets

As a staff member I need to bulk load Assets into the system so that I don't have to enter each one individually.

Self service password change

As a staff member without EDIT_STAFF permissions, I'd like to be able to change my own password so that I can keep my account secure.

Support local time zones

Dates are currently all assumed to be GMT. Add support for the user to set their local time zone and present all dates to them in their local time.

Require password change

As a staff member creating and editing other staff member passwords, I'd like a setting to require that they update their password the next time they log in so that if I communicate their password to them via email or instant message it does not stay compromised for longer than it needs to.

Integrate Spring Session

Add Spring Session and store sessions in Postgres. That will enable running multiple copies of Redemption at the same time for higher availability.

Bulk load participants

As a staff member I need to bulk load participants so that I don't have to enter each person by hand.

Specific transport objects for REST responses

For now I have marked Event.participants as an eager fetch because it's easy and it works, but that won't scale well once there are a significant number of events and/or participants. Instead the application should have better separation of layers, such that we don't return JPA entities directly as responses to REST requests.

Requests that need Events without Participants should have a response object of that flavor, and requests that need the Participants should have that flavor. That way the database entities are decoupled from the REST entities and can move separately from one another.

Set default button on forms

The default button on each of the forms appears to be the cancel button in Chrome. Unfortunately that could be confusing and result in lost work if someone fills out the form and hits Enter on their keyboard rather than clicking the submit button. Each form should have the default button explicitly set by adding the default attribute to the button that should be the default one.

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.