Skip to content

Implement Solution Drafts #12

Description

@Mkalbani

Description

Allow users to save solution drafts before submitting.

Why This Matters

  • Users can work on solutions over multiple sessions
  • Prevent losing work if browser crashes

Acceptance Criteria

  • Add status field to Solution (DRAFT, PUBLISHED)
  • Drafts not visible to others
  • GET /solutions/drafts (my drafts)
  • POST /solutions/:id/publish (convert draft → published)
  • Drafts don't get scored until published
  • Auto-save draft every 30 seconds (optional)

Files to Change

  • src/solutions/entities/solution.entity.ts (add status enum)
  • src/solutions/solutions.service.ts (filter by status)
  • src/solutions/solutions.controller.ts (new endpoints)

Database Migration

ALTER TABLE solutions ADD COLUMN status VARCHAR(20) DEFAULT 'PUBLISHED';

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions