--- openapi: 3.0.1 info: title: API V1 version: v1 paths: "/api/v1/community_items": get: summary: List community items (published only when public; all when authenticated) tags: - Community Items parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: ok (authenticated includes drafts) content: application/json: schema: type: object properties: community_items: type: array items: type: object properties: id: type: integer title: type: string description: type: string url: type: string nullable: true role: type: string nullable: true year: type: string nullable: true tech_stack: type: string nullable: true position: type: integer nullable: true published: type: boolean tags: type: array items: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - id - title - description - published - tags required: - community_items post: summary: Create community item tags: - Community Items security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '201': description: created '401': description: unauthenticated '422': description: invalid requestBody: content: application/json: schema: type: object properties: community_item: type: object properties: id: type: integer title: type: string description: type: string url: type: string nullable: true role: type: string nullable: true year: type: string nullable: true tech_stack: type: string nullable: true position: type: integer nullable: true published: type: boolean tags: type: array items: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - id - title - description - published - tags required: - community_item "/api/v1/community_items/{id}": parameters: - name: id in: path required: true schema: type: integer patch: summary: Update community item tags: - Community Items security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: updated '401': description: unauthenticated '422': description: invalid requestBody: content: application/json: schema: type: object properties: community_item: type: object properties: id: type: integer title: type: string description: type: string url: type: string nullable: true role: type: string nullable: true year: type: string nullable: true tech_stack: type: string nullable: true position: type: integer nullable: true published: type: boolean tags: type: array items: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - id - title - description - published - tags required: - community_item delete: summary: Destroy community item tags: - Community Items security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '204': description: destroyed '401': description: unauthenticated "/api/v1/contact_messages": post: summary: Submit a contact message tags: - Contact Messages parameters: [] responses: '201': description: created '422': description: invalid requestBody: content: application/json: schema: type: object properties: contact_message: type: object properties: name: type: string email: type: string message: type: string required: - name - email - message required: - contact_message get: summary: List unread contact messages tags: - Contact Messages security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: ok content: application/json: schema: type: object properties: contact_messages: type: array items: type: object properties: id: type: integer name: type: string email: type: string message: type: string read_at: type: string format: date-time nullable: true created_at: type: string format: date-time required: - id - name - email - message required: - contact_messages '401': description: unauthenticated "/api/v1/contact_messages/{id}": parameters: - name: id in: path required: true schema: type: integer patch: summary: Mark a contact message as read tags: - Contact Messages security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: marked read content: application/json: schema: type: object properties: contact_message: type: object properties: id: type: integer name: type: string email: type: string message: type: string read_at: type: string format: date-time nullable: true created_at: type: string format: date-time required: - id - name - email - message required: - contact_message '401': description: unauthenticated "/api/v1/faq_items": get: summary: List FAQ items (published only when public; all when authenticated) tags: - FAQ Items parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: ok (authenticated includes drafts) content: application/json: schema: type: object properties: faq_items: type: array items: type: object properties: id: type: integer question: type: string answer: type: string position: type: integer nullable: true published: type: boolean required: - id - question - answer - published required: - faq_items post: summary: Create FAQ item tags: - FAQ Items security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '201': description: created '401': description: unauthenticated '422': description: invalid requestBody: content: application/json: schema: type: object properties: faq_item: type: object properties: id: type: integer question: type: string answer: type: string position: type: integer nullable: true published: type: boolean required: - id - question - answer - published required: - faq_item "/api/v1/faq_items/{id}": parameters: - name: id in: path required: true schema: type: integer patch: summary: Update FAQ item tags: - FAQ Items security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: updated '401': description: unauthenticated '422': description: invalid requestBody: content: application/json: schema: type: object properties: faq_item: type: object properties: id: type: integer question: type: string answer: type: string position: type: integer nullable: true published: type: boolean required: - id - question - answer - published required: - faq_item delete: summary: Destroy FAQ item tags: - FAQ Items security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '204': description: destroyed '401': description: unauthenticated "/api/v1/page_views": post: summary: Record a page view tags: - Analytics parameters: [] responses: '204': description: ignored (bot user agent) requestBody: content: application/json: schema: type: object properties: page_view: type: object properties: path: type: string referrer: type: string nullable: true required: - path required: - page_view "/api/v1/page_views/stats": get: summary: Get visitor stats (admin only) tags: - Analytics security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: ok content: application/json: schema: type: object properties: total: type: integer by_country: type: object by_city: type: object recent: type: array items: type: object properties: id: type: integer path: type: string city: type: string nullable: true region: type: string nullable: true country: type: string nullable: true created_at: type: string required: - id - path - created_at required: - total - by_country - by_city - recent '401': description: unauthenticated "/api/v1/projects": get: summary: List projects (published only when public; all when authenticated) tags: - Projects parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: ok (authenticated includes drafts) content: application/json: schema: type: object properties: projects: type: array items: type: object properties: id: type: integer title: type: string tagline: type: string description: type: string highlights: type: string nullable: true tech_stack: type: string cover_image_url: type: string nullable: true live_url: type: string nullable: true repo_url: type: string nullable: true featured: type: boolean position: type: integer nullable: true published: type: boolean project_start: type: string format: date nullable: true project_end: type: string format: date nullable: true technologies: type: array items: type: object properties: id: type: integer name: type: string slug: type: string category: type: string nullable: true required: - id - name - slug tags: type: array items: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - id - title - tagline - description - tech_stack - featured - published - technologies - tags required: - projects post: summary: Create project tags: - Projects security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '201': description: created content: application/json: schema: type: object properties: project: type: object properties: id: type: integer title: type: string tagline: type: string description: type: string highlights: type: string nullable: true tech_stack: type: string cover_image_url: type: string nullable: true live_url: type: string nullable: true repo_url: type: string nullable: true featured: type: boolean position: type: integer nullable: true published: type: boolean project_start: type: string format: date nullable: true project_end: type: string format: date nullable: true technologies: type: array items: type: object properties: id: type: integer name: type: string slug: type: string category: type: string nullable: true required: - id - name - slug tags: type: array items: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - id - title - tagline - description - tech_stack - featured - published - technologies - tags required: - project '401': description: unauthenticated '422': description: invalid requestBody: content: application/json: schema: type: object properties: project: type: object properties: id: type: integer title: type: string tagline: type: string description: type: string highlights: type: string nullable: true tech_stack: type: string cover_image_url: type: string nullable: true live_url: type: string nullable: true repo_url: type: string nullable: true featured: type: boolean position: type: integer nullable: true published: type: boolean project_start: type: string format: date nullable: true project_end: type: string format: date nullable: true technologies: type: array items: type: object properties: id: type: integer name: type: string slug: type: string category: type: string nullable: true required: - id - name - slug tags: type: array items: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - id - title - tagline - description - tech_stack - featured - published - technologies - tags required: - project "/api/v1/projects/{id}": parameters: - name: id in: path required: true schema: type: integer get: summary: Show project (published only when public; any when authenticated) tags: - Projects parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: draft visible to authenticated admin content: application/json: schema: type: object properties: project: type: object properties: id: type: integer title: type: string tagline: type: string description: type: string highlights: type: string nullable: true tech_stack: type: string cover_image_url: type: string nullable: true live_url: type: string nullable: true repo_url: type: string nullable: true featured: type: boolean position: type: integer nullable: true published: type: boolean project_start: type: string format: date nullable: true project_end: type: string format: date nullable: true technologies: type: array items: type: object properties: id: type: integer name: type: string slug: type: string category: type: string nullable: true required: - id - name - slug tags: type: array items: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - id - title - tagline - description - tech_stack - featured - published - technologies - tags required: - project '404': description: draft hidden from public patch: summary: Update project tags: - Projects security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: updated '401': description: unauthenticated '422': description: invalid requestBody: content: application/json: schema: type: object properties: project: type: object properties: id: type: integer title: type: string tagline: type: string description: type: string highlights: type: string nullable: true tech_stack: type: string cover_image_url: type: string nullable: true live_url: type: string nullable: true repo_url: type: string nullable: true featured: type: boolean position: type: integer nullable: true published: type: boolean project_start: type: string format: date nullable: true project_end: type: string format: date nullable: true technologies: type: array items: type: object properties: id: type: integer name: type: string slug: type: string category: type: string nullable: true required: - id - name - slug tags: type: array items: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - id - title - tagline - description - tech_stack - featured - published - technologies - tags required: - project delete: summary: Destroy project tags: - Projects security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '204': description: destroyed '401': description: unauthenticated "/api/v1/session": post: summary: Login (issue JWT) tags: - Sessions parameters: [] responses: '200': description: logged in content: application/json: schema: type: object properties: user: type: object properties: id: type: integer email: type: string name: type: string nullable: true avatar_url: type: string nullable: true role: type: string enum: - user - admin required: - id - email - role token: type: string required: - user - token '401': description: account locked after repeated failures content: application/json: schema: type: object properties: errors: type: array items: type: string locked_until: type: string format: date-time required: - errors - locked_until requestBody: content: application/json: schema: type: object properties: email: type: string password: type: string required: - email - password delete: summary: Logout (client discards token) tags: - Sessions security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '204': description: logged out '401': description: missing or invalid token get: summary: Current session tags: - Sessions security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: authenticated content: application/json: schema: type: object properties: user: type: object properties: id: type: integer email: type: string name: type: string nullable: true avatar_url: type: string nullable: true role: type: string enum: - user - admin required: - id - email - role required: - user '401': description: unauthenticated "/api/v1/tags": get: summary: List tags tags: - Tags responses: '200': description: ok content: application/json: schema: type: object properties: tags: type: array items: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - tags post: summary: Create tag tags: - Tags security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '201': description: created content: application/json: schema: type: object properties: tag: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - tag '401': description: unauthenticated '422': description: invalid requestBody: content: application/json: schema: type: object properties: tag: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - tag "/api/v1/tags/{id}": parameters: - name: id in: path required: true schema: type: integer patch: summary: Update tag tags: - Tags security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: updated '401': description: unauthenticated '404': description: not found requestBody: content: application/json: schema: type: object properties: tag: type: object properties: id: type: integer name: type: string slug: type: string required: - id - name - slug required: - tag delete: summary: Destroy tag tags: - Tags security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '204': description: destroyed '401': description: unauthenticated "/api/v1/technologies": get: summary: List technologies tags: - Technologies responses: '200': description: ok content: application/json: schema: type: object properties: technologies: type: array items: type: object properties: id: type: integer name: type: string slug: type: string category: type: string nullable: true required: - id - name - slug required: - technologies post: summary: Create technology tags: - Technologies security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '201': description: created content: application/json: schema: type: object properties: technology: type: object properties: id: type: integer name: type: string slug: type: string category: type: string nullable: true required: - id - name - slug required: - technology '401': description: unauthenticated '422': description: invalid requestBody: content: application/json: schema: type: object properties: technology: type: object properties: id: type: integer name: type: string slug: type: string category: type: string nullable: true required: - id - name - slug required: - technology "/api/v1/technologies/{id}": parameters: - name: id in: path required: true schema: type: integer patch: summary: Update technology tags: - Technologies security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '200': description: updated '401': description: unauthenticated '404': description: not found requestBody: content: application/json: schema: type: object properties: technology: type: object properties: id: type: integer name: type: string slug: type: string category: type: string nullable: true required: - id - name - slug required: - technology delete: summary: Destroy technology tags: - Technologies security: - bearerAuth: [] parameters: - name: Authorization in: header required: false schema: type: string responses: '204': description: destroyed '401': description: unauthenticated components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT servers: - url: http://{defaultHost} variables: defaultHost: default: localhost:5001