A premium, high-performance developer currency exchange rate platform built on Laravel 13, React 19, and Redis.
ghostcompiler-api is a complete developer API and dashboard solution modeled after Open Exchange Rates. The application pulls and processes daily international currency values for over 150 countries, optimizes performance using high-speed Redis database caching, logs query analytics, and exports developer API credentials.
- Secure API Tokens: Full CRUD token lifecycle manager inside the developer panel. Custom base fallback currencies (defaults to
INRsystem-wide). - Daily Sync Engine: Automated daily command retrieves live values and updates local metadata (currencies, countries, names, rates).
- Redis Caching: Cached endpoint metrics reduce database queries and ensure sub-10ms response times.
- Sleek Developer Landing Page: Beautiful dark mode interface complete with Framer Motion animations, live guest conversion widgets, and code sample highlights.
- Scalar Reference Docs: Interactive API documentation served at
/docswith Scalar's modern dark theme UI, complete with Bearer Try-it-out options.
- Framework: Laravel 13.x (PHP 8.5)
- Client: React 19.x (InertiaJS v3)
- Styling: TailwindCSS v4 with Shadcn theme variables
- Cache: Redis (via predis driver)
- Database: PostgreSQL
- Docs UI: Scalar UI via CDN +
/public/openapi.json - Test Suite: Pest PHP
All API endpoints are prefixed with /api/v1 and require your token provided inside the header: Authorization: Bearer <your_token>.
- Route:
GET /api/v1/authorize - Description: Validates that a key is active and returns metadata.
- Route:
GET /api/v1 - Description: Returns active exchange rates relative to the token's configured base currency (falls back to
INR).
- Route:
GET /api/v1/{code} - Description: Returns active exchange rates relative to the
{code}base currency.
- Route:
POST /api/v1/{from}/{to} - Request Body:
{"amount": 100} - Description: Converts a specific amount from
{from}to{to}.
Ensure you have PHP 8.5+, Composer, Node.js 18+, Redis, and PostgreSQL running on your machine.
composer install
npm installCopy .env.example to .env and configure your database and Redis connections:
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=currency_db
DB_USERNAME=postgres
DB_PASSWORD=secret
REDIS_CLIENT=predis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379Tip
To sync live exchange rates, you must configure your Open Exchange Rates app credentials. You can register and generate an API access token by visiting Open Exchange Rates Signup & Key Generator.
php artisan migrateEnsure Wayfinder compiles route types:
npm run buildSync currencies and rates from providers:
php artisan app:sync-currenciesStart the concurrent servers (Laravel development server + Vite dev watcher):
npm run devTo verify the features remain stable, execute feature assertions:
php artisan test --compactFormat modified PHP files before committing:
vendor/bin/pint --dirty --format agent- URL: git@github.com:ghostcompiler/currency-api.git
