School and Course Management projects!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
The School and Course Management project is a comprehensive system designed to manage students and courses efficiently. It includes features such as student and course CRUD operations, search functionalities, and reporting.
This section list any major frameworks/libraries used to bootstrap my project.
-
To test the deployed API, click here.click-here
-
This is an example of how to list things you need to use the software and how to install them.
-
npm
npm install npm@latest -g
or
-
yarn
npm install yarn@latest -g
_Below is an example of how to settup the project requirement
-
Clone the repo
git clone https://github.com/vath-song99/scm_monolithic.git
-
Install NPM or YARN packages
npm install
or
yarn install
-
Enter your .env variables in
configs/.env
NODE_ENV=development LOG_LEVEL=debug MONGODB_URL=your_mongodb_url PORT=3000
_Below is an example of how to get start the project!
-
START Server
npm run start:dev
or
yarn start:dev
-
RUN Test
npm run test
or
yarn test
Below are some examples of how to use the API endpoints.
For more examples, please refer to the Documentation
- Create Student:
POST /api/v1/students
- Retrieve Student:
GET /api/v1/students/{id}
- Update Student:
PUT /api/v1/students/{id}
- Delete Student (Soft Delete):
DELETE /api/v1/students/{id}
- List Students:
GET /api/v1/students
- Search Students by Full Name or Phone Number:
GET /api/v1/students/search?query={searchTerm}
- Create Course:
POST /api/v1/courses
- Retrieve Course:
GET /api/v1/courses/{id}
- Update Course:
PUT /api/v1/courses/{id}
- Delete Course (Soft Delete):
DELETE /api/v1/courses/{id}
- List Courses:
GET /api/v1/courses
- Search Courses by Name:
GET /api/v1/courses/search?query={searchTerm}
- Advanced Search Courses by Start Date and End Date:
GET /api/v1/courses/advanced-search?start_date={startDate}&end_date={endDate}
- Register Course for Student:
POST /api/v1/students/{studentId}/courses/{courseId}
- Remove Course for Student:
DELETE /api/v1/students/{studentId}/courses/{courseId}
- Course Report:
GET /api/v1/courses/report
- Student Report:
GET /api/v1/students/report
- Student
{
"full_name_en": "John Doe",
"full_name_km": "សុខ ស៊ីម៉ាន់",
"date_of_birth": "1990-05-15", # format "yy,mm,dd"
"gender": "male", # noted gender only lowercase
"phone_number": "+855973238144",
"courses": [
"667fb8a1fd67fa8bce216370",
"667fb9e20d778b0eb1a8d0db"
], # noted course can optionaly
}
- Course
{
"name": "Introduction to Computer Science",
"professor_name": "Dr. Jane Smith",
"limit_number_of_students": 30,
"start_date": "2024-09-01",
"end_date": "2024-12-15",
"enrolled_students": [
"667f9b5d608df88473d6dc1a",
"667fbc0c2ee96d8d99d0b68e"
], # noted enrolled_students can be optionaly
}
- Student
{
"_id": "667fbc0c2ee96d8d99d0b68e",
"full_name_en": "John Doe",
"full_name_km": "សុខ ស៊ីម៉ាន់",
"date_of_birth": "1990-05-15T00:00:00.000Z",
"gender": "male",
"phone_number": "+855973238144",
"courses": [
"667fb8a1fd67fa8bce216370",
"667fb9e20d778b0eb1a8d0db"
],
"is_deleted": false,
"create_at": "2024-06-29T07:47:24.711Z",
"__v": 3
}
- Course
{
"_id": "667fb9e20d778b0eb1a8d0db",
"name": "Introduction to Computer Science",
"professor_name": "Dr. Jane Smith",
"limit_number_of_students": 30,
"start_date": "2024-09-01T00:00:00.000Z",
"end_date": "2024-12-15T00:00:00.000Z",
"enrolled_students": [
"667f9b5d608df88473d6dc1a",
"667fbc0c2ee96d8d99d0b68e"
],
"is_deleted": false,
"create_at": "2024-06-29T07:38:10.361Z",
"__v": 1
}
Student Document Validation:
full_name_en
: Must be a non-empty string.full_name_km
: Must be a non-empty string.date_of_birth
: Must be a valid date.gender
: Must be either "male", "female", or “other” valid options.phone_number
: Must be a valid phone number format .courses
: Must be an array of valid course IDs. The string of IDs should not exceed
Course Document Validation:
name
: Must be a non-empty string.professor_name
: Must be a non-empty string.limit_number_of_students
: Must be a positive integer.start_date
: Must be a valid date.end_date
: Must be a valid date and must be afterstart_date
.enrolled_students
: Must be an array of valid student IDs. The string of IDs should not exceed .
Smoeury Songvat - @Songvat - songvatsmoeury@gmail.com
Project Link: https://github.com/vath-song99/scm_monolithic