Skip to content

DoCurious API Reference / types / Community

Interface: Community

Defined in: types/community.types.ts:116

A community group where users share challenges, track records, and discussions.

Remarks

DoCurious supports 6+ community types (see CommunityType). School communities have additional fields for grade/class scoping and auto-membership. Each community has three feed tabs: Bucket List, Track Record, and Discussion.

Example

ts
const community: Community = {
  id: 'com-010',
  createdAt: '2025-09-01T00:00:00Z',
  updatedAt: '2025-09-01T00:00:00Z',
  name: 'Mrs. Lee — 5th Grade Science',
  slug: 'mrs-lee-5th-science',
  type: 'institutional',
  schoolId: 'sch-001',
  schoolCommunityLevel: 'class',
  className: '5A',
  ownerUserId: 'usr-teacher-01',
  visibility: 'private',
  allowMemberPosts: true,
  requirePostApproval: false,
  isAutoMembership: true,
  memberCount: 28,
  postCount: 45,
}

Extends

Properties

allowMemberPosts

allowMemberPosts: boolean

Defined in: types/community.types.ts:140

Whether regular members can create posts (false = admin-only posting)


avatarUrl?

optional avatarUrl: string

Defined in: types/community.types.ts:147


bannerUrl?

optional bannerUrl: string

Defined in: types/community.types.ts:148


classId?

optional classId: string

Defined in: types/community.types.ts:130

Reference to a specific class for class-level communities


className?

optional className: string

Defined in: types/community.types.ts:132

Display label for the class (e.g., "5A", "Math Period 3")


createdAt

createdAt: string

Defined in: types/common.types.ts:154

ISO 8601 datetime when the entity was created

Inherited from

BaseEntity.createdAt


currentUserMembership?

optional currentUserMembership: CommunityMembership

Defined in: types/community.types.ts:154

The current authenticated user's membership record, if they belong to this community


description?

optional description: string

Defined in: types/community.types.ts:118


gradeLevel?

optional gradeLevel: string

Defined in: types/community.types.ts:128

Display label for grade-level communities (e.g., "5th Grade", "Grade 10")


id

id: string

Defined in: types/common.types.ts:167

Inherited from

BaseEntity.id


isAutoMembership

isAutoMembership: boolean

Defined in: types/community.types.ts:145

When true, new students/teachers are automatically added (school communities)


joinModel?

optional joinModel: JoinModel

Defined in: types/community.types.ts:138

How users can join this community (independent of visibility)


memberCount

memberCount: number

Defined in: types/community.types.ts:150


name

name: string

Defined in: types/community.types.ts:117


ownerUserId

ownerUserId: string

Defined in: types/community.types.ts:134


postCount

postCount: number

Defined in: types/community.types.ts:151


requirePostApproval

requirePostApproval: boolean

Defined in: types/community.types.ts:142

Whether new posts require moderator approval before appearing in the feed


schoolCommunityLevel?

optional schoolCommunityLevel: SchoolCommunityLevel

Defined in: types/community.types.ts:126


schoolId?

optional schoolId: string

Defined in: types/community.types.ts:125


slug

slug: string

Defined in: types/community.types.ts:120

URL-safe identifier used in routing


type

type: CommunityType

Defined in: types/community.types.ts:122


updatedAt

updatedAt: string

Defined in: types/common.types.ts:156

ISO 8601 datetime when the entity was last modified

Inherited from

BaseEntity.updatedAt


visibility

visibility: CommunityVisibility

Defined in: types/community.types.ts:136

DoCurious Platform Documentation