Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/user-service/1_about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
---

# About

The Teacher's Web Application helps facilitators easily manage their own and students' attendance, organize student groups (cohorts), and handle assessments. Facilitators can mark and view attendance, manage student groups, and distribute assessments. Students can complete assessments online, and facilitators can view their scores. It's a simple and efficient tool for managing classroom activities.
26 changes: 26 additions & 0 deletions docs/user-service/2_features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
sidebar_position: 2
---

# Features

## Features of the Teacher's Web Application

1. **Attendance Management**
- Facilitators can mark their own and students' attendance for current and past days.
- Easily mark attendance for multiple students at once.
- View past attendance records.
- If a co-facilitator marks attendance, others can’t change it.
- If no attendance is marked, that day isn’t counted in the attendance percentage.

2. **Center Management**
- Facilitators and team leaders can create and manage student groups (cohorts) by location (State, District, Block, Village).
- Facilitators can add students to their cohorts.
- Mark students as dropouts, which disables their attendance or assessment activities but keeps their records.

3. **Assessment Management**
- Facilitators can share a link for students to take MCQ-based assessments.
- Students can log in, complete the test, and view their scores.
- Facilitators can view students' scores on each question.

These features make it easy for teachers to manage attendance, organize students into cohorts, and handle assessments efficiently.
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
8 changes: 8 additions & 0 deletions docs/user-service/6_database-schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
sidebar_position: 6
---

# Database Schema

- DB Schema / Data Model
https://docs.google.com/spreadsheets/d/17QaVuia2B5TMi7RoqHH5rT9Jizg7l-Cy0lU69RqvsmY/edit?gid=935210232#gid=935210232
12 changes: 12 additions & 0 deletions docs/user-service/7_api-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
sidebar_position: 7
---

# API Docs

- API Docs (swagger, postman)
- swagger
https://dev.invigorate.onebillionliterates.org/api/swagger-docs/

- Sheets for all ApiDocs
https://docs.google.com/spreadsheets/d/1TvxZXfNXJahbM_eOP5rOhgQSLPwv2Eq0ouHdmlXZNmk/edit?gid=391724857#gid=391724857
57 changes: 57 additions & 0 deletions docs/user-service/8_devops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
sidebar_position: 8
---

# Devops

Installation
- Steps to install locally for development

#### 1. Clone git repository ####
```sh
git clone https://github.com/tekdi/user-microservice
cd user-microservice
npm install
```

#### 2. Setup DB #####
Make sure you have PostgreSQL installed and running. Create a database for the user service

#### 3. Environment Variables ####
Create a .env file in the root directory of your project and add the necessary environment variables.

```dotenv
#server
POSTGRES_HOST="add-here"
POSTGRES_PORT="add-here"
POSTGRES_USERNAME="add-here"
POSTGRES_PASSWORD="add-here"
POSTGRES_DATABASE="add-here"
POSTGRES_SCHEMA="add-here"

#KEYCLOAK
KEYCLOAK="add-here"
KEYCLOAK_ADMIN="add-here"
KEYCLOAK_ADMIN="add-here" #creation in pratham realm
KEYCLOAK_USER_TOKEN="add-here"
KEYCLOAK_REALM_RSA_PUBLIC_KEY="add-here"
KEYCLOAK_CLIENT_ID="add-here"
KEYCLOAK_REALM="add-here"
KEYCLOAK_CLIENT_SECRET="add-here"
KEYCLOAK_USERNAME="add-here"
KEYCLOAK_PASSWORD="add-here"
KEYCLOAK_ADMIN_TOKEN="add-here"

#Course Planner
AUTH_TOKEN="add-here"
INTERNAL_ACCESS_TOKEN="add-here"
```

#### 4. Run the Application ####
Before starting application make sure KEYCLOAK server should be up and running.
```sh
npm run start:dev
```
- Steps to install on server (Should have a docker compose file)
- Recommended Infrastructure (should cover Dev & Prod)

8 changes: 8 additions & 0 deletions docs/user-service/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "User Service",
"position": 1,
"link": {
"type": "generated-index",
"description": "Learn about user service"
}
}