A high performance Go backend for the FixFX documentation and tools platform, built with Fiber and featuring comprehensive API documentation with ReDoc.
- Fast & Lightweight - Built with Fiber v2 web framework for high performance
- Artifacts API - Fetch and filter FiveM/RedM server artifacts from GitHub
- Natives API - Query game natives database with multi-source support (GTA5, RDR3, CFX)
- Source API - Securely serve source code files with syntax highlighting
- Search API - Full-text search across documentation (Next.js backend, will be migrated)
- API Documentation - Auto-generated with Swagger and beautiful ReDoc UI
- Version Tracking - Automatic version logging on startup with update checks
- Security - Path whitelisting, input validation, CORS support, proper error handling
Current version: 0.1.0 (January 25, 2026)
See CHANGELOG.md for full release notes and planned features.
- Go 1.22 or higher
- Make (for convenient commands)
- Optional: GitHub API token for higher rate limits
- Clone the repository
git clone https://github.com/CodeMeAPixel/FixFX-Core.git
cd FixFX-Core- Install dependencies
make install
# or manually: go mod download- Create environment file
cp .env.example .env- Generate/Update Swagger docs
make swagger
# or manually: swag init- Run the server
make dev # Development with hot-reload
# or
make run # Production binary
# or
go run main.go # Direct runThe API will be available at http://localhost:3001
GET /health- Check API status and version
GET /api/artifacts/fetch- Get FiveM/RedM artifacts with filtering and paginationGET /api/artifacts/version/:version- Get specific artifact versionGET /api/artifacts/check- Check artifact availabilityGET /api/artifacts/changes- Get artifact changelog between versions
GET /api/natives- Get game natives with filtering and paginationGET /api/natives/search- Full-text search across natives databaseGET /api/natives/:hash- Get specific native by hashGET /api/natives/stats- Get natives statistics
GET /api/source- Read source file (requirespathparameter with whitelisted paths)
GET /api/search- Global search across documentation (currently on Next.js)
- ReDoc UI -
http://localhost:3001/docs- Beautiful, interactive API explorer - Swagger JSON -
http://localhost:3001/docs/doc.json- Machine-readable specification - Swagger UI (fallback) - Available through ReDoc
On startup, the server displays:
╔═══════════════════════════════════════════════════════════╗
║ FixFX Backend API - Starting Up ║
╠═══════════════════════════════════════════════════════════╣
║ Version: v0.1.0 ║
║ Build Time: 2026-01-25 ║
║ Environment: development/production ║
╚═══════════════════════════════════════════════════════════╝
FixFX API v0.1.0 is running
Documentation available at http://localhost:3001/docs
Health check at http://localhost:3001/health
backend/
├── main.go # Application entry point with version tracking
├── go.mod # Go modules
├── Makefile # Build automation
├── CHANGELOG.md # Release notes
├── internal/
│ ├── routes/ # API route definitions with Swagger comments
│ │ ├── artifacts.go
│ │ ├── natives.go
│ │ ├── source.go
│ │ ├── search.go
│ │ └── types.go # Type definitions for Swagger
│ ├── services/ # Business logic layer
│ │ ├── artifacts.go # GitHub API integration, caching, filtering
│ │ ├── natives.go # Multi-source native fetching, search
│ │ └── source.go # Secure file serving with whitelist
│ └── handlers/ # HTTP request/response handling
│ ├── artifacts.go
│ ├── natives.go
│ └── source.go
├── docs/ # Auto-generated Swagger documentation
│ ├── docs.go
│ ├── swagger.json
│ └── swagger.yaml
└── README.md
Example: Fetch artifacts
curl "http://localhost:3001/api/artifacts/fetch?platform=windows&limit=10&offset=0"Example: Search natives
curl "http://localhost:3001/api/natives/search?q=player&limit=20"Example: Get health status
curl http://localhost:3001/health- Create a route file in
internal/routes/ - Define Swagger comments for documentation
- Implement handlers in
internal/handlers/ - Create service logic in
internal/services/if needed - Register routes in
main.go - Run
make swaggerto regenerate Swagger docs
Example handler with Swagger docs:
// @Summary Get resource
// @Description Get a specific resource by ID
// @Tags Resources
// @Param id path string true "Resource ID"
// @Produce json
// @Success 200 {object} Resource
// @Failure 404 {object} ErrorResponse
// @Router /api/resource/{id} [get]
func GetResource(c *fiber.Ctx) error {
id := c.Params("id")
return c.JSON(fiber.Map{"id": id})
}make build
# or manually: go build -o fixfx-backend main.godocker build -t fixfx-backend .
docker run -p 3001:3001 -e GITHUB_TOKEN=your_token fixfx-backendSee Dockerfile for multi-stage build configuration.
PORT=3001 # Server port (default: 3001)
GITHUB_TOKEN= # GitHub API token for artifacts (optional)
LOG_LEVEL=info # Logging level
ENVIRONMENT=development # Environment: development or production- Artifacts API: ~50-100ms (first call with API fetch, cached afterwards)
- Natives API: ~30-80ms for queries
- Source API: ~10-20ms for file reads
- Memory usage: ~20-50MB
- Caching: 1-hour TTL for all cached data
make test # Run test suite
make build # Verify code compiles
make swagger # Verify Swagger generationmake install # Install dependencies and tools
make dev # Run with hot-reload (air)
make build # Build production binary
make run # Run compiled binary
make test # Run tests
make swagger # Generate Swagger docs
make clean # Remove binary and generated files- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CHANGELOG.md for planned features including:
- Chat API endpoint
- Contributors API with GitHub integration
- Global search service (backend)
- Redis caching layer
- Rate limiting
- Authentication/Authorization
- Comprehensive test suite
This project is licensed under the AGPL 3.0 License - see the LICENSE file for details.