Quickstart Guide
This guide will walk you through setting up the TrackGeek API locally and making your first authenticated request.Prerequisites
Before you begin, ensure you have the following installed:- Node.js (v18 or higher)
- Docker and Docker Compose
- Git
- PostgreSQL (via Docker)
- Redis (via Docker)
Installation
Set up environment variables
Copy the example environment file and configure it:Update the
.env file with your configuration:.env
Generate a secure random string for
BETTER_AUTH_SECRET using: openssl rand -base64 32Your First Request
Now that the API is running, let’s make some requests!Search for Anime (Public Endpoint)
Some endpoints don’t require authentication. Let’s search for anime:Create an Account
To access protected endpoints, you need to authenticate. Let’s create an account:The sign-up endpoint automatically creates a user profile with a generated username. Session cookies are set automatically for subsequent requests.
Sign In
If you already have an account, sign in to get your session:Make an Authenticated Request
Now that you’re authenticated, let’s update your profile:Get Anime Details
Fetch detailed information about a specific anime:Response Format
All successful responses return JSON with a consistent structure:Success Response
Error Response
Interactive API Documentation
TrackGeek provides interactive API documentation powered by Swagger/Scalar. Visit the docs to explore all endpoints:The interactive documentation is only available in development mode (
NODE_ENV=development).Common Response Codes
| Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request succeeded |
| 201 | Created | Resource created successfully |
| 204 | No Content | Request succeeded with no response body |
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Authentication required |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource not found |
| 422 | Unprocessable Entity | Validation failed |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error |
Next Steps
Authentication
Learn about social providers, magic links, and bearer tokens
API Reference
Explore all available endpoints and their parameters
Media Tracking
Learn how to track anime, games, movies, and more
Social Features
Discover followers, comments, reactions, and feed events