diff --git a/.github/workflows/FUNDING.yml b/.github/workflows/FUNDING.yml new file mode 100644 index 0000000..7475011 --- /dev/null +++ b/.github/workflows/FUNDING.yml @@ -0,0 +1 @@ +github: jackfperryjr \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 72ffd6e..709aa2d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Deploy +name: moogleapi on: workflow_dispatch: diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..64c13d4 --- /dev/null +++ b/LICENSE @@ -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. \ No newline at end of file diff --git a/README.md b/README.md index 103c24a..bbf19e6 100644 --- a/README.md +++ b/README.md @@ -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. +

+ Build Status + GitHub Sponsors + .NET 10 + FastEndpoints + + License +

+ --- ## ✨ Features @@ -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 diff --git a/src/MoogleAPI.Web/wwwroot/index.html b/src/MoogleAPI.Web/wwwroot/index.html index 0a62b22..4acfebd 100644 --- a/src/MoogleAPI.Web/wwwroot/index.html +++ b/src/MoogleAPI.Web/wwwroot/index.html @@ -733,6 +733,7 @@

Built With

Moogle

Built with ♥ by jackfperryjr

Not affiliated with Square Enix · API Docs

+

Buy me a coffee ☕