{
  "openapi": "3.0.3",
  "info": {
    "title": "Trần Thị Lam Portfolio API",
    "description": "API for WordPress Developer Portfolio - Trần Thị Lam. Provides endpoints for retrieving portfolio data, projects, experience, skills, and contact form submission.",
    "version": "1.0.0",
    "contact": {
      "name": "Trần Thị Lam",
      "email": "tranthilamm1998@gmail.com",
      "phone": "0333 933 434"
    }
  },
  "servers": [
    {
      "url": "https://api.tranthilam.dev/v1",
      "description": "Production server"
    },
    {
      "url": "http://localhost:3000/v1",
      "description": "Development server"
    }
  ],
  "tags": [
    {
      "name": "Profile",
      "description": "Portfolio owner profile information"
    },
    {
      "name": "Experience",
      "description": "Work experience history"
    },
    {
      "name": "Skills",
      "description": "Technical skills and services"
    },
    {
      "name": "Projects",
      "description": "Completed projects showcase"
    },
    {
      "name": "Contact",
      "description": "Contact form submission"
    }
  ],
  "paths": {
    "/profile": {
      "get": {
        "tags": ["Profile"],
        "summary": "Get portfolio owner profile",
        "description": "Retrieve complete profile information including name, title, bio, and contact details",
        "operationId": "getProfile",
        "responses": {
          "200": {
            "description": "Profile data retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Profile"
                }
              }
            }
          },
          "404": {
            "description": "Profile not found"
          }
        }
      }
    },
    "/experience": {
      "get": {
        "tags": ["Experience"],
        "summary": "Get work experience history",
        "description": "Retrieve chronological work experience with job responsibilities",
        "operationId": "getExperience",
        "responses": {
          "200": {
            "description": "Experience list retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Experience"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/skills": {
      "get": {
        "tags": ["Skills"],
        "summary": "Get skills and services",
        "description": "Retrieve list of technical skills and specialized services offered",
        "operationId": "getSkills",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "description": "Filter skills by category",
            "schema": {
              "type": "string",
              "enum": ["development", "design", "server", "seo", "all"]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Skills list retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Skill"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/projects": {
      "get": {
        "tags": ["Projects"],
        "summary": "Get completed projects",
        "description": "Retrieve portfolio projects with filtering and pagination",
        "operationId": "getProjects",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "description": "Filter by project category",
            "schema": {
              "type": "string",
              "enum": ["Property", "Restaurant", "Tech", "Retail", "Entertainment", "Consulting", "F&B", "Recruitment", "Education", "Hospitality"]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of projects to return",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of projects to skip",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Projects list retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectList"
                }
              }
            }
          }
        }
      }
    },
    "/projects/{id}": {
      "get": {
        "tags": ["Projects"],
        "summary": "Get project by ID",
        "description": "Retrieve detailed information about a specific project",
        "operationId": "getProjectById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Project unique identifier",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Project details retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "404": {
            "description": "Project not found"
          }
        }
      }
    },
    "/contact": {
      "post": {
        "tags": ["Contact"],
        "summary": "Submit contact form",
        "description": "Send a message to Trần Thị Lam through the contact form",
        "operationId": "submitContact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Message sent successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Profile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "tran-thi-lam"
          },
          "fullName": {
            "type": "string",
            "example": "Trần Thị Lam"
          },
          "title": {
            "type": "string",
            "example": "WordPress Developer"
          },
          "specialty": {
            "type": "string",
            "example": "WordPress Specialist"
          },
          "headline": {
            "type": "string",
            "example": "WordPress Developer focused on building high-performance websites."
          },
          "bio": {
            "type": "string",
            "example": "Experienced WordPress Developer with expertise in custom themes, plugins, responsive design, and third-party API integration."
          },
          "yearsOfExperience": {
            "type": "integer",
            "example": 5
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "tranthilamm1998@gmail.com"
          },
          "phone": {
            "type": "string",
            "example": "0333 933 434"
          },
          "location": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "example": "56/5 Street 4, Truong Tho Ward, Thu Duc City"
              },
              "city": {
                "type": "string",
                "example": "Thu Duc City"
              },
              "country": {
                "type": "string",
                "example": "Vietnam"
              }
            }
          },
          "socialLinks": {
            "type": "object",
            "properties": {
              "linkedin": {
                "type": "string",
                "format": "uri"
              },
              "github": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "avatarUrl": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": ["id", "fullName", "title", "email"]
      },
      "Experience": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "company": {
            "type": "string",
            "example": "Lucius Haus Co., Ltd"
          },
          "position": {
            "type": "string",
            "example": "WordPress Developer"
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "example": "2022-10-01"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "example": "2024-08-01"
          },
          "isCurrent": {
            "type": "boolean",
            "example": false
          },
          "responsibilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "Managed main website using WordPress, PHP, JS, HTML, CSS ensuring stable operations.",
              "Administered Linux servers (CentOS 7) for optimal performance and security."
            ]
          },
          "technologies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": ["WordPress", "PHP", "JavaScript", "Linux", "CentOS 7"]
          }
        },
        "required": ["id", "company", "position", "startDate"]
      },
      "Skill": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "example": "WordPress Development"
          },
          "category": {
            "type": "string",
            "enum": ["development", "design", "server", "seo", "performance"],
            "example": "development"
          },
          "description": {
            "type": "string",
            "example": "Full-cycle development specializing in custom PHP themes and plugin integration."
          },
          "icon": {
            "type": "string",
            "example": "web"
          },
          "proficiency": {
            "type": "string",
            "enum": ["beginner", "intermediate", "advanced", "expert"],
            "example": "expert"
          },
          "technologies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": ["PHP", "JavaScript", "jQuery", "HTML5", "CSS3"]
          }
        },
        "required": ["id", "name", "category"]
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "australianpg"
          },
          "name": {
            "type": "string",
            "example": "Australian PG"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://australianpg.com"
          },
          "category": {
            "type": "string",
            "enum": ["Property", "Restaurant", "Tech", "Retail", "Entertainment", "Consulting", "F&B", "Recruitment", "Education", "Hospitality"],
            "example": "Property"
          },
          "description": {
            "type": "string",
            "example": "Property management and consulting website with modern design and optimized performance."
          },
          "technologies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": ["WordPress", "PHP", "Custom Theme"]
          },
          "thumbnailUrl": {
            "type": "string",
            "format": "uri"
          },
          "completedDate": {
            "type": "string",
            "format": "date"
          },
          "isFeatured": {
            "type": "boolean",
            "example": true
          }
        },
        "required": ["id", "name", "url", "category"]
      },
      "ProjectList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Project"
            }
          },
          "total": {
            "type": "integer",
            "example": 11
          },
          "limit": {
            "type": "integer",
            "example": 10
          },
          "offset": {
            "type": "integer",
            "example": 0
          }
        }
      },
      "ContactRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100,
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "john@example.com"
          },
          "subject": {
            "type": "string",
            "minLength": 5,
            "maxLength": 200,
            "example": "Project Inquiry"
          },
          "message": {
            "type": "string",
            "minLength": 10,
            "maxLength": 5000,
            "example": "I need help with a WordPress project. Let's discuss!"
          }
        },
        "required": ["name", "email", "subject", "message"]
      },
      "ContactResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "message": {
            "type": "string",
            "example": "Thank you for your message! I'll get back to you soon."
          },
          "messageId": {
            "type": "string",
            "example": "msg_abc123xyz"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "VALIDATION_ERROR"
          },
          "message": {
            "type": "string",
            "example": "Invalid input data"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
