← Back to Home

Sprint Challenge: Design Document

Challenge Objective

Create a comprehensive design document for your Learn and Be Curious project. This document should outline your project's architecture, data models, API design, and DynamoDB tables. It will serve as a roadmap for your implementation and a reference for your team.

Design Document Template

Your design document should include the following sections:

1. Problem Statement

A clear, concise description of the problem your project aims to solve. This should include:

2. Use Cases

Detailed descriptions of how users will interact with your system. For each use case, include:

Include at least 3-5 core use cases that demonstrate the key functionality of your application.

3. Project Scope

3.1. In Scope

List specific features and functionality that will be implemented as part of your project. Be detailed and specific about what your application will do. For example:

3.2. Out of Scope

Clearly define the boundaries of your project by listing features or functionality that will NOT be implemented. This helps manage expectations and focus development efforts. For example:

4. Proposed Architecture Overview

Provide a high-level description of your system architecture, including:

This section should give a clear picture of how all parts of your solution work together.

5. API

5.1. Public Models

Define the data models that your API will expose to clients. For each model, include:

Use code blocks or tables to present this information clearly, for example:

// User Model
{
  "userId": "string", // Unique identifier
  "username": "string", // Unique username (3-20 characters)
  "email": "string", // Valid email format
  "createdAt": "ISO-8601 timestamp",
  "profilePicture": "string", // URL to profile image (optional)
  "preferences": { // Optional user preferences
    "theme": "string", // "light" or "dark"
    "notifications": "boolean"
  }
}

5.2. Endpoints

Document all API endpoints your service will provide. For each endpoint, include:

Use a consistent format for all endpoints, for example:

GET /users/{userId}

Description: Retrieves a user's profile information by ID

Path Parameters:
  - userId (string, required): The unique identifier of the user

Query Parameters: None

Request Body: None

Responses:
  - 200 OK: Successfully retrieved user
    {
      "userId": "u123456",
      "username": "johndoe",
      "email": "john@example.com",
      "createdAt": "2023-01-15T14:30:00Z",
      "profilePicture": "https://example.com/profiles/johndoe.jpg",
      "preferences": {
        "theme": "dark",
        "notifications": true
      }
    }
  - 404 Not Found: User not found
    {
      "error": "User not found"
    }
  - 500 Internal Server Error: Server error
    {
      "error": "Internal server error"
    }

Authorization: Requires authentication, users can only access their own profile

6. DynamoDB Tables

Provide detailed specifications for all DynamoDB tables your application will use. For each table, include:

Consider using CloudFormation-style notation to define your tables, for example:

UsersTable:
  Type: AWS::DynamoDB::Table
  Properties:
    TableName: Users
    BillingMode: PAY_PER_REQUEST
    AttributeDefinitions:
      - AttributeName: userId
        AttributeType: S
      - AttributeName: email
        AttributeType: S
    KeySchema:
      - AttributeName: userId
        KeyType: HASH
    GlobalSecondaryIndexes:
      - IndexName: EmailIndex
        KeySchema:
          - AttributeName: email
            KeyType: HASH
        Projection:
          ProjectionType: ALL

Example Item:
{
  "userId": "u123456",
  "email": "john@example.com",
  "username": "johndoe",
  "passwordHash": "hashedPassword",
  "createdAt": "2023-01-15T14:30:00Z",
  "lastLogin": "2023-02-10T09:15:22Z"
}

Access Patterns:
- Get user by userId (primary key)
- Find user by email (GSI)
- Update user profile information
- Delete user account

7. Pages/Wireframes

Create mockups or wireframes for the key pages of your web application. Each wireframe should include:

You can use tools like Figma, draw.io, or even hand-drawn sketches uploaded as images. The goal is to clearly communicate your UI design and user flow.

8. Extensions (Optional)

If time permits, identify potential enhancements or additional features you might add to your project. For each extension, briefly describe:

Submission Requirements

  1. Complete the design document following the template above
  2. Store the document in your project repository (preferably in Markdown format)
  3. Be prepared to present and explain your design in a review

Your design document should be comprehensive and detailed enough that another developer could implement your system based solely on this documentation.