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:
| Property | Type | Description |
|---|---|---|
id | Integer | Unique identifier for the course |
title | String | Display title of the course |
description | String | Rich text description of the course (HTML allowed) |
image | String | Cover image filename for the course |
publishedDate | Date | Date the course is published / scheduled to publish |
hidden | Boolean | When true, hides the course from non-admin listings |
PlatformId | Integer | ID of the platform this course belongs to |
authorId | Integer | ID of the user (or their team) who authored the course |
createdAt | String | ISO timestamp of when the course was created |
updatedAt | String | ISO 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
GroupCoursejoin table, which carries apositionper group to control display order inside that group. - Collections: Courses contain collections via the
CollectionCoursesjoin table (exposed asCollectionsManyToMany), which carries apositionto order collections within the course. - Contents: Through their collections, courses surface ordered content items.
- Enrolled Users: Users enroll in a course via the
CourseTakerjoin 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
| Endpoint | Method | Description |
|---|---|---|
/api/course | POST | Create a new course |
/api/course/:id | GET | Get a course by ID |
/api/course/:id | PUT | Update an existing course |
/api/course/:id | DELETE | Delete a course |
/api/course/:id/enroll | POST | Enroll the authenticated user in a course |
/api/courses | GET | List courses attached to a group |
/api/courses/reorder | POST | Reorder courses within a group |
/api/admin/courses | GET | List all courses on the platform (admin/creator) |
Related Resources
- 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.