Coder Social home page Coder Social logo

tatami's Introduction

Tatami

Presentation

Tatami is an Open Source enterprise social network.

A public installation of Tatami is provided by Ippon Technologies at : https://tatami.ippon.fr

Tatami is made with the following technologies :

Tatami is developed by Ippon Technologies

Installation for developers

5 minute installation

  • Clone, fork or download the source code from this Github page
  • Install Maven 3
  • Install npm
  • Point your terminal to the directory you cloned Tatami to.
    • cd web
    • Type npm install
    • You may need to give root user permissions: sudo !!
    • cd ..
  • Run Cassandra with Maven : mvn cassandra:run
  • Run Jetty from tatami/web with Maven: mvn jetty:run
  • Connect to the application at http://127.0.0.1:8080

To create users, use the registration form. As we have not configured a SMTP server (you can configure it in src/main/resources/META-INF/tatami/tatami.properties - see below "installation for production use" for more options), the validation URL as well as the password will not be e-mailed to you, but you can see them in the log (look at the Jetty console output).

Using Tomcat instead of Jetty

If you want to use Tomcat instead of Jetty (which works better in development mode on Windows), just use :

  • Run Tomcat from Maven : mvn tomcat7:run

Maven tuning and troubleshooting

If you run into some Permgen or OutOfMemory errors, you can configure your Maven settings accordingly :

export MAVEN_OPTS="-XX:PermSize=64m -XX:MaxPermSize=128m -Xms256m -Xmx1024m"

If you want to debug remotely the application with your IDE, set up your MAVEN_OPTS :

export MAVEN_OPTS="$MAVEN_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

Cassandra troubleshooting

On Mac OS X, you should use JDK 6 and not JDK 7, see issue #281.

How to Contribute

In order to assure code quality, Ippon manages the pull requests for the project, and upholds certain rules regarding how individuals may contribute. You may find these rules in your Tatami installation in the file CONTRIBUTING.md.

Installation for production use

Cassandra installation

  • Download Apache Cassandra
  • Install Cassandra : the application will work fine with just one node, but ideally you should have a cluster with at least 3 or 5 nodes
  • Cassandra is configured with its cassandra.yaml file : don't forget to backup your "data" and "commitlog" directories

Tatami installation

In order to use a stable version, use one of the available tags.

Tatami can be configured with the src/main/resources/META-INF/tatami/tatami.properties file. You can configure this file in 2 ways :

  • Edit the file in your own Tatami fork
  • Properties in this file are replaced at build time by Maven : you can set up your own Maven profile with your specific properties

Once Tatami is started, you will be able to check your properties at runtime in the Administration page.

To deploy Tatami :

  • Create the Tatami WAR file : mvn package
  • The WAR file will be called "root.war", as Tatami should be run as the root application (on the "/" Web context)
  • Deploy the WAR file on your favorite Java EE server
  • The WAR has been tested on Jetty 8 and Tomcat 7, and should work fine on all Java EE servers

Upgrading from a previous version

Upgrading is normally just a matter of using a newer version of the application.

Sometimes, you will need to update the Cassandra keyspace: upgrade scripts are available in the src/main/cql/upgrade directory.

Launching stress tests

Stress tests are done with Apache JMeter.

  • Launch Cassandra
  • Run Tatami from Maven with the stress-tests profile : mvn jetty:run -Pstress-tests
  • Launch JMeter
  • Run the src/test/jmeter/tatami-create-users.jmx script : it will create 200 normal users, which each has 200 follower users
  • Run the stress test : src/test/jmeter/tatami-stress-test.jmx

Launching functional tests

Functional tests are a work in progress, you do not have to run them in order to use the application.

Requirement : all components must run on localhost :

  • for LDAP authentication, the tests starts the LDAP server that the Tatami server will use
  • for fixture setup and assertions, the test connects directly to the local cassandra

Launching UI Tests from maven :

  • add this profile on your settings.xml :
<profile>
  <id>tatami</id>
  <activation>
    <activeByDefault>true</activeByDefault>
  </activation>
  <properties>
    <webdriver.chrome.driver>C:\path\to\chromedriver.exe</webdriver.chrome.driver><!--optional-->
    <google.password>xxxx</google.password>
    <google.email>[email protected]</google.email>
  </properties>
</profile>
  • Run Maven with this command : mvn clean verify -Puitest

Launching UI Tests from maven with Chrome :

  • install ChromeDriver in your system
  • configure the property "webdriver.chrome.driver" in your settings pointing to your chrome driver install directory
  • add -Dgeb.env=chrome to the maven command above

Launching UI Tests from your IDE :

  • Enable a groovy plugin on your IDE
  • Activate maven profile "uitest" or add src/integration/* in your classpath
  • Run Tatami with Maven : mvn cassandra:delete cassandra:start jetty:run -Djetty.scanIntervalSeconds=0 -Puitest
  • Run Specs (in src\integration\java\fr\ippon\tatami\uitest) as Junit Tests from your IDE => you have to set adequate system properties to your running configurations (the same as those that are necessary in setting.xml for maven : see above)

Thanks

Jetbrains is providing us free Intellij IDEA licenses, which definitely allows us to be more productive and have more fun on the project!

YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: YourKit Java Profiler and YourKit .NET Profiler.

License

Copyright © 2012-2015 Ippon Technologies

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this application except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

tatami's People

Contributors

adericbourg avatar bescott1 avatar bfl-ippon avatar dmartinpro avatar falydoor avatar farrault avatar fdescamps avatar gcuisinier avatar godu avatar gregdm avatar hegek87 avatar hellsingblack avatar jchampemont avatar jdubois avatar jsevellec avatar jvlians avatar kleiner617 avatar leighadellinger avatar mattdelaf avatar nobullpleb avatar pariviere avatar pierrerust avatar pierrerustorange avatar ptemplier avatar rlespinasse avatar rlheritier avatar spruillkj07 avatar stephanetrou avatar stephlag avatar ylegat 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tatami's Issues

Faire fonctionner le "who to follow"

Dans la page principale, en bas à gauche, la boîte "who to follow" est en fait codée en dur.
Il faudrait un système intelligent pour proposer à l'utilisateur des personnes à suivre (attention, il ne faut pas lui proposer des personnes qu'il suit déjà).
Sur Twitter, il s'agit des personnes suivies par celles que l'utilisateur en cours suit (ses amis au 2ème niveau, en quelque sorte).

Versionner le JavaScript

Le code JavaScript de Tatami est appelé via une URL de type /assets/tatami.js

Il faudrait un numéro de version pour que les navigateurs en prennent une nouvelle version en cas de modification (sinon ils vont garder une vieille version dans leur cache, ce qui causera des bugs graphiques).

Une solution est d'utiliser http://mojo.codehaus.org/buildnumber-maven-plugin/ pour avoir une URL unique à chaque version. On aurait alors une URL de type /assets/1234/tatami.js

On pourrait également avoir une Servlet spéciale pour gérer les ressources :

  • qui mette les bons headers sur toutes les ressources statiques
  • qui puisse gérer le numéro de version de cette manière : /assets/tatami.js?version=1234

Faire une version multi-entreprises

Il faut utiliser l'email comme id à la place du login

Pour un user "[email protected]" :

  • "test" devient l'identifiant utilisateur, on peut envoyer des messages à "@test"
  • "ippon.fr" devient le domaine de l'utilisateur, il ne voit que les utilisateurs/tags/tweets de son domaine

Gérer les liens

Les URLs doivent se transformer en lien (quand un utilisateur tape http://....)

Faire des liens de type bit.ly dans Tatami.
Dès qu'on a une URL, il suffit de faire une URL relative avec une CF spécifique (ID, URL)

Intégrer Twitter et Github

  • Utiliser Spring Social pour pouvoir aller lire des données dans Github et Twitter
  • Créer un daemon (par exemple avec le Taskexecutor de Spring) qui va de manière régulière chercher ces données

Les utilisateurs pourront ainsi s'abonner aux nouvelles Github d'un projet interne à la société

Supprimer Google Charts

C'est plus simple d'avoir une seule librairie, donc autant mettre du Raphael partout (je trouve Raphael plus joli, après on aurait aussi pu faire l'inverse...)

Faire un système de création de compte

  • Jusqu'à présent on avait prévu une intégration LDAP
  • Il faudrait un système où l'on donne son login, puis l'on reçoit un email avec une clef unique pour valider cet email, ce qui permet de créer un compte
  • Prévoir le changement de mot de passe
  • Prévoir un captcha
  • Prévoir le support OpenID
  • Prévoir de gérer le nom de domaine de l'utilisateur

Use the http return codes in the Ajax requests

When an Ajax request is submitted, use its http response code :

       statusCode : {
                    200 : function() {
                        $("#status").html("OK");
                    },
                    400 : function() {
                        $("#status").html("error");
                    },
                    401 : function() {
                        $("#status").html("bad authentication key");
                    }

                }

Fix xss attack

Tweets such as <script>alert('attacked')</script>should not be interpreted.

Mettre en place Bean Validation

Utiliser Bean Validation pour valider côté serveur les requêtes Ajax :

  • Valider qu'un tweet ne dépasse pas 140 caractères
  • Valider la mise à jour du profil utilisateur (email en particulier)

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.