Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ericcobasdev/careertrack-api/llms.txt

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

This guide walks you through everything you need to go from zero to a running CareerTrack API instance. By the end you’ll have the server running locally, a registered user account with an API token, a job application stored in the database, and a live look at your pipeline statistics.

Prerequisites

Before you begin, make sure you have the following installed on your machine:
CareerTrack API uses SQLite by default in development. No database server installation is required — Laravel will create and manage the SQLite file automatically after you run migrations.

Steps

1

Clone and Install

Clone the repository, install PHP dependencies, configure your environment, and start the development server.
git clone https://github.com/ericcobasdev/careertrack-api.git
cd careertrack-api

composer install

cp .env.example .env
php artisan key:generate

php artisan migrate

php artisan serve
The API will now be listening at http://127.0.0.1:8000. All subsequent examples use this base URL.
2

Register a User

Send a POST request to /api/auth/register with your name, email, and password. The API returns the new user object and a Sanctum Bearer token you’ll use for all authenticated requests.
curl -s -X POST http://127.0.0.1:8000/api/auth/register \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "Jane Doe",
    "email": "jane@example.com",
    "password": "secret123",
    "password_confirmation": "secret123"
  }'
Response 201 Created:
{
  "user": {
    "id": 1,
    "name": "Jane Doe",
    "email": "jane@example.com",
    "created_at": "2024-05-01T10:00:00.000000Z",
    "updated_at": "2024-05-01T10:00:00.000000Z"
  },
  "token": "1|aBcDeFgHiJkLmNoPqRsTuVwXyZ123456"
}
Copy the token value — you’ll need it for every subsequent request.
3

Authenticate Your Requests

CareerTrack uses token-based authentication. Store your token and pass it as a Bearer token in the Authorization header of every protected request.
# Store the token in a shell variable for convenience
TOKEN="1|aBcDeFgHiJkLmNoPqRsTuVwXyZ123456"

# Every protected request includes this header:
# Authorization: Bearer $TOKEN
If you ever need to retrieve a fresh token, call POST /api/auth/login with your email and password. The response format is identical to registration.
4

Create Your First Job Application

With your token ready, create a job application record by posting to /api/applications. Only company_name and position_title are required — all other fields are optional.
curl -s -X POST http://127.0.0.1:8000/api/applications \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "company_name": "Acme Corp",
    "position_title": "Backend Developer",
    "status": "applied",
    "source": "LinkedIn",
    "salary_min": 50000,
    "salary_max": 70000,
    "location": "Remote",
    "applied_at": "2024-05-01"
  }'
Response 200 OK:
{
  "data": {
    "id": 1,
    "user_id": 1,
    "company_name": "Acme Corp",
    "position_title": "Backend Developer",
    "status": "applied",
    "source": "LinkedIn",
    "source_url": null,
    "salary_min": 50000,
    "salary_max": 70000,
    "location": "Remote",
    "notes": null,
    "applied_at": "2024-05-01",
    "next_step_at": null,
    "created_at": "2024-05-01T10:05:00.000000Z",
    "updated_at": "2024-05-01T10:05:00.000000Z"
  }
}
5

Check Your Pipeline Stats

Once you have applications in the system, use the stats endpoint to see a breakdown of your pipeline by status.
curl -s -X GET http://127.0.0.1:8000/api/stats \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response 200 OK:
{
  "total": 1,
  "applied": 1,
  "interview": 0,
  "offer": 0,
  "rejected": 0
}

What’s Next

Authentication

Deep dive into registration, login, and token usage — including all request parameters and response shapes.

List Applications

Explore the full API reference for retrieving, filtering, and managing your job application records.

Build docs developers (and LLMs) love