Skip to content

Commit

Permalink
Added API documentation for user service (#20)
Browse files Browse the repository at this point in the history
* Merged upstream main

* Added documentation for user service

* Added API documentation for user service

* Minor change

* Removed  unwanted file

* Removed @docusaurus/plugin-content-blog from package.json
  • Loading branch information
arati-tekdi authored Dec 5, 2024
1 parent d2cf84e commit 149df69
Show file tree
Hide file tree
Showing 74 changed files with 21,657 additions and 17,914 deletions.
2 changes: 1 addition & 1 deletion docs/event-service/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Event Service",
"position": 1,
"position": 2,
"link": {
"type": "generated-index",
"description": "Learn about Event service"
Expand Down
14 changes: 7 additions & 7 deletions docs/notifications-service/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"label": "Notifications Service",
"position": 1,
"link": {
"type": "generated-index",
"description": "Learn about notifications service"
}
}
"label": "Notifications Service",
"position": 3,
"link": {
"type": "generated-index",
"description": "Learn about notifications service"
}
}
14 changes: 7 additions & 7 deletions docs/tekdi-style-guides/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"label": "Tekdi Style Guides",
"position": 2,
"link": {
"type": "generated-index",
"description": "Learn about lanauge specific styleguides being used at Tekdi."
}
}
"label": "Tekdi Style Guides",
"position": 4,
"link": {
"type": "generated-index",
"description": "Learn about lanauge specific styleguides being used at Tekdi."
}
}
2 changes: 1 addition & 1 deletion docs/tools/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Tools",
"position": 21,
"position": 5,
"link": {
"type": "generated-index",
"description": "Know more about recommended tools"
Expand Down
29 changes: 29 additions & 0 deletions docs/user-service/1_about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
sidebar_position: 1
---

# About

The User Service primarily focuses on user management. As a versatile service supporting multiple features, it incorporates the following key concepts:

1. **Tenant**

A tenant is essentially a high-level grouping of users, similar to a domain. The service allows for creating, updating, and assigning tenants to users.

2. **Cohort**

A cohort is a more granular grouping of users based on common attributes or features. You can create cohorts and assign users to them as needed.

3. **Roles**

Roles are used by the application for various purposes, as the term suggests. Custom roles can be created, and these roles are specific to each tenant.

4. **Privileges**

Privileges are used to implement Role-Based Access Control (RBAC). Custom privileges can be created based on specific requirements, and they are currently mapped to roles.

5. **Field**

There are two types of fields: core/primary and custom. Core fields are directly stored in database columns, while custom fields are created and stored separately based on specific requirements.

For instance, in a Learning Management System (LMS), tenants can be defined as different programs. Cohorts would represent student classes or groups within a particular state. Roles could include Admin, Teacher, and Student. Privileges might encompass actions like creating or deleting users, as well as viewing or updating profiles. Core fields would consist of fundamental information such as username, email, and contact details. Custom fields could include attributes like gender, with a radio button type offering options like male or female.
57 changes: 57 additions & 0 deletions docs/user-service/2_features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
sidebar_position: 2
---

# Features

## Features of the Teacher's Web Application

### 1. Tenant Management

**Create and Manage Tenants:** Ability to define and manage multiple tenants, which could represent distinct programs or domains within the system (e.g., different courses or educational programs).

**Assign Users to tenant:** Assign users to specific tenants, ensuring that each user is linked to the relevant domain or program.

**Update Tenants:** Modify tenant details as needed, such as updating tenant names, descriptions, or settings.

### 2. Cohort Management

**Create and Manage Cohorts:** Ability to group users based on common characteristics (e.g., by class, location, or course). Cohorts help organize users into smaller units for targeted management.

**Assign Users to Cohorts:** Users (e.g., students) can be assigned to specific cohorts, such as specific classes or groups within a state or program.

**Edit Cohorts:** Modify or update cohort membership and details, including adding/removing users from a cohort.

### 3. Role Management

**Define Roles:** Ability to create and manage various roles such as Admin, Teacher, and Student. These roles define the level of access and responsibility for users within the system.

**Custom Roles:** Support for defining custom roles based on specific needs for each tenant, such as a specialized role for staff or course facilitators.

**Assign Roles to Users:** Assign appropriate roles to users based on their responsibilities (e.g., Admin for system-wide access, Teacher for course management, Student for course participation).

**Role-based Permissions:** Control and restrict user actions based on assigned roles, ensuring the right access levels.

### 4. Privilege Management (RBAC)

**Custom Privileges:** Ability to create custom privileges based on specific organizational needs, such as granting permissions for specific actions like creating users, managing courses, or updating user profiles.

**Role-Based Access Control (RBAC):** Privileges are mapped to specific roles, allowing for precise access control. Users with different roles (e.g., Admin, Teacher, Student) can be granted different sets of privileges.

**Privilege Assignment:** Ability to assign specific privileges to users depending on their role, ensuring that they have the necessary permissions for their tasks (e.g., Admins can create/delete users, Teachers can update course content).

### 5. Field Management

**Manage Core Fields:** Core fields are essential data attributes directly stored in the database (e.g., username, email, contact number). These are key identifiers and contact points for users.

**Update Core Fields:** Ability to update essential user information stored in the system. This could include updating usernames, contact details, or email addresses.

**Create Custom Fields:** Custom fields can be created for specific needs, such as gathering additional information beyond the core fields (e.g., gender, age group, location).

**Custom Field Types:** Support for multiple custom field types, such as text fields, dropdowns, radio buttons, checkboxes, etc.

Custom Field Examples: For instance, a gender field could use a radio button to allow users to select between options like "Male" or "Female." Custom fields are stored separately from core fields and can be managed based on the specific requirements of each tenant or user group.

### 6. User Profile Management:

**View and Update User Profiles:** Ability for users or administrators to view and update personal information stored in the user profiles. This may include core fields or custome fields depends on requirement.
18 changes: 18 additions & 0 deletions docs/user-service/3_getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
sidebar_position: 3
---

# Getting Started

Before setting up the notification service, ensure you have the following prerequisites
### Prerequisites ###

- [Node.js] - Version 14 or later
- [NestJS] - Familiarity with NestJS framework
- [PostgreSQL] - Database for storing notification data


[//]: #
[Node.js]: <http://nodejs.org>
[NestJS]: <https://docs.nestjs.com>
[PostgreSQL]: <https://www.postgresql.org/>
17 changes: 17 additions & 0 deletions docs/user-service/4_tech-stack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
sidebar_position: 4
---

# Tech Stack

#### Framework :
- **nest.js** (for Node.js)

#### Language :
- **typescript**

#### APIs :
- **REST**

#### Database :
- **PostgreSQL**
7 changes: 7 additions & 0 deletions docs/user-service/5_architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 5
---

# Architecture

@TODO
Loading

0 comments on commit 149df69

Please sign in to comment.