- https://github.com/Ingenuity-rpt26/shane-service-about
- https://github.com/Ingenuity-rpt26/vinayService1
- https://github.com/Ingenuity-rpt26/jsmithSyllabusesService
- https://github.com/Ingenuity-rpt26/Grant--Service_1
- https://github.com/Ingenuity-rpt26/vinayService2
- https://github.com/Ingenuity-rpt26/shane-service-summary
- https://github.com/Ingenuity-rpt26/vinayService2
- https://github.com/Ingenuity-rpt26/jsmithImages
- https://github.com/Ingenuity-rpt26/jsmithInstructorsService
npm install
Ensure database is running and URL and proxy are correct in ./.env
npm run seed
Syllabuses relies on Images and Reviews services for data.
Ensure URL's and ports are correct in ./client/components/initial/state.js
npm run build (as necessary)
Each course has a syllabus. Each syllabus has one or more weeks. Each week has one or more lessons. Each lesson has one or more videos, readings, and exercises.
-> Syllabus
-
-> Header -> Rating
-
-> Weeks => Week
-
- -> WeekTitle
-
- => Lesson
-
-
- -> LessonHeader
-
-
-
- -> LessonTitle
-
-
-
- -> LessonOverview;
-
-
-
- -> Videos => Video
-
-
-
- -> Readings => Reading
-
-
-
- -> Exercises => Exercise
-
From within the root directory:
npm install -g webpack
npm install
GET /api/syllabus/:courseNumber
Returns JSON object. Example response:
{
"id": 0,
"weeks": [{
"weekNumber": 1,
"lessons": [{
"hoursToCompleteLesson": 300,
"lessonTitle": "Lesson Title",
"lessonDescription": "Description",
"videos": [{
"videoIndex": 0,
"videoTitle": "Video Title",
"videoLengthMinutes": 60,
"videoLengthSeconds": 3600
}],
"videosLength": 3,
"readings": [{
"readingIndex": 0,
"readingTitle": "Reading Title",
"readingLengthMinutes": 60
}],
"readingsLength": 3,
"exercises": [{
"exerciseIndex": 0,
"exerciseTitle": "Exercise Title",
"exerciseLengthMinutes": 60
}],
"exercisesLength": 3
}],
"hoursToCompleteCourse": 300
}]
}
POST /api/syllabus/
Request body required JSON schema:
{
id: Number,
weeks: [{
weekNumber: Number,
lessons: [{
hoursToCompleteLesson: Number,
lessonTitle: String,
lessonDescription: String,
videos: [{
videoIndex: Number,
videoTitle: String,
videoLengthMinutes: Number,
videoLengthSeconds: Number
}],
videosLength: Number,
readings: [{
readingIndex: Number,
readingTitle: String,
readingLengthMinutes: Number
}],
readingsLength: Number,
exercises: [{
exerciseIndex: Number,
exerciseTitle: String,
exerciseLengthMinutes: Number
}],
exercisesLength: Number
}],
hoursToCompleteCourse: Number
}]
}
PUT /api/syllabus/
Request body's id
should match the id to be updated.
All other fields are optional. When updating a sub-document, ensure all child fields are present.
Request body field options:
{
id: Number,
weeks: [{
weekNumber: Number,
lessons: [{
hoursToCompleteLesson: Number,
lessonTitle: String,
lessonDescription: String,
videos: [{
videoIndex: Number,
videoTitle: String,
videoLengthMinutes: Number,
videoLengthSeconds: Number
}],
videosLength: Number,
readings: [{
readingIndex: Number,
readingTitle: String,
readingLengthMinutes: Number
}],
readingsLength: Number,
exercises: [{
exerciseIndex: Number,
exerciseTitle: String,
exerciseLengthMinutes: Number
}],
exercisesLength: Number
}],
hoursToCompleteCourse: Number
}]
}
DELETE /api/syllabus/
Request body's id
should match the id to be deleted.
Request body:
{
id: Number,
}