KED-2020 / api-mind-map

1 stars 1 forks source link

Things to complete #9

Open derrxb opened 3 years ago

derrxb commented 3 years ago

Here's a few things we can do:

Front-End

Back-End

Data Sources

We need to add various other API sources for our data.

Edits:

@Kyeg @eslywadan

derrxb commented 3 years ago

Hi! I will work on these today:

  1. Create Inbox form (front-end): This will just be one the front-end since we already have the backend working.
  2. Create Favorites table (API): I think this can be linked to an inbox. I.e. an inbox has a favourite table and a favourites table belong to an inbox.
  3. Create Subscriptions table (API): This is the same as the favourite. i.e. an inbox has subscriptions and a subscription belong to an inbox.
  4. Allow users to save or delete a suggestion: API endpoints
derrxb commented 3 years ago

I'm still working on the tasks above. Will try to get them done today.

derrxb commented 3 years ago

I worked on creating the favourites table today. However, after playing around with it for a bit, it seemed a bit off. So I implemented this by creating a join table called inboxes_documents that should link and inbox with documents. And whenever a record is added to this table, you establish a saved_document or favourite. @Kyeg @eslywadan What do you guys think?

Also, I feel like something similar can be done for topics and subscriptions. We currently have a document => topics link and so I plan to add an inbox => topics link. In which this relationship is stored in a inboxes_topics table. With this, adding/removing a topic is pretty much just removing or adding a topic.

derrxb commented 3 years ago

I'm working on the API endpoint for subscriptions in an inbox. I'm thinking this would be the useful API endpoints:

@Kyeg @eslywadan

Kyeg commented 3 years ago

Ok, it seems reasonable

derrxb commented 3 years ago

I've completed the tasks I mentioned I would be working on here: https://github.com/KED-2020/api-mind-map/pull/13

derrxb commented 3 years ago

I opened another PR here: https://github.com/KED-2020/api-mind-map/pull/14 that makes some changes to the controller by adding the front-end. I'm planning on implementing these front-end parts now:

derrxb commented 3 years ago

I opened two PRs to completed the tasks mentioned in the above comment: API PR https://github.com/KED-2020/api-mind-map/pull/17 & APP PR https://github.com/KED-2020/app-mind-map/pull/4

derrxb commented 3 years ago

I'm going to work on the two following tasks on the front-end:

Thankfully, the back-end is already created for these. So I'll add any additional required changes to the backend while working on this.

Kyeg commented 3 years ago

Ok, I have tested API PR #17 &APP PR https://github.com/KED-2020/app-mind-map/pull/4. You can merge them.

derrxb commented 3 years ago

Here's an update on my progress. I've updated two PRs to complete the tasks mentioned in comment above: APP PR https://github.com/KED-2020/app-mind-map/pull/5 & API PR https://github.com/KED-2020/api-mind-map/pull/18

Also, how's your part coming along @Kyeg. I'm really hoping it's possible to get that done before tomorrow afternoon since it's one of the most important parts of the project. In the meantime, I'll make sure to finish as many features as I can.

@eslywadan How is it coming along with adding the additional API gateway? I've added Subscriptions above that allows users to specify some keywords they'd to take into account when gathering suggestions. This can help you test that the API gateway actually works or is useful.

P.S I'm taking a break right now. But I'll merge in the branches in about 15-20 mins. Not sure if you guys would be able to look into in that short time though.

derrxb commented 3 years ago

Hey, I'm going to work on the following tasks on the front-end & back-end:

Hopefully, I can get that done before I sleep. We also need to start to work on our Google Slide's presentation. I will see if I can add some stuff to it before I go to bed.

derrxb commented 3 years ago

Here's another update on my progress. I've updated two PRs to complete the tasks mentioned in the comment above => API PR https://github.com/KED-2020/api-mind-map/pull/19 & APP PR https://github.com/KED-2020/app-mind-map/pull/6

The API PR is broken right now due to a change I made recently. However, I will try to fix this asap. Or maybe tomorrow. I'm not sure. It's a bit late rn and I don't have really have that much more time to commit to this. I've had the flu and sore throat for the past few days and really need to get sleep.

derrxb commented 3 years ago

So I fixed the broken PR. I'll merge them in the main now. All tests are passing :)

derrxb commented 3 years ago

The last task I'll work on before I get some sleep will be to enable the guest inbox feature. For guest inbox, the user shouldn't care about manually creating an inbox. We simply store the inbox ID in a cookie for them. And then all the features work as normal

derrxb commented 3 years ago

The guest inbox was completed and merged here: https://github.com/KED-2020/app-mind-map/pull/7

Kyeg commented 3 years ago

Ok, I have tested the API PR https://github.com/KED-2020/api-mind-map/pull/19 & the APP PR https://github.com/KED-2020/app-mind-map/pull/7. It looks great! Thanks!

As we have subscription page, I think the following hard-code part can be replace by our real api. https://github.com/KED-2020/api-mind-map/blob/e9cebfbafd75ccf610f83758b85ed6bf662e9d15/app/domain/inboxes/mappers/inbox_mapper.rb#L12

And another little error is when we try to find a non-existed inbox url, the ERR_TOO_MANY_REDIRECTS will pop up. I guess the router is broken here, but I think it's just a little problem for our demo.

Kyeg commented 3 years ago

By the way, @derrxb are you using cookie/session in our front-end?

I think it looks excellent! It just like a simplified account system, no matter the guest (random id) or a user-defined account looks smooth. Because it's maybe a different architecture between we and other teams, I think we can emphasize this in our presentation.

I will try to deploy it on the Heroku, checking whether it has no problem.

derrxb commented 3 years ago

We basically use the cookie to store the inbox_id. So the user doesn't have to worry about creating an inbox. I want to add a button that upgrades the inbox to a regular inbox.

Kyeg commented 3 years ago

I have deployed the latest branch, and open 2 PR about the production env: API: https://github.com/KED-2020/api-mind-map/pull/20 APP: https://github.com/KED-2020/app-mind-map/pull/8

derrxb commented 3 years ago

I know. But the subscriptions part should be replaced with the worker? We still don't have the scheduled worker or concurrency party set up yet.