GithubHelp home page GithubHelp logo

savage's Issues

Great Tests

Testing on backend is reasonably thorough for Database and Server! 🥇

Tests

Tests all work and look useful, good docs to get this set up

UI

It's obvs pretty amazing, though it took us a bit of time to really figure out how to use the app even with the readme. If you had in the user inputs some placeholder text so people know what should go in there that would be useful.

Accessibility

Your accessibility score is quite high (72) but there is an issue with form labels. It suggests your username and password fields aren't labelled - they are but you have capitalised the labels in for but not the IDs, change the case of the label and I reckon you'll be on 💯

Documentation

Docs are good and have all the important information. If you break down the user guide a little bit it will be a lot easier to follow, i.e. in steps

Requiring each function

When you do:

const getAllDataQuery = require("./queries/getAllDataquery");
const getSVGsQuery = require("./queries/getSVGsquery");
const postSVGquery = require("./queries/postSVGquery");
const postSHAPEquery = require("./queries/postSHAPEquery");
const getSHAPEsquery = require("./queries/getSHAPEsquery");
const insertSVG_SHAPEquery= require("./queries/post_SVG_SHAPE");

You can do create a file in queries called index.js and inside put:

module.exports = {
getAllDataQuery: require("./queries/getAllDataquery"),
getSVGsQuery = require("./queries/getSVGsquery")
};

Then you can require the whole directory require('./queries);

Then just do queries.getAllDataQuery() etc.

See below:

https://stackoverflow.com/questions/37417422/nodejs-good-practice-to-just-use-the-index-js-to-exports

Cool modularisation in queries (?)

Very cool that each query has its own file! 👍

You have a file (index.js) which exports all the modules in the queries folder. I tried to work out where this file was called but I couldn't work it out. 😕 Could you talk about this in your presentation?

VERY COOL

It works locally and it's extremely cool. WELL DONE :)

Good comments in CSS!

CSS is well modularised and even has commenting to explain what each section is for!

GG 🏅

Comments

Still some comments left over e.g. in db_build.js

Cursor: pointer on input field

You've got cursor: pointer on your input fields, but this probably isn't best practice because it's not a button, so it's misleading for the user.

Screenshot 2019-08-16 at 10 21 06

You've also got your login button black on hover - perhaps another way of showing hover would be better for accessibility?

Screenshot 2019-08-16 at 10 22 59

Vulnerability

when I check endpoin /getAllData I have unrestricted access to your database and all the user's info without being logged in

Screenshot from 2019-08-16 10-42-54

SQL Injection

Good protection against SQL injection

    dbConnection.query("INSERT INTO svg_shape(svg_id, shape_id) VALUES ($1,$2)", 

add gb to "html lang en"

Screenshot 2019-08-16 at 10 11 35

You've declared your language, but lots of countries speak English - and they all speak them wrong except Great Britain! So make sure you add gb to your language setting so users can experience your website in the correct English.

Great design

Love the 'SaVaGe ARTWORK CREATOR' font especially

Question about routing logic

I'm interested in the logic of the following lines. Why would you change the url, rather than keeping the same endpoint and serving up the file?

if (req.url === "/") {
      req.url = "/public/indexProtected.html";
    }

Router.js, lines 9-11

Lack of output messages

Great work, but I don't understand if I have logged in or I have entered wrong username or wrong password. I am not sure where I am in the app, home/standard page or my own page

Clarity

You have a beautiful project, but I can't really enjoy it as I don't get half of it...
Hard to follow the readMe, I don't get how to enter inside of your database, I'm confuse in the project...
But super funky idea! Well done with the SVG! 🍾

Modularisation game crazy

SaVaGe/public/index.js

Lines 1 to 11 in e8df48a

const backendCall = (url, method, data, cb) => {
const xml = new XMLHttpRequest();
xml.onreadystatechange = () => {
if (xml.readyState === 4 && xml.status === 200) {
const response = JSON.parse(xml.responseText);
cb(response);
}
};
xml.open(method, url);
xml.send(data);
};

This is such a good idea. Using the same xhr request function for all the backend requests. AND a callback!? Super impressed.

Congrats

Such a cool idea that almost kinda works!

!(congrats)[https://media.giphy.com/media/g9582DNuQppxC/giphy.gif]

Nifty little trick there

dbConnection.query("INSERT INTO svg_shape(svg_id, shape_id) VALUES ($1,$2)", [svg_id, shape_id] spotted -> adopted, how do you call this again?

Magic.

This is witchcraft and I'm not okay with it.

res.end(file.replace("{{ username }}", username));
handlers.js, line 23

500 vs 404 error

500 indicates a server error. 404 indicates the resource isn't found, which is what you're describing on line 19 of handlers.js (inside your staticAssets function). If one of the requested files isn't found, it probably wouldn't be due to a server error, just an incorrect URL.

Dropdown suggestion

Perhaps add a 'please select' comment to the dropdown for a better user experience?

Screenshot 2019-08-16 at 10 46 56

console.log()

I'm nitpicking now, coz the code is pretty dang good, but there are still a lot of console.logs in the code. Maybe delete once you've finished.

Love the design!!

This is something we all end up saying to each other every week, but I REALLY mean it this week. Your design is fantastic, minimalist, clear. A reminder that white and black can be really powerful. Great job!!

Server-side validation

Great job implementing client-side validation checks and providing descriptive feedback for your users!

It’s worth bearing in mind that, while client side validation can enhance the user experience, it isn’t considered secure.

For future reference, it’s a good idea to repeat regex pattern matching checks on the server side too. Currently, if somebody wanted to bypass your form input regex requirements, they could do so quite easily by removing the HTML required attribute in their browser’s console.

Login portal is beautiful, register next?

Looks like you've got the login working great, and the codebase is very clean and slick. But it's hard right now to use it without a way to register. I'm sure this is next on your list!

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.