How ewanbrinkman/sfu-course-api-wrapper works
Main Components
a. Client Application Layer
• As the topmost layer where developers would implement this wrapper
• To the Wrapper Interface layer
b. Wrapper Interface Layer (src/index.ts)
• Main entry point for the API
• Primary wrapper functions (course, courseSection, etc.)
c. Core API Classes Layer (src/api/)
• Main classes: Course, CourseSection, Department, Instructor, Schedule
• These should be represented as interconnected components
d. Data Processing Layer (src/utils/process/)
• Processors for raw data transformation
• Connection to both API Classes and Types layers
e. Types System Layer (src/api-types/)
• Type hierarchy:
• Raw types (RawCourseData, RawCourseSectionData, etc.)
• Processed types (CourseData, CourseSectionData, etc.)
• Common types (enums like CourseType, SectionCode, etc.)
f. Error Handling Layer (src/errors/)
• Custom error types and their hierarchy
g. External SFU API Layer
• Actual SFU Course Outlines REST API
• Connection to the wrapper
[Client Application]
• ↓
[Wrapper Interface]
• ↓
[Core API Classes] ←→ [Error Handling]
• ↓
[Data Processing] ←→ [Types System]
• ↓
[External SFU API]
Important Details
• Asynchronous nature of the operations (use appropriate symbols)
• Zero runtime dependencies aspect
• Main class relationships (Course contains CourseSection, etc.)
• Data transformation flow from raw API data to processed classes
Implementation Notes
• Keep the abstraction level high enough to be understandable but detailed enough to show the architecture
Remember to indicate that this is a TypeScript library with zero runtime dependencies, which is an important architectural characteristic of the project.