> ## Documentation Index
> Fetch the complete documentation index at: https://docs.learnway.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Projects & Capstones

> Course capstone projects, draft saves, project submissions, and automated AI code evaluations.

# Projects & Capstones

Advanced courses conclude with a Capstone Project where learners submit repository links, contracts, or archive files for automated AI grading and mentor evaluation.

***

## Get Course Capstone Project

Retrieves the project brief, rubric, and allowed submission formats for a given course.

### Endpoint

```http theme={null}
GET /api/v2/course/:courseId/project
```

### Headers

```http theme={null}
Authorization: Bearer <jwt_access_token>
```

### Path Parameters

| Parameter  | Type     | Required | Description |
| :--------- | :------- | :------- | :---------- |
| `courseId` | `string` | **Yes**  | Course UUID |

### Response (200 OK)

```json theme={null}
{
  "success": true,
  "data": {
    "id": "proj-uuid-1",
    "courseId": "7a3e9c12-3456-4abc-8def-1234567890ab",
    "title": "Build a Decentralized Escrow Contract",
    "description": "Develop and deploy an EVM-compatible escrow contract with automated dispute resolution.",
    "allowedSubmissionTypes": ["GITHUB_REPO", "FILE_UPLOAD"],
    "rubric": [
      { "criterion": "Reentrancy Protection", "points": 25 },
      { "criterion": "Event Emission", "points": 25 },
      { "criterion": "Unit Test Coverage > 80%", "points": 50 }
    ]
  }
}
```

***

## Save Draft Submission

Allows users to incrementally save their project state without triggering AI evaluation.

### Endpoint

```http theme={null}
POST /api/v2/course/:courseId/project/draft
```

### Request (Multipart or JSON)

```json theme={null}
{
  "submissionType": "GITHUB_REPO",
  "repositoryUrl": "https://github.com/learner/learnway-escrow-capstone",
  "notes": "Completed milestone 1 & 2 tests."
}
```

### Response (200 OK)

```json theme={null}
{
  "success": true,
  "data": {
    "id": "sub-draft-123",
    "status": "DRAFT",
    "updatedAt": "2026-08-21T23:00:00.000Z"
  },
  "message": "Draft saved successfully"
}
```

***

## Submit Project for AI Assessment

Finalizes the submission and queues an automated AI evaluation job.

### Endpoint

```http theme={null}
POST /api/v2/course/:courseId/project/submit
```

### Response (201 Created)

```json theme={null}
{
  "success": true,
  "data": {
    "submissionId": "sub-12345",
    "status": "SUBMITTED",
    "aiAssessmentStatus": "PENDING"
  },
  "message": "Project submitted for AI review"
}
```
