Git Product home page Git Product logo

mraible / 21-points Goto Github PK

View Code? Open in Web Editor NEW
285.0 285.0 134.0 42.95 MB

❤️ 21-Points Health is an app you can use to monitor your health.

Home Page: http://www.21-points.com

JavaScript 0.51% Java 41.84% HTML 13.90% CSS 0.29% TypeScript 42.13% Shell 0.21% Dockerfile 0.11% SCSS 0.91% Procfile 0.01% Batchfile 0.08%
angular bootstrap gradle health java jhipster spring-boot typescript webpack

21-points's Introduction

Howdy, folks! 🤠

Matt's YouTube Channel   Follow @mraible on Twitter   Matt on LinkedIn   Matt's Stack Overflow  

  • 🔭 I'm currently working on finding my next gig. See my funemployment story and resume.
  • 💬 Ask me about Java, Spring Boot, JHipster, Angular, or OAuth/OIDC.
  • 😄 Pronouns: He/him.
  • ⚡ Fun fact: I grew up without electricity or running water for 16 years.

Twitter follow @mraible   Linkedin follow @sivalabs   Blog

Languages and Tools

Matt's most used languages

My GitHub Stats

Matt's GitHub stats

21-points's People

Contributors

dependabot[bot] avatar ghanquez avatar github-actions[bot] avatar imgbot[bot] avatar mraible 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

21-points's Issues

The drinking thing..

This is probably just me and my lack of never having learnt a proper english.

If the ultimate target is to reach 21 points then I would have to enjoy a nice dark ale all 7 days in the week to get to the max of 7 x 3 points. Probably not the most healthy option ;-) and during summer time I would not mind.

Maybe it's just a matter of wording.
What about changing the question from "Did you drink?" to "No alcohol consumed?"?

Otherwise not checking the checkbox "Did you drink?" should count as a good thing and add to the total points.

User Registration doesn't work

Hi Matt

Thanks for your wonderful demo about the JHipster project. Just want to let you know that the User registration doesn't work online.

I will try to go through the code and find out. But you may be able to fix it quicker :)

image

duplicate key value violates unique constraint "pk_jhi_persistent_audit_event"

Login and registration fail every-so-often and it seems to be caused by the sequence keys in some of the auditing tables:

2017-12-19T02:44:25.564551+00:00 app[web.1]: 2017-12-19 02:44:25.564  WARN 4 --- [ XNIO-2 task-26] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 23505
2017-12-19T02:44:25.564734+00:00 app[web.1]: 2017-12-19 02:44:25.564 ERROR 4 --- [ XNIO-2 task-26] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: duplicate key value violates unique constraint "pk_jhi_persistent_audit_event"
2017-12-19T02:44:25.564737+00:00 app[web.1]:   Detail: Key (event_id)=(42094) already exists.
2017-12-19T02:44:25.565215+00:00 app[web.1]: 2017-12-19 02:44:25.565 ERROR 4 --- [ XNIO-2 task-26] o.h.i.ExceptionMapperStandardImpl        : HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute statement]
2017-12-19T02:44:25.567741+00:00 app[web.1]: 2017-12-19 02:44:25.567 ERROR 4 --- [ XNIO-2 task-26] o.j.h.w.rest.errors.ExceptionTranslator  : An unexpected error occurred: could not execute statement; SQL [n/a]; constraint [pk_jhi_persistent_audit_event]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
2017-12-19T02:44:27.820781+00:00 heroku[web.1]: Process running mem=523M(102.1%)
2017-12-19T02:44:27.820897+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-12-19T02:44:25.571359+00:00 heroku[router]: at=info method=POST path="/api/authenticate" host=www.21-points.com request_id=b54f7527-7479-42ee-acaa-d6794567c118 fwd="75.171.150.21" dyno=web.1 connect=0ms service=156ms status=500 bytes=550 protocol=https

Question posted to Stack Overflow on December 19, 2017.

Registration takes too long to complete

This happens on Heroku:

#!shell
2015-09-28T22:48:48.266121+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/api/register?cacheBuster=1443480498251" host=www.21-points.com request_id=3f3f9c84-592a-43b5-b2d0-f7338dbd3e96 fwd="50.205.250.184" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0

I clicked register a 2nd time and it gave me a duplicate key error, implying that the first time actually did work. Then I received an activation email about a minute later. Investigate to see why registration is taking so long.
Screen Shot 2015-09-28 at 6.48.33 PM.png


questions about front end

I have 2 questions:

  1. Why is pointsListModification only broadcast from the PointsDeleteDialog component? Should it be broadcast elsewhere too? (for example in create() in PointsService)?

  2. I am trying to understand how the content in home.component.html is shown when the application is accessed initially. I don't see a route for it in app-routing.module.ts and I don't see a jhi-home tag in any of the html templates. How does this work?

Failed to sign in

Hello,
I’m not able to sign in. After the registration page, I click on the URL, then I input the correct password but always the same error message “Failed to sign in! Please check your credentials and try again.”
I had the same error trying to resetting the password.

BR

How to enable ripple effect for the buttons?

After we add bootstrap-material-design the ripples.css and ripple.js are already included on the project, but still cannot make the buttons have ripple effect. How to enable ripple effect for the buttons?

Search function exposes data leakage and a security issue

Hi Matt,

First of all, good work on 21-points. Been using your project to learn up on JHipster and it really helps.

Anyway, was going through the code and it occurred to me that even if I'm logged in as myself (john), and if I go to "Daily Points" and do a search with the following search parameter - o*, all points that match that parameter will appear. Not just mine. (See screenshot below)

screenshot 2018-10-27 at 12 19 47 am

I was even able to edit the fields of a Point entry that belongs to others and save successfully. (I reverted what I edited so as not to tamper with other user's data).

So there are 2 issues here -

  1. Searching allows a user to search for all items that belongs to all users; not just himself/herself (Not sure how to fix this)
  2. Once I was able to see other user's data, I was able to edit and save successfully. (Should be easily fixable)

Timestamps on weight and blood pressure screens are in UTC

The value stored in the database is 2018-11-13 13:06:00. However, the same value returned from the API on 21-points.com is "timestamp":"2018-11-13T13:06:00Z". When I run things locally, the value is "timestamp":"2018-11-13T13:06:00-07:00". It seems I might need to change something on the server so it doesn't add the timezone.

CRUD on same window

Thanks for develop 21 Points based on JHipster, incredible sample thought !

For CRUD I'd like conventional window, which it using same window with parent instead of a pop-up window.
Could you show me how to doing this ?

thanks in advance @mraible

Error starting Tomcat

I've had some sucess with jhipster building a couple of small demos yet I am having trouble building 21points.

29> ./gradlew
:generateMainMapperClasses
:compileJava
:compileScala UP-TO-DATE
:bower
:processResources
:classes
:findMainClass
:bootRun
[INFO] org.jhipster.health.Application - Starting Application on MainMac.local with PID 70659 (/Users/mattkraus/web/21-points/build/classes/main started by mattkraus in /Users/mattkraus/web/21-points)
[DEBUG] org.jhipster.health.Application - Running with Spring Boot v1.2.5.RELEASE, Spring v4.1.7.RELEASE
[DEBUG] org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
[DEBUG] org.jhipster.health.config.AsyncConfiguration - Creating Async Task Executor
[DEBUG] org.jhipster.health.config.MetricsConfiguration - Registering JVM gauges
[INFO] org.jhipster.health.config.MetricsConfiguration - Initializing Metrics JMX reporting
[DEBUG] org.jhipster.health.config.DatabaseConfiguration - Configuring Datasource
[ERROR] org.springframework.boot.context.embedded.tomcat.TomcatStarter - Error starting Tomcat context: org.springframework.beans.factory.BeanCreationException
[WARN] org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474) ~[spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.jhipster.health.Application.main(Application.java:72) [main/:na]
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:98) ~[spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.(TomcatEmbeddedServletContainer.java:75) ~[spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:378) ~[spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletCr(TomcatEmbeddedServletContainerFactory.java:155) ~[spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:157) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE]
... 5 common frames omitted

Line 72 in Application.java is: Environment env = app.run(args).getEnvironment();
/**
* Main method, used to run the application.
*/
public static void main(String[] args) throws UnknownHostException {
SpringApplication app = new SpringApplication(Application.class);
app.setShowBanner(false);
SimpleCommandLinePropertySource source = new SimpleCommandLinePropertySource(args);
addDefaultProfile(app, source);
addLiquibaseScanPackages();
Environment env = app.run(args).getEnvironment();// Line 72
log.info("Access URLs:\n----------------------------------------------------------\n\t" +
"Local: \t\thttp://127.0.0.1:{}\n\t" +
"External: \thttp://{}:{}\n----------------------------------------------------------",
env.getProperty("server.port"),
InetAddress.getLocalHost().getHostAddress(),
env.getProperty("server.port"));

}

https://spring.io/blog/2014/03/07/deploying-spring-boot-applications
When you run your application, Spring Boot will detect that you have a Spring MVC controller and start up an embedded Apache Tomcat 7 instance, by default.

From IntelliJ, 61 tests pass successfully.

I'm on OS X v10.11.1.

Thanks

translation-not-found

Adding preferences, if Weekly Points Goal is below min required value (10) the error message "translation-not-found[error.Min]" is shown. It seems that there should be a i18n message for "error.Min" key.
The same happens with "error.Max" if value above defined maximum (21).

Seems like jhipster does not generate those messages and some manual steps must be done on applications using Min and Max validations.

PS: Project just downloaded from repo, built and run.

Screen-shots attached with the problematic messages.
screenshot from 2018-03-09 10-03-11
screenshot from 2018-03-09 10-10-48

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.