Skip to main content

Courses Overview

Courses in Tribe Social are structured learning experiences that group one or more collections together inside a community group. They are the primary entity behind the LMS-style "courses" tab on a group, both in the web app and in the mobile app.

A course belongs to a platform, can be attached to one or more groups, and contains an ordered list of collections. Users enroll in a course via the enrollment endpoint.

Course Model

A course has the following key properties:

PropertyTypeDescription
idIntegerUnique identifier for the course
titleStringDisplay title of the course
descriptionStringRich text description of the course (HTML allowed)
imageStringCover image filename for the course
publishedDateDateDate the course is published / scheduled to publish
hiddenBooleanWhen true, hides the course from non-admin listings
PlatformIdIntegerID of the platform this course belongs to
authorIdIntegerID of the user (or their team) who authored the course
createdAtStringISO timestamp of when the course was created
updatedAtStringISO timestamp of when the course was last updated

Course Relationships

  • Platform: Every course belongs to a single platform.
  • Author: Each course has an author user. For creators acting on behalf of a team, the team's user id is stored as authorId.
  • Groups: Courses are attached to one or more groups via the GroupCourse join table, which carries a position per group to control display order inside that group.
  • Collections: Courses contain collections via the CollectionCourses join table (exposed as CollectionsManyToMany), which carries a position to order collections within the course.
  • Contents: Through their collections, courses surface ordered content items.
  • Enrolled Users: Users enroll in a course via the CourseTaker join table.

Firebase Integration

Courses are synchronized to Firebase Firestore for use in the mobile application. Whenever a course is created, updated, or deleted, the corresponding Firestore document is upserted or removed.

Authentication Requirements

Most write endpoints require an admin or creator role on the course's platform. Read endpoints accept optional authentication so unauthenticated visitors can browse public courses, while authenticated users receive responses scoped to their role and group membership. Enrollment requires an authenticated user.

Available Endpoints

EndpointMethodDescription
/api/coursePOSTCreate a new course
/api/course/:idGETGet a course by ID
/api/course/:idPUTUpdate an existing course
/api/course/:idDELETEDelete a course
/api/course/:id/enrollPOSTEnroll the authenticated user in a course
/api/coursesGETList courses attached to a group
/api/courses/reorderPOSTReorder courses within a group
/api/admin/coursesGETList all courses on the platform (admin/creator)
  • Collections API — collections are the building blocks of a course's curriculum.
  • Groups API — courses are surfaced inside groups via GroupCourse.
  • Content API — content items live inside the collections that make up a course.