Code Monkey home page Code Monkey logo

uoftbiohacks's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

thejmazz

uoftbiohacks's Issues

[BACKEND] users can create more than one group

since users can have only one group. The ability to create more than one group overrides previously created groups. so maybe add some constraint when saving group to database. preferably using database operators/flags over if statements.

[Backend] Code refactoring, take a step back -- Finish before moving on to other issues

Mark:
move trim into util, also I will be using trim probably, so check if the variable is undefined, before you trim it, change that please.
also this.response.message = 'invalid email' in validate user, remove that, just send a 400 and leave it at that.
Make a new file for validateUser and put it into auth folder, also due to poor naming (On my end) we are renaming it to validateCredentials, move that in the auth folder.
Also mark, make sure to document your code.

Once again, this will expose you more to the code and getting the hang of it, once that's done, we can move forward with the back end.

Simple Login

In components/Login/Login.js

right now it just alerts based on response. the links to user/all and user/all/csv wont work. Don't use cookies yet - just get an auth request to work first. save token info in the state of this component, instead of <a href="http://localhost:3000/user/all">users as JSON</a> make a getUsers function which is triggered onClick of something, and that function will set the auth headers and get the users.json, log it.

once that is done move onto cookies.

[Backend] Remove yourself from a group

make a route group/:groupid/remove which removes the user from the group, do not forget to remove the user id from the group Schema and save, and as well as removing it from the user.

[Backend] Invite user

" .post('/:groupid/invite', function () {
//Use .invites to add the current group to the other user's invite array
});
"
Post request which will be a JSON such that { userid: mongoose.ObjectID}, push the current group in the params (which is a mongoose objectID to the user invites array.

[Backend] Accept a group request

Make a route for group/:groupid/accept, remember this.userModel is always going to be there, so use that as reference because in the invites array you MUST pop it and save it, then assign the user model group the new groupID, finally return us a JSON like this.

{
userModel: usermodel,
groupModel: groupModel,
message:
}

AS usuall handle bad requests.

[Backend] Populate group

Line 42 in group.js "// GET: sends group with attached group info. although i think should be able to incorporate with router.param.
.get('/:groupid', function* () {
this.body = this.groupModel;
});"
I need you to to get all the information from the group, including the users, since group.users references to another schema (being the user schema) I need you to populate, and return the group model JSON with .users being an array of JSON user models that are contained in the group.

[Backend] Clean up yo mess

Go from an old old old old commit, and find the csv downloader, make it the route /user/all/csv, and same with the other route /user/all which returned the JSON of it.

[Frontend, Backend] Client side encryption

We need to encrypt the front end with at least a basic hash like md5 hash, because every so often the password gets exposed with the get, so we can at least hash it if for some reason that happens, it's better than nothing. Refer to #8, we'll do a combo of both at the end of the day, though any other suggestions would be appreciated. Might research this a bit more

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.