hoodiehq / camp

:circus_tent: Welcome to Hoodie Camp!
https://hoodie.camp
Apache License 2.0
99 stars 55 forks source link

[hoodie-account-server] save createdAt & signedUpAt timestamps #61

Closed LowProfileDog closed 8 years ago

LowProfileDog commented 8 years ago

This issue is reserved for Fullstack โšก๏ธ Open Source | Hacktober Edition

๐ŸŽƒ๐Ÿ’ป๐Ÿ‘• Hacktoberfest: Trick or Treat!

If you havenโ€™t yet, sign up for Hacktoberfest to earn an exclusive T-Shirt. Plus Iโ€™m sure we can teach you a cool trick or two in the process

๐Ÿค” What you will need to know

You should have worked with JavaScript, Node.js and Testing. This is a rather advanced issue, you will need to write tests yourself and then resolve the issue. If you havenโ€™t done that before, better look for another issue :)

Some knowledge about Hapi will help but you can figure it out if you know the things above :)

๐Ÿž The Bug

A special aspect of Hoodie is that it works offline. A side effect of that is that you can use an application even without signing up. To see an example of that, open https://minutes.io/welcome and click on "Try it now".

What we want to do now is to save the timestamp the user opens the app for the first time, as well as the timestamp the user eventually signs up (creates account on the server using hoodie.account.signUp()

Right now, neither of these timestamps are stored.

:dart: The goal

The PUT /sessions/account request that hoodie.account.signUp() sends will include a createdAt property besides username, password and id. If itโ€™s not, set it to the current time (new Date().toISOString()).

Additionally, add the property signedUpAt and set it to the current time.

That way we can later do analysis on our appโ€™s users in terms of how long it took them to sign up after they started using the app :)

:clipboard: Step by Step

If this is your first, welcome :tada: :smile: Here is a great tutorial on how to send a pull request using the terminal.

Ping us in the Hoodie Chat or on Twitter

hextor commented 8 years ago

I would like to attempt this.

gr2m commented 8 years ago

@Ghalander Simon is already working on it, sorry! But check out the other issues. Most of the available ones are reserved for todayโ€™s event here at Fullstack LA, but we will free them up tonight