Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shahriyar-hosen/university-management-auth-service


https://github.com/shahriyar-hosen/university-management-auth-service

Last synced: 4 days ago
JSON representation

Awesome Lists containing this project

README

        

University Management auth service




Authentication Service

We are developing a university management system that includes three types of roles: Admin, Student, and Faculty.

## Functional Requirements

### Student

- Students can log in and log out.
- Students can manage and update their profiles.
- Students can update specific fields in their profiles.
- Students can enroll in a semester.
- Students can enroll in offered courses for a specific semester.
- Students can pay tuition fees both offline and online (Partial / Full Payment).
- Students can view their transaction histories.
- Students can access their class routines.
- Students can view notices and events on their notice board.
- Students can check their results (Full / Semester Wise).
- Students can provide evaluations for their teachers.

### Admin

- Admins can log in and log out.
- Admins can manage and update their profiles.
- Admins can update certain fields in their profiles.
- Admins can manage user accounts:
- Block/Unblock
- Change Password
- Forcefully Log out
- Admins can manage various processes:
- Semester
- Offered Courses
- Section
- Faculty
- Student
- Building
- Room
- Payment
- Permissions
- Activity

### Faculty

- Faculty members can log in and log out.
- Faculty members can manage and update their profiles.
- Faculty members can update specific fields in their profiles.
- Faculty members can manage user accounts.
- Faculty members can manage student grades and access academic and personal information.
- Faculty members can manage their lecture resources.




Models

## Permission

- title

## UserPermission

- permissionId
- userId

## User

- id (Generated ID, same as student id)
- role (Appended from Backend, `user.service.ts`)
- password (Default Password, given from frontend)
- createdAt (Automatically generated by mongoose)
- updatedAt (Automatically generated by mongoose)
- student (Reference, `_id` mongoose)
- admin (Reference, `_id` mongoose)
- faculty (Reference, `_id` mongoose)

## Student

- id (Generated ID, same as user id)
- name
- firstName
- middleName
- lastName
- Gender (enum: male, female)
- dateOfBirth (24-04-1998)
- email
- contactNo
- emergencyContactNo
- presentAddress
- permanentAddress
- bloodGroup (enum)
- guardian
- fatherName
- fatherOccupation
- fatherContactNo
- motherName
- motherOccupation
- motherContactNo
- address
- localGuardian
- name
- occupation
- contactNo
- address
- academicSemester (Reference)
- academicDepartment (Reference)
- academicFaculty (Reference)

# Sample Data

Below is the sample data for different roles in the university management system.

## Student

```json
{
"password": "123456",
"student": {
"name": {
"firstName": "Mezbaul",
"lastName": "Abedin",
"middleName": "Forhan"
},
"dateOfBirth": "24-04-1998",
"gender": "male",
"bloodGroup": "O+",
"email": "[email protected]",
"contactNo": "user_4",
"emergencyContactNo": "01600000000",
"presentAddress": "CTG",
"permanentAddress": "CTG",
"academicFaculty": "6473b67a123df7493739e2a0",
"academicDepartment": "6473badee8ddae33f1cf0a3f",
"academicSemester": "647a5d967a96742c8cb4b8d2",
"guardian": {
"fatherName": "MD.ABBU",
"fatherOccupation": "Retired Teacher",
"fatherContactNo": "01600000000",
"motherName": "Mrs.Ammu",
"motherOccupation": "Housewife",
"motherContactNo": "01600000000",
"address": "CTG"
},
"localGuardian": {
"name": "Zahid Hasan",
"occupation": "Service Holder",
"contactNo": "01600000000",
"address": "Dhaka"
}
}
}
```

### Faculty

- **id** (custom generated by generateFacultyId)
- **name**
- **firstName**
- **middleName**
- **lastName**
- **gender** ('male'|'female')
- **dateOfBirth**
- **email**
- **contactNo**
- **emergencyContactNo**
- **presentAddress**
- **permanentAddress**
- **bloodGroup** ('A+' | 'A-' | 'B+' | 'B-' | 'AB+' | 'AB-' | 'O+' | 'O-')
- **designation** (Professor, Lecturer)
- **academicDepartment** (Department of Computer Science & Engineering) [reference]
- **academicFaculty** (Faculty of Science and Engineering) [reference]

### Admin

- **Id**
- **name**
- **firstName**
- **middleName**
- **lastName**
- **gender**
- **dateOfBirth**
- **email**
- **contactNo**
- **emergencyContactNo**
- **department**
- **designation**

### Academic Semester

- **title**
- **year**
- **code**
- **startMonth**
- **endMonth**

#### Sample Data

| title | year | code | startMonth | endMonth |
| ------ | ---- | ---- | ---------- | -------- |
| Autumn | 2023 | 01 | January | May |
| Summer | 2023 | 02 | May | August |
| Fall | 2023 | 03 | September | December |

### Academic Faculty

- **title**

#### Sample Data

| title |
| ---------------------------------- |
| Faculty of Science and Engineering |
| Faculty of Business Administration |
| Faculty of Arts and Social Science |

### Faculty

- Create Faculty
- Read Faculty (Pagination)
- Update Faculty
- Delete Faculty

#### Faculty Entity Structure

- **id** (custom generated by generateFacultyId)
- **name**
- **firstName**
- **middleName**
- **lastName**
- **gender** ('male'|'female')
- **dateOfBirth**
- **email**
- **contactNo**
- **emergencyContactNo**
- **presentAddress**
- **permanentAddress**
- **bloodGroup** ('A+' | 'A-' | 'B+' | 'B-' | 'AB+' | 'AB-' | 'O+' | 'O-')
- **designation** (Professor, Lecturer)
- **academicDepartment** (Department of Computer Science & Engineering) [reference]
- **academicFaculty** (Faculty of Science and Engineering) [reference]

### Academic Department

- **title**
- **academicFaculty** (Reference)

# Sample Data

## Academic Department

### Before Populate

```json
{
"title": "Department of Computer Science",
"academicFaculty": "64820578aeaa15acb6483dc5"
}
```

### After Populate

```json
{
"title": "Department of Computer Science",
"academicFaculty": {
"_id": "64820578aeaa15acb6483dc5",
"title": "Faculty of Science and Engineering"
}
}
```

5. Create Faculty
6. Read Faculty (Pagination)
7. Update faculty
8. Delete Faculty

### User

- `POST` /users/create-student
- `POST` /users/create-faculty
- `POST` /users/create-admin
- `GET` /users/my-profile
- `GET` /users/:id
- `PATCH` /users/:id
- `DELETE` /user/:id
- `POST` /users/:id/force-logged-out
- `GET` /users?page=1&limit=10
- `GET` /users/:id/available-permissions?page=1&limit=10
- `GET` /users/:id/assigned-permissions?page=1&limit=10
- `POST` /users/:id/assign-permissions
- `POST` /users/:id/remove-permissions

### Student

- `GET` /students
- `GET` /students?page=1&limit=10
- `GET` /students/:id
- `PATCH` /students/:id
- `DELETE` /students/:id

### Faculty

- `GET` /faculties?page=1&limit=10&sortBy=gender&sortOrder=desc
- `GET` /faculties?searchTerm=lec
- `GET` /faculties/:id
- `PATCH` /faculties/:id
- `DELETE` /faculties/:id

### Admin

- `GET` /admins?page=1&limit=10
- `GET` /admins/:id
- `PATCH` /admin/:id

### Permission

- `GET` /permissions?page=1&limit=10
- `POST` /permissions
- `GET` /permissions/:id
- `PATCH` /permissions/:id
- `DELETE` /permissions/:id

### Auth

- `POST` /auth/login
- Request body: `id`, `password`
- `POST` /auth/change-password
- `POST` /auth/refresh-token
- `POST` /auth/forgot-password
- `POST` /auth/reset-password

### Academic Semester

- `POST` /academic-semesters/create-semester
- `GET` /academic-semesters
- `GET` /academic-semesters/:id
- `PATCH` /academic-semesters/:id
- `DELETE` /academic-semesters/:id