Skip to content
/ hours Public

Application to keep time registration of projects

License

Notifications You must be signed in to change notification settings

bast1aan/hours

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hours

Application to keep time registration of projects.

The application is devided into:

  • login management; set of models, jsps and struts actions to login, logout and regain a new password by email.
  • frontend javascript application build with BackboneJS models and views
  • struts2 json backend, set of controllers serving request between the frontend and database backend.

(C) Copyright 2016 Bastiaan Welmers

how to build and run

Requirements:

  • java-openjdk 6 or higher
  • java-openjdk-devel
  • tomcat 6 or higher to run the application
    another servlet engine implementing servlet api 2.5 or higher should work as well (not tested)
  • database engine working with JDBC. I use postgresql for this.
  • apache-ant to build the application
  • apache-ivy to resolve dependencies for the application

There are several dependencies that are retrieved by Ant Ivy. Please look at the ant resolve task in build.xml and ivy.xml

How to build:

  • Create the tables in your database engine with the SQL script hours.sql in the directory db/
  • Find a proper JDBC connector for the database engine you use. For postgresql see http://jdbc.postgresql.org/download.html Place the jar in the lib/ subdirectory.
  • create a new settings.properties in the src/ directory with information how to connect to the database. See settings-example.properties what is needed.

Then use ant to resolve dependencies and build the project:

  • $ ant resolve
  • $ ant build

Then place the generated war file in the tomcat webapps directory:

  • $ cp hours.war /var/lib/tomcat/webapps/

The application should then be available under http://localhost:8080/hours/ !

To start using the application, create an initial user in the database:

INSERT INTO users(username, fullname, email) VALUES ('john', 'John Doe', '[email protected]');

then go to the access code page to generate a new code: http://localhost:8080/hours/newcode.jsp the code will be send to you by email. With the link in the email you can set a new password and start using the application.