diff --git a/docs/user-service/1_about.md b/docs/user-service/1_about.md new file mode 100644 index 0000000..c70fa84 --- /dev/null +++ b/docs/user-service/1_about.md @@ -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. \ No newline at end of file diff --git a/docs/user-service/2_features.md b/docs/user-service/2_features.md new file mode 100644 index 0000000..d4160cd --- /dev/null +++ b/docs/user-service/2_features.md @@ -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. \ No newline at end of file diff --git a/docs/user-service/3_getting-started.md b/docs/user-service/3_getting-started.md new file mode 100644 index 0000000..15bb026 --- /dev/null +++ b/docs/user-service/3_getting-started.md @@ -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]: + [NestJS]: + [PostgreSQL]: \ No newline at end of file diff --git a/docs/user-service/4_tech-stack.md b/docs/user-service/4_tech-stack.md new file mode 100644 index 0000000..3a51cc1 --- /dev/null +++ b/docs/user-service/4_tech-stack.md @@ -0,0 +1,17 @@ +--- +sidebar_position: 4 +--- + +# Tech Stack + +#### Framework : +- **nest.js** (for Node.js) + +#### Language : +- **typescript** + +#### APIs : +- **REST** + +#### Database : +- **PostgreSQL** \ No newline at end of file diff --git a/docs/user-service/5_architecture.md b/docs/user-service/5_architecture.md new file mode 100644 index 0000000..fc77c75 --- /dev/null +++ b/docs/user-service/5_architecture.md @@ -0,0 +1,7 @@ +--- +sidebar_position: 5 +--- + +# Architecture + +@TODO \ No newline at end of file diff --git a/docs/user-service/6_database-schema.md b/docs/user-service/6_database-schema.md new file mode 100644 index 0000000..cd6af32 --- /dev/null +++ b/docs/user-service/6_database-schema.md @@ -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 \ No newline at end of file diff --git a/docs/user-service/7_api-docs.md b/docs/user-service/7_api-docs.md new file mode 100644 index 0000000..3c88ca3 --- /dev/null +++ b/docs/user-service/7_api-docs.md @@ -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 \ No newline at end of file diff --git a/docs/user-service/8_devops.md b/docs/user-service/8_devops.md new file mode 100644 index 0000000..c41f084 --- /dev/null +++ b/docs/user-service/8_devops.md @@ -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) + diff --git a/docs/user-service/_category_.json b/docs/user-service/_category_.json new file mode 100644 index 0000000..c5a5c36 --- /dev/null +++ b/docs/user-service/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "User Service", + "position": 1, + "link": { + "type": "generated-index", + "description": "Learn about user service" + } +} \ No newline at end of file