middleschool-tutor-gql
No description available
Ask AI about middleschool-tutor-gql
Powered by Claude Β· Grounded in docs
I know everything about middleschool-tutor-gql. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
MTG Middle School Monorepo
A monorepo containing a GraphQL API and web frontend for searching Magic: The Gathering cards legal in the Middle School format.
Project Structure
middleschool-mono/
βββ apps/
β βββ api/ # Hono GraphQL API
β βββ web/ # Remix.js frontend
βββ packages/ # Shared packages (if needed)
Development
Prerequisites
- Node.js 20+
- pnpm
Getting Started
-
Install dependencies:
pnpm install -
Start development servers:
pnpm devThis starts:
- API server on http://localhost:3001
- Web frontend on http://localhost:3000
API Development
The API is built with Hono and serves a GraphQL endpoint at /graphql.
Available queries:
searchCards(query: String!, limit: Int)- Search cards by name, type, or textgetCard(oracleId: String!)- Get a single card by Oracle IDgetCardsByColor(colors: [String!]!)- Filter cards by mana colors
Convert CSV data:
cd apps/api
pnpm run convert-data
Web Development
The frontend is built with Remix.js and consumes the GraphQL API.
Deployment
Vercel Deployment
Both apps are configured for Vercel deployment:
- API: Deploy as serverless functions
- Web: Deploy as static site with SSR
Environment Variables
Copy the example environment file and configure:
cp .env.example .env.local
Required variables:
API_URL- GraphQL API endpoint URL
For local development:
API_URL=http://localhost:3001/graphql
For Vercel deployment: Set in Vercel dashboard or CLI:
vercel env add API_URL
# Enter: https://your-api-domain.vercel.app/graphql
Data
The card data is sourced from a CSV file and converted to JSON at build time. The data includes:
- Card names (English and Japanese)
- Mana cost and colors
- Card types and rarity
- Legal/banned status in Middle School format
- Rules text and power/toughness
Tech Stack
- API: Hono.js, GraphQL Yoga, TypeScript
- Frontend: Remix.js, React, TypeScript
- Build: Turbo, pnpm workspaces
- Deployment: Vercel
