# Developing AcadeMix Backend

**URL:** <https://sef.discourse.group/t/developing-academix-backend/94>\
**Category:** Development\
**Created:** [May 23, 2020, 2:47pm UTC](https://sef.discourse.group/t/developing-academix-backend/94 "2020-05-23T14:47:45Z")\
**Posts on this page:** 19\
**Page:** 2

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [June 3, 2020, 2:27am UTC](https://sef.discourse.group/t/developing-academix-backend/94/21 "2020-06-03T02:27:01Z")

</div>

This is not started yet @Gimhan_minion. Yes your help will be great since @Gravewalker is busy with building the UI. I will have a call with you within today. Thanks for asking

---

<div class="post-metadata">

**Author:** ![Gimhan\_minion](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/gimhan_minion/32/109_2.png) [@Gimhan\_minion](https://sef.discourse.group/u/Gimhan_minion)\
**Post date:** [June 3, 2020, 7:40am UTC](https://sef.discourse.group/t/developing-academix-backend/94/22 "2020-06-03T07:40:06Z")

</div>

Yeah sure @YohanAvishke. Thank you for the update 🙂

---

<div class="post-metadata">

**Author:** ![jaye](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/jaye/32/810_2.png) [@jaye](https://sef.discourse.group/u/jaye)\
**Post date:** [June 3, 2020, 3:39pm UTC](https://sef.discourse.group/t/developing-academix-backend/94/23 "2020-06-03T15:39:13Z")

</div>

We need another two APIs to get a single `sub-category` and a `category` by ID.

@YohanAvishke could you please guide @piumal1999 to create those two APIs?

Meanwhile, @anjisvj, you can use a mock API to get the details of a subcategory. Contact @YohanAvishke / @Gravewalker if you have no idea about the payload.

---

<div class="post-metadata">

**Author:** ![anjisvj](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/anjisvj/32/9_2.png) [@anjisvj](https://sef.discourse.group/u/anjisvj)\
**Post date:** [June 3, 2020, 3:47pm UTC](https://sef.discourse.group/t/developing-academix-backend/94/24 "2020-06-03T15:47:04Z")

</div>

Sure I’ll contact them.

---

<div class="post-metadata">

**Author:** ![Gimhan\_minion](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/gimhan_minion/32/109_2.png) [@Gimhan\_minion](https://sef.discourse.group/u/Gimhan_minion)\
**Post date:** [June 3, 2020, 4:42pm UTC](https://sef.discourse.group/t/developing-academix-backend/94/25 "2020-06-03T16:42:58Z")

</div>

@piumal1999 Can you please give a deadline for creating these 2 API’s. I’ve already add the new task in the sheet. You can directly add the possible date in the sheet itself. Thank you!

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [June 3, 2020, 5:21pm UTC](https://sef.discourse.group/t/developing-academix-backend/94/26 "2020-06-03T17:21:59Z")

</div>

Yeah. I added a date to the sheet. I’ll complete the task send a pull request soon

Ps:

> <https://github.com/sef-global/sef-core/pull/43>

---

<div class="post-metadata">

**Author:** ![Gimhan\_minion](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/gimhan_minion/32/109_2.png) [@Gimhan\_minion](https://sef.discourse.group/u/Gimhan_minion)\
**Post date:** [June 3, 2020, 6:33pm UTC](https://sef.discourse.group/t/developing-academix-backend/94/27 "2020-06-03T18:33:20Z")

</div>

Thank you @piumal1999 for the quick update!

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [June 4, 2020, 4:10am UTC](https://sef.discourse.group/t/developing-academix-backend/94/28 "2020-06-04T04:10:24Z")

</div>

Sorry guys, I missed this conversation.  
However, the payloads should be similar to the payloads @Gravewalker has added in the [updating-academix-page](https://sef.discourse.group/t/updating-academix-page/77/47). The only difference is a single category and sub-category should be returned instead of an Array.  
I have reviewed @piumal1999’s [PR](https://github.com/sef-global/sef-core/pull/43) and have requested these changes.

---

<div class="post-metadata">

**Author:** ![Gimhan\_minion](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/gimhan_minion/32/109_2.png) [@Gimhan\_minion](https://sef.discourse.group/u/Gimhan_minion)\
**Post date:** [June 4, 2020, 10:26am UTC](https://sef.discourse.group/t/developing-academix-backend/94/29 "2020-06-04T10:26:46Z")

</div>

Thank you @piumal1999 for finish creating these API’s so quickly. I’ve updated the time-line too. 🤗

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [June 14, 2020, 4:42am UTC](https://sef.discourse.group/t/developing-academix-backend/94/30 "2020-06-14T04:42:33Z")

</div>

PR for the admin APIs

### Goals

- To add admin APIs to create, update & delete Languages, Categories, SubCategories, Items.
- To change entities in order to have more meaningful relationships and to make able to save utf-8 characters

### Approach

1. Create packages for admin APIs and refactor existing admin APIs to those packages
2. Change entities and test to have more efficient relationships and to be able to support utf-8
3. Add API layer, service layer and repositories to handle the new APIs

> <https://github.com/sef-global/sef-core/pull/52>

---

<div class="post-metadata">

**Author:** ![jaye](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/jaye/32/810_2.png) [@jaye](https://sef.discourse.group/u/jaye)\
**Post date:** [June 15, 2020, 5:44am UTC](https://sef.discourse.group/t/developing-academix-backend/94/31 "2020-06-15T05:44:26Z")

</div>

Thanks @YohanAvishke Please schedule a code review and let us know.

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [June 15, 2020, 6:23am UTC](https://sef.discourse.group/t/developing-academix-backend/94/32 "2020-06-15T06:23:37Z")

</div>

Following are the code review details

2020-06-15T14:30:00Z → 2020-06-15T15:30:00Z

> **[Meet](https://meet.google.com/unsupported?meetingCode=eva-bbgx-azm&ref=https:%2F%2Fmeet.google.com%2Feva-bbgx-azm)**
>
> Real-time meetings by Google. Using your browser, share your video, desktop, and presentations with teammates and customers.

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [June 16, 2020, 2:38am UTC](https://sef.discourse.group/t/developing-academix-backend/94/33 "2020-06-16T02:38:07Z")

</div>

Code review notes

**Description**

A code review was held to do a demonstration and to review the code of admin APIs developed for Academix.

* * *

**Attendees**

@jaye  
@Gravewalker  
@anjisvj  
@piumal1999

* * *

**Notes**

- Return the created object as the response in the create APIs
- Refactor all the admin APIs including data retrieval APIs to use the Entity classes itself instead of the DTOs and Projections.  
The possibility of this change has to be tested before implementation. Therefore this will be implemented in a separate PR.
  - This change will effectively remove all the DTOs and Projection classes.
  - This will remove lot of validation code from the service layer.
  - After this change, we can update an entity’s data and it’s translations using a single API.

* * *

**Next steps**

- Bring the PR to a mergeable state
- Start working on the second note I have mentioned above

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [June 16, 2020, 2:46am UTC](https://sef.discourse.group/t/developing-academix-backend/94/34 "2020-06-16T02:46:03Z")

</div>

Updated PR

> <https://github.com/sef-global/sef-core/pull/52>

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [August 9, 2020, 6:37am UTC](https://sef.discourse.group/t/developing-academix-backend/94/35 "2020-08-09T06:37:35Z")

</div>

Currently we have a separate table for languages in the academix database. But we only use two secondary languages. So it’s better to use Enums for the languages. (We can delete the table in this moment because we don’t have any translations yet) What do you think? @akshika47 [@techTeam](https://sef.discourse.group/groups/techteam)

---

<div class="post-metadata">

**Author:** ![jaye](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/jaye/32/810_2.png) [@jaye](https://sef.discourse.group/u/jaye)\
**Post date:** [August 10, 2020, 5:04am UTC](https://sef.discourse.group/t/developing-academix-backend/94/36 "2020-08-10T05:04:31Z")

</div>

Hi @piumal1999,  
I had a discussion with @akshika47 on this.  
The known alternative languages for the scope are only Sinhala and Tamil. And there’s no such a requirement to add a new languages suddenly through the dashboard.

I guess it’s better to go with an Enum.

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [August 10, 2020, 12:35pm UTC](https://sef.discourse.group/t/developing-academix-backend/94/37 "2020-08-10T12:35:20Z")

</div>

Nice. I’m working on this.  
Shall i use “SI” and “TM” as Enums for languages(Sinhala and tamil)? Any other suggestions? [@techTeam](https://sef.discourse.group/groups/techteam)

---

<div class="post-metadata">

**Author:** ![YohanAvishke](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/yohanavishke/32/106_2.png) [@YohanAvishke](https://sef.discourse.group/u/YohanAvishke)\
**Post date:** [August 10, 2020, 1:44pm UTC](https://sef.discourse.group/t/developing-academix-backend/94/38 "2020-08-10T13:44:28Z")

</div>

Hi @piumal1999 it will be more meaningful to use the full locale codes `SI_LK` and `TA_LK `

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [August 10, 2020, 1:57pm UTC](https://sef.discourse.group/t/developing-academix-backend/94/39 "2020-08-10T13:57:17Z")

</div>

Yeah. Thanks @YohanAvishke

Please review and merge.  
[https://github.com/sef-global/sef-core/pull/94](https://github.com/sef-global/sef-core/pull/94)

[Previous page](https://sef.discourse.group/t/developing-academix-backend/94.md?page=1)
