Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: jackfperryjr
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: moogleapi

on:
workflow_dispatch:
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Jack F. Perry Jr.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
58 changes: 9 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@

A free, open REST API for Final Fantasy data — characters, monsters, and games across the entire mainline series. Built with modern .NET 10 and designed to stay fast and cheap to run.

<p align="center">
<img src="https://github.com/jackfperryjr/moogleapi/actions/workflows/deploy.yml/badge.svg" alt="Build Status" height="20">
<img src="https://img.shields.io/github/sponsors/jackfperryjr?style=flat-square&color=ea4aaa" alt="GitHub Sponsors">
<img src="https://img.shields.io/badge/.NET-10-512bd4?style=flat-square&logo=dotnet" alt=".NET 10">
<img src="https://img.shields.io/badge/FastEndpoints-black?style=flat-square&logo=fastendpoints" alt="FastEndpoints">
<img src="https://img.shields.io/badge/PostgreSQL-316192?style=flat-square&logo=postgresql&logoColor=white" />
<img src="https://img.shields.io/github/license/jackfperryjr/ale-extension?style=flat-square&color=black" alt="License">
</p>

---

## ✨ Features
Expand Down Expand Up @@ -101,61 +110,12 @@ MoogleApi.sln
└── tests/
└── MoogleAPI.Tests/
```

---

## 🏃 Running Locally

### Prerequisites

- [.NET 10 SDK](https://dotnet.microsoft.com/download)
- A PostgreSQL database ([Neon free tier](https://neon.tech) works great)
- `dotnet-ef` CLI: `dotnet tool install --global dotnet-ef`

### Setup

```bash
# 1. Clone
git clone https://github.com/jackfperryjr/moogleapi.git
cd moogleapi

# 2. Set your connection string (user secrets keeps it out of git)
dotnet user-secrets set "ConnectionStrings:DefaultConnection" \
"Host=your-host;Database=neondb;Username=user;Password=pass;SSL Mode=Require;Trust Server Certificate=true" \
--project src/MoogleAPI.Web

# 3. Create the schema
dotnet ef migrations add InitialCreate --project src/MoogleAPI.Web --startup-project src/MoogleAPI.Web
dotnet ef database update --project src/MoogleAPI.Web --startup-project src/MoogleAPI.Web

# 4. Seed data
CONNECTION_STRING="your-connection-string" dotnet run --project scripts/MoogleAPI.Scraper

# 5. Run the API
dotnet run --project src/MoogleAPI.Web
```

The API starts at `https://localhost:5001`. Landing page at `/`, docs at `/scalar/v1`.

---

## 🤖 Data Pipeline

A GitHub Action runs every Sunday at 2 AM UTC and scrapes the [Final Fantasy Wiki](https://finalfantasy.fandom.com) via the MediaWiki API. It upserts characters and monsters per game — no duplicates, no full reloads.

To trigger it manually: **Actions → Scrape Final Fantasy Data → Run workflow**.

To run the scraper locally:

```bash
# Windows (PowerShell)
$env:CONNECTION_STRING="Host=..."
dotnet run --project scripts/MoogleAPI.Scraper

# macOS / Linux
CONNECTION_STRING="Host=..." dotnet run --project scripts/MoogleAPI.Scraper
```

---

## ⚖️ Rate Limits
Expand Down
1 change: 1 addition & 0 deletions src/MoogleAPI.Web/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ <h2>Built With</h2>
<img src="/moogle.png" class="kupo-footer" alt="Moogle" style="width:40px;height:auto;opacity:0.7;" />
<p>Built with ♥ by <a href="https://github.com/jackfperryjr">jackfperryjr</a></p>
<p style="margin-top:0.4rem;">Not affiliated with Square Enix · <a href="/scalar/v1">API Docs</a></p>
<p><a href="https://buy.stripe.com/aFafZj7YI6n06d3fxG0Fi00" target="_blank" rel="noopener">Buy me a coffee ☕</a></p>
</footer>

<canvas id="ff-stars"></canvas>
Expand Down