Skip to content

backend: implement team/group DevCard API for hackathon teams #44

Description

@ShantKhatri

Summary

Product doc section 5.4 describes Group / Team Cards — a team or open source project creates a shared DevCard showing all members. Implement the backend API for team cards.

Tasks

  • design Prisma schema:
    • Team: id, name, slug, description, avatarUrl, ownerId, createdAt.
    • TeamMember: teamId, userId, role (owner/member), joinedAt.
  • create apps/backend/src/routes/teams.ts:
    • POST /api/teams — create a team (authenticated).
    • GET /api/teams/:slug — public team profile with member list (public).
    • POST /api/teams/:slug/members — invite a member by username (owner only).
    • DELETE /api/teams/:slug/members/:userId — remove member (owner only, or self-remove).
    • PUT /api/teams/:slug — update team name, description, avatar (owner only).
    • DELETE /api/teams/:slug — delete team (owner only).
  • the public team view endpoint should return member profiles in the same PlatformLink[] shape as individual public profiles.
  • add a team QR code endpoint that encodes devcard.dev/team/:slug.
  • register routes in apps/backend/src/app.ts.
  • write tests covering ownership guards, member management, and public read.

Acceptance Criteria

  • teams can be created, populated with members, and queried publicly.
  • only the owner can manage membership.
  • self-removal (leaving the team) works for any member.
  • tests pass covering all ownership boundary conditions.

Difficulty

advanced — requires multi-role authorization design and relational schema with ownership semantics.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions