Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/giangartun/Tis-GOAT-Frontend/llms.txt

Use this file to discover all available pages before exploring further.

The GOAT Portfolio API is a RESTful HTTP API consumed by the React frontend via Axios. All requests are made to the base URL configured in the VITE_API_URL environment variable, which defaults to http://127.0.0.1:8000. Every API route is prefixed with /api, so all endpoint paths in this reference are relative to that combined base.

Base URL

{VITE_API_URL}/api
Default (local development):
http://127.0.0.1:8000/api
Set VITE_API_URL in your .env file (see .env.example) to point to a staging or production server. The frontend Axios instance reads this value at build time via import.meta.env.VITE_API_URL and prepends /api automatically, so you never need to repeat the prefix in your own API calls when using the shared api instance.

Authentication

Most endpoints require a valid Bearer JWT token supplied in the Authorization request header:
Authorization: Bearer <token>
The following categories of endpoints are publicly accessible and do not require a token:
  • User registration and email verification
  • Login
  • Public portfolio listing
  • Homepage announcements
Full details — including how to obtain a token, attach it, and handle token errors — are covered on the Authentication page.

Request Format

All request and response bodies are JSON unless the endpoint accepts a file upload.
Request typeRequired headers
JSON payloadContent-Type: application/json, Accept: application/json
File uploadContent-Type: multipart/form-data, Accept: application/json
The shared Axios instance (src/Services/api.ts) sets Accept: application/json automatically on every outbound request. For JSON payloads you must also set Content-Type: application/json; for multipart uploads let the browser or Axios set the boundary automatically by omitting Content-Type.

Response Format

All responses are JSON objects. Success responses return the requested resource or a confirmation message directly in the response body. The exact shape varies per endpoint and is described in each endpoint’s reference page. Error responses always include a human-readable message field. Validation errors additionally include an errors object whose keys are the field names that failed and whose values are arrays of error strings:
{
  "message": "The given data was invalid.",
  "errors": {
    "email": ["The email field is required."],
    "contrasena": ["The contrasena field must be at least 8 characters."]
  }
}

HTTP Status Codes

CodeMeaning
200Success
201Created
400Bad Request / Validation error
401Unauthorized — missing or invalid token
403Forbidden — account suspended
404Not Found
422Unprocessable Entity
500Server Error
When a 401 is returned, clear any stored credentials and redirect the user to /login. When a 403 is returned, the account has been suspended — display an appropriate message and do not automatically retry the request.

API Modules

Users

Registration, login, profile management, email verification, and password recovery.

Portfolio

Create, retrieve, and update a user’s professional portfolio.

Projects

Add, edit, and remove portfolio projects.

Skills

Manage the list of technical and professional skills on a portfolio.

Experience

Work history and professional experience entries.

Professional Links

External profile links such as GitHub, LinkedIn, and personal websites.

Privacy

Control portfolio visibility and per-section privacy settings.

Admin

User management, suspension, and platform announcements (admin role only).

Build docs developers (and LLMs) love