Code Monkey home page Code Monkey logo

fivesquare's Introduction

fivesquare

fivesquare's People

Contributors

kateryna-gelashvili avatar

Stargazers

5l1v3r1 avatar

Watchers

James Cloos avatar Utku Özdemir avatar  avatar

Forkers

utkuozdemir

fivesquare's Issues

Reset Password Flow

At login screen, there should be an option "forgot password"
When user clicks on it, he needs to enter his email and click on the button "request password reset"
After clicking to that button, user should receive an email with an unique link to reset the password.
When user clicks on that link, he goes to a page with two password fields: new password and new password again.
After filling these, user should click "submit", and see a notification that his password is changed successfully and he can login with his new password, and should be taken to the login page.

Tips: This might seem like a simple task but it involves many different steps & things.
1- To send emails, you need to use JavaMail. The library commons-email can make things simpler for you. You can create a new gmail account specifically for that, it'll be the address used to send emails. You need to enable SMTP and IMAP for this account on account settings, also need to enable "less secure" apps, as described in here.

You can create a simple project with a main method and first try to send an email from this account, using commons-email to your personal email address, and when you succeed on that, move on to the next step.
2- You'll possibly need to create a new table in the db for that, something like password_reset_request maybe? When I request a password reset, it should create a record in this table.
3- The email will contain a link which is unique. It can contain an unique parameter (query string). How can you create a unique string in java?
4- When I click on that link, I will get back to the Java (Vaadin) app. But this time, app should welcome me different, with a password reset screen instead of the default screen. You need to read the request path and parameters to do that somehow.
5- From the unique request parameter (the link from email), the platform should know to which user this reset request belongs to. Use the table here :+*

Hibernate: Full Java Configuration

XML configuration is an old and error-prone trend, and getting replaced by java configuration by most of the libraries. Migrate Hibernate to have full java configuration & finally remove hibernate.cfg.xml.

Profile Picture Upload

After logging in, there should be a menu to change user settings.

There should be an option to upload a profile picture.
I upload a picture from my computer, it's size (widthxheight) should be validated, if width or height is bigger than 440px, it should give an error "Please upload a smaller image". When I click "Save" after uploading, it should be stored in the database. Tip: Google "BLOB Hibernate"

If I already have a profile picture, it should be shown in this screen, in a box. There should be an option to remove it also. :+*

Profile Picture Photo Upload from Webcam

Depends on #2.

Users should be able to take photo from webcam and use it as profile picture.

This issue has several steps, adding an addon to Vaadin and recompiling the widgetset. I will help you on that when you start it.

Logging: Make logging async

Currently our loggers are doing the appending in the thread they're called from, and that might cause slowness. Better to just hand the logs to another thread and it'll do it asynchronously.

Use email address instead of username for login

Emails are unique among people, and we basically need the email address for password reset, so it's better to follow this approach. Emails should be validated on register, login and before going to the database (by hibernate).

Tips: Check vaadin field validations, commons-validator and hibernate-validator.

:+*

Move from Hibernate to full JPA

We're using Hibernate specific APIs for now.

It is good but it would be better to move to JPA. Instead of using Hibernate Session API, migrate the project to JPA EntityManager API, and minimize the imports from the org.hibernate package.

Hibernate hbm2ddl configuration

Project should be configured such that, when I run the project, if it can connect to the database with given credentials (database exists, username and password are correct), it should create all tables from your domain classes. So, I won't need to take the database schema from you, I'll just create an empty database and run the project. :+*

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.