Giter Club home page Giter Club logo

latias-backend's Introduction

Hi there πŸ‘‹

My name is Sebastian and I am a developer currently situated in Uppsala, Sweden, as I am currently studying a MSc in Information Technology with a specilization in Data Science at Uppsala University 🏫

Experience πŸš€

  • πŸ“– I have recently finished my Bachelors Thesis, which was a collaboration with Uppsala Municipality
    • Check out the website developed here!
  • ▢️ I enjoy most thing .NET and it's the language I've used the most but I enjoy picking up stuff at random!

Contact πŸ“ž

LinkedIn

Email

latias-backend's People

Contributors

agupta375 avatar jakobpaulsson avatar kimiyaata avatar niclasgards avatar niclasgardsuu avatar sgronlund avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

latias-backend's Issues

Invalid workflows

Seems like we have duplicate worksflows and that the test workflow has disappeared.
Seems to be a mistake on a recent change.

Dont have the .yml file at hand so cannot do it myself.

How should we implement user fetching questions?

On the front-end, we'll want to display all questions related to the current week in different screens (or the same screen, just re-rendered). This means we'll have to ask the server to return a specific question for each page (since we don't want duplicate questions). But now we have no way to actually separate questions and we can't assume the front-end should keep track of what each question is. There are three approaches to this issue that I can think of.

  1. We redo our askQuestion function to return all questions related to the week instead of just one. After that we can let the client side keep track of which questions it has already used itself. The downside to this is that it's quite tricky to keep track of arguments between screens and we may also want to exclude as much logic as possible on the front-end.

  2. We include another argument in the askQuestion function that would be a number. The advantage of this is that we won't have to store anything on the client-side since we could simply say on the page for the first question that we want to fetch question number one and on the second page we could fetch question number two and so on. This means we only have to keep track of which page we are on. The downside however is that we have to make more emits between server and client.

  3. After we've fetched a question, we remove that question from the database automatically, which means we won't ever get duplicate questions. This would eliminate even more logic from the front-end since we wouldn't even need to include a number (server could just randomize a question to fetch).

Fix so user can't login twice

At the moment, the same user can log in twice from two different devices. We could implement this by checking if the user is already in the users array.

Fix better countdown

Now the server just counts down from a week. Ideally, we would want to open the quiz every Saturday or so.

Some tests cannot be ran in the same suite

test("Login in with wrong password for registered user", (done) => {
serverSocket.on("login", (user, pass, email) => {
expect(backend.clientRegister(user, pass, email, db)).toBeTruthy();
expect(backend.clientLogin(user, "wrongpasswordihope", db)).toBeFalsy();
done();
});
//clientSocket.emit("login", faker.internet.userName(), faker.internet.password(), faker.internet.exampleEmail());
clientSocket.emit("login", "masterquizzer", "thecorrectpassword", "[email protected]")
});
test("Login in with wrong user for registered user", (done) => {
// KΓΆr sjΓ€lv och passar
serverSocket.on("login", (user, pass, email) => {
expect(backend.clientRegister(user, pass, email, db)).toBeTruthy();
expect(backend.clientLogin("wrongusernameihope", pass, db)).toBeFalsy();
done();
});
///clientSocket.emit("login", faker.internet.userName(), faker.internet.password(), faker.internet.exampleEmail());
clientSocket.emit("login", "arealuser", "userpassword", "[email protected]")
});

When running either of the above tests all tests after seem to fail in someway which seems very strange, haven't figured out why and I'd be very happy to get input on this since it is essential to get the tests working so we can stresstest the server

username should not be case sensitive on login

This actually turns out to be more difficult than what I first thought. The problem is the salting and hashing is affected by if the user enters something upper/lower-case and therefore we need to transform everything to upper-case before doing any hashing or salting. This includes the client side.

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.