Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time Sheet App - Open source workflow for managing time sheets.

Time App makes it possible to customize time sheet workflows for small companies without spending a lot of money on few paid options available.

Features

  • Extensible Configuration: Allows developers to easily configure their user interface using Angular JS and Spring.
  • Cloud and Local Deployment: Examples demonstrating deployment on Heroku or Ubuntu using Spring Boot.
  • CRUD operations: Complete entities manipulation support using Spring repositories.
  • Custom Validation: JSR-303 annotation-based validation rules support
  • Task Scheduling: Send email/alerts to users using Spring Scheduler.
  • Pluggable Security: Authentication based on Spring Security.
  • REST API: Enriching your application with REST API based on Spring Data REST.
  • Easy integration: Servlet 2.5/3.0 web applications supported

Deployment

IntelliJ IDEA IDE

Environment variables

AWS_ACCESS_KEY_ID=YOUR_KEY
AWS_SECRET_ACCESS_KEY=YOUR_SECRET

VM arguments

-Dserver.port=8080
-Dspring.datasource.url=jdbc:postgresql://localhost:5432/slcsdb
-Dspring.datasource.username=postgres
-Dspring.datasource.password=postgres

Heroku

Run Heroku locally

Create .env file

JDBC_DATABASE_URL='jdbc:postgresql://localhost/slcsdb'
JDBC_USER=postgres
JDBC_PASS=postgres

Create Procfile.local

web: java $JAVA_OPTS -Dserver.port=$PORT -Dspring.datasource.url=$JDBC_DATABASE_URL  \
-Dspring.datasource.username=postgres -Dspring.datasource.password=postgres \
-jar target/services.jar

Build and Run

$ git add . && git commit -m "wip"
$ mvn clean install
$ heroku local -f Procfile.local  

Linux CLI

As a spring boot fat executable jar

java -jar target/services.jar -Dserver.port=$PORT -Dspring.datasource.url=$JDBC_DATABASE_URL  \
-Dspring.datasource.username=postgres -Dspring.datasource.password=postgres \

Or simply using maven mvn spring-boot:run

About this Application

A Simple time sheet submission workflow

This application allows users to submit their timesheet similar to depositing checks online.

  • Step 1: User upload an image/pdf (optional) signed and enter hours for the week.
  • Step 2: Supervisor approves the timesheet after verifying uploaded artifact.

Security

This app is secured using spring-security api's. Some of the features are;

  • csrf or cross site resource forgery protection, this is more secure than simple cors headers. All requests either web or rest must carry csrf token or will be denied. This token is generated once your logs in and keeps on changing.

  • Bcrypt for encrypting passwords. It is stronger than MD5 and generates different hash for same password based on salt.

  • All resources (web and rest) are protected using 'WebSecurityConfigurer'. This allows locking users based on their roles.

Web - Front-End development

This app uses popular front-end libraries like bootstrap, font-awesome, angularjs, angular material design etc. All of this can be easily upgraded or changed using bower, which is used for managing web resources. However authentication and templating for user provisioning is rendered server side using spring-thymeleaf library.

To install web dependencies locally.

npm install
npm install -g grunt-cli
grunt install

Rest API

The front-end uses rest api for querying.

Data Persistence

Uses Spring JPA repository and any database vendor can potentially be plugged in. User uploaded content is saved in AWS S3 buckets.

References

Cors config

http://stackoverflow.com/questions/31724994/spring-data-rest-and-cors https://dzone.com/articles/cors-support-spring-framework http://www.javacodegeeks.com/2014/07/spring-rest-ajax-and-cors.html

About

A project using Spring Boot

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages