Giter Site home page Giter Site logo

mamute's Introduction

Mamute QA Build Status

Requirements

This project makes use of the following technologies to simplify setup:

How to set up an instance of Mamute

First of all, you need to setup an MySQL database. The default database name is mamute_development, the username is root and the password must be blank.

You may also use Docker Compose to run your MySQL database:

docker-compose -f docker-compose-it.yml up -d

This is useful for running the tests.

To use Mamute

Using docker-compose:

To start an instance of the latest Mamute release and its dependencies:

cd docker
docker-compose up --build

Then you can access Mamute on http://localhost:80.

Using a compiled war file:

  1. Download the war of the latest version at http://www.mamute.org
  2. Unpack it to a folder named yourproject/mamute
  3. Run it by executing the bash script mamute/run.sh
  4. If everything worked, you are free to customize mamute folder as you want to!

Using git + maven:

  1. Clone the repository from github
  2. Install node and npm
  3. Run npm install
  4. Run npm install -g grunt-cli
  5. Run ./scripts/mvn-package.sh
  6. Make a copy of mamute/target/mamute-1.0.0-SNAPSHOT to yourproject/mamute
  7. Run it by executing the bash script mamute/run.sh
  8. If everything worked, you are free to customize mamute folder as you want to!

To contribute with mamute:

  1. Fork the repository from github
  2. Clone the fork
  3. Install node and npm
  4. Run npm install
  5. Run npm install -g grunt-cli
  6. Run Main.java to start mamute
  7. Develop and do your pull request

FAQ

Questions?

Send your questions to mamute meta.

Or to our mail-list: [email protected]

Mamute was developed by www.caelum.com.br and www.alura.com.br developers

mamute's People

Contributors

arnauldvm avatar artdiniz avatar bogosj avatar bryant1410 avatar cpfeiffer avatar csokol avatar erickrar avatar felipetorres avatar felipeweb avatar fernandabernardo avatar guilhermesilveira avatar jamessullivan avatar khajavi avatar leocwolter avatar marcosalles avatar matejbalantic avatar matheusmessora avatar mauricioaniche avatar mistersourcerer avatar monitorjbl avatar paulojribp avatar peas avatar ramswaroop avatar rmeissn avatar taschnue avatar turini avatar xdarklight avatar ympadilha avatar

Stargazers

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

Watchers

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

mamute's Issues

Add documentation to every property in mamute.properties

We have some properties in mamute.properties that doesn't have any description

e.g.:

facebook.app_secret=your_fb_app_secret

host=http://localhost:8080
home.url=/

custom_google_search_key=015657611711082820003:davabg980gk
mail_logo_url=http://localhost:8080/imgs/logo-mail.png

Tests require a running MySQL instance

I'm not sure if this was intended or not, but the tests require you to have a separate MySQL instance. Mamute is written with Hibernate, so it should (hopefully) be able to run the same tests using an embedded DB like H2 without too much effort.

Solr sync on startup

When the application starts up with a fresh embedded Solr instance on an existing MySQL server, no data will exist in the index until a moderator makes a POST request to the index endpoint. This is kind of a pain, it might be better if the sync was a Quartz job that ran at startup.

Question - CommentsAndVotes

I didn't understand the point about CommentsAndVotes class. Is this just a simple relationship between Votes and Comments (ManyToOne - OneToMany)? Why is it a map to store the relationship? Performance?

edited question doesnt show properly edited in "Posts to moderate"

what i mean is, if you create a question with code without code mark format (01010101) and after that edit the post and it goes to the moderation, it doesnt show full formatted, i mean, without the colors, just the "line break";

the image show this:

2014-09-02 16_57_04-

without code mark in the left and with in the right (just what was removed or added)

or its the expected behavior...?

Duplicate fields for username

Mamute has two fields for username: "User Name" and "Real name", we should remove one of them and fix the signup form/user profile

Username should be unique

From now, the field username of the model User should be unique and not case sensitive.
If there's a user called 'leonardo.wolter', no one can create a user called 'Leonardo.wolter'

Improve html sanitizing process

We have to remenmber to call HtmlSanitize.sanitize in every controller that receives input from the user. We should create an vraptor's interceptor or converter to do that job automatically.

A nice way to use that feature would be to do something like that in the controller:

class QuestionController {
  public void save(@Sanitized String sanitized, String notSanitized...) {
    //etc
  }
}

Or by whitelisting the allowed parameters (more secured):

class QuestionController {
  public void save(String sanitized, @NotSanitized String notSanitized...) {
    //etc
  }
}

improvements in answers not allowed to create answer if under 10 points(in their own question)

people are still creating answers when they just want to add a comment or information to the Original Question, normally they have under 10 points, normal, since they dont know how to use the tool BUT, they can be blocked(if they have under 10 points) to create answers in their own question, they can create answers in other user question(even under 10 points) or in their own question when more than 10 points, if they are under 10 and in their question screen, if they click in "ANSWER"

a screen or tooltip show up then something similar to this:

"Hi user you have under 10 points, so you cant create answer in your own question, you can answer other people questions or wait until you reach 10 points, if you have the answer or another comment/information to add, just edit your question(click in edit button) or add it like a comment(click in add a comment)"

Intermittent test failures

Some tests fail randomly when building. Here's a list of tests identified currently, but there may be more:

  • NewsletterSentLogDAOTest#should_return_false_if_wasnt_sent_this_week
  • AnswerInformationTest#should_verify_if_is_before_current_information
  • AnswerInformationTest#should_verify_if_is_not_before_current_information
  • QuestionInformationTest#should_verify_if_is_before_current_information
  • QuestionInformationTest#should_verify_if_is_before_current_information_without_edits

All of these tests have something in common: they depend on time comparisons at the millisecond level and the values being tested are within 1-2 milliseconds of each other. Almost all of these tests are relying on the system time when instantiated, so faster computers will run into these errors.

It appears that these values need to be explicitly set so that the tests pass consistently

Image upload

The user should be able to choose between upload a image or use gravatar.
Currently gravatar is the only option.

Grunt modifies source files

Not sure if this is intended or not, but Grunt modifies the actual source files when it runs in the Maven build. I think this should only happen in the target directory.

Multiple database support

Right now, Mamute only supports MySQL databases. It would be useful to developers and users if it supported at least a few of the other major players (Oracle, PostgreSQL, etc.) and an in-memory database for local development.

Note: there appear to be a few DAO dependencies on MySQL's syntax, but since the application already uses Hibernate it should be possible to work around them.

improvements in moderation -5 points unable to post

Last week we saw a stupid guy creating a useless questions and answers in a huge number of topic at the GUJ Questions.

Even after receiving several negative points, he was still allowed to create useless posts, so i think would be good to create a blocklist for users to at least -5 points, automatically placed on this list after reached this negative value, and he will not be allowed to post comments, answers , scoring, flag, edit, etc., read only state, until some moderator remove the user from blocklist and set his score to 0 points (can be auto setted when removed from list)

Trouble in comment field

By clicking to send a comment, then, to type some text, cancel it and click to send a new comment at other time, the typed text previously continues in the field. This happen too when the comment has been sent instead canceled.

Create an ApplicationHelper to encapsulate keys

Create an ApplicationHelper encapsulating duplicated keys from messages.properties and environment.properties such as siteName and feature toggles.

ex:

@Produces @Named("siteName")
public String getSiteName(){
   // read the site.name property from bundle
   return siteName;
}
//by @Turini

LDAP moderator status updates

There is currently no way to make someone a moderator if they leave the moderator LDAP group. The authenticator should update the moderator flag on each login.

Migrate markdown libraries to standard markdown

Github, reddit and stackoverflow are gathering forces to create markdown standard language. They recently released a specification and an implementation in js and C: http://standardmarkdown.com/

I think we should consider use this implementations since it will probable become a standard in the future. It seems to be more powerful and still supporting the syntax of our current implementation (marked.js).

Offer question suggestions based on title

When a user starts typing a question title, he should be presented with a list of similar questions. This is a very useful feature on Stackoverflow; it's often been the case that I start typing my question and find a solution before I have to ask it.

Doubt - migrations folder

Inside the main folder there are 4 folders.

  • java
  • migrations
  • resources
  • webapp

Why migrations is outside of java folder? My IDE is getting crazy about that folder.
Locally I moved it to _/src/main/java/org/mamute/_migration** and everything works fine 😄

Mamute should support LDAP

For those wanting to use Mamute internally, the ability to use LDAP is pretty important. Users definitely don't want to have to sign up to use the app if they've already got a known user/pass for their organization.

There should be an optional feature that, when activated, allows users to log into the system using their LDAP credentials. The Mamute User profile should be created on the first login, and the user should not have to create an account. The account creation UI should be disabled entirely while this feature is active.

Improve implementation of optional features

Some features can be enabled/disabled with environment properties. Because of this, we spread over our code a lot of ifs such as this:

        if (env.supports("feature.newsletter")) {
            LOG.info("sending newsletter emails");
            ScrollableResults results = users.moderators();
            newsMailer.sendTo(results, true);
            result.notFound();
        }

We could do better than that, maybe using cdi to disable/enable components of mamute accordingly with the environment properties.

Refactor brutal-include into a proper tag

Right now, brutal-include is a tagfile and we are using scriptlet to implement it. We should create a proper tag class to implement it (the code would be cleaner and we could also test it)

This is a path to also define variables in the scope of the included file.

Email verification should be required

The model User already has a field called confirmedEmail, we should implement the feature to set it (at the moment no one has confirmedEmail=true).
It should be required to use the system (we should verify it with a CustomBrutauthRule) and, if the user isn't verified, we should alert them and offer an option to change the email to a valid one.

This feature should be optional (see feature toggles at mamute.properties)

Implement a basic badges system

We should gamify mamute more strongly so the community will be encouraged to interact more.
A first step to do this is implementing a basic badges system

Link to flag question or answer translation is misleading

The flag text translation marcar misleads the user since the translation for selecting an answer as a solution is also marcar.
It should be changed to reportar, a more commonly used translation for flagging something as having any kind of bad content.

# FLAG COMMENT
flag.submit = Reportar
flag = reportar

Index sync job

It would be nice if the index could sync itself periodically to make sure that no questions were missing from it. Right now, the only way to do this is a messy cURL script to hit the sync endpoint as a moderator.

The sync should be able to be incremental as well as full so it doesn't have to read the whole database each time.

Create a easier way to override i18n messages

Right now, to customize i18n messages, the developer needs to override the original messages.properties of mamute. So when the developer update to a newer version o mamute, all customizations are lost.

All messages should be loaded from two files for each language. For example, to load a message with the key "message.key", we should:

  • load the message from a file like messages_pt_BR.properties if present
  • if not, load the message from mamute.message_pt_BR.properties

@leocwolter edit:

An option would be specializing this class: https://github.com/caelum/vraptor4/blob/master/vraptor-core/src/main/java/br/com/caelum/vraptor/core/JstlLocalization.java to produce a custom bundle that searches on mamute.messages_pt_BR.properties if messages_pt_BR.properties doesnt have the key the user is requesting

Its exactly the same thing we do on this class to use mamute.properties: https://github.com/caelum/mamute/blob/master/src/main/java/org/mamute/vraptor/environment/MamuteEnvironment.java

mvn-package.sh does not run on OSX

I see that the script is using readlink to find the location of the project. Apparently OSX doesn't like that, and I believe there is an easier way to do this that should work on any *nix system.

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.