How jonp-h/tillerquest works
Project type and purpose
• TillerQuest is a full-stack web application: a browser-based RPG remake (“Heimdallsquest”) built with a Next.js frontend (app-router), a standalone Node/TypeScript backend, and a PostgreSQL database.
File structure
• Top level:
• frontend/ – Next.js app using React, SSR, CSR, API routes for Auth.js, Prisma client, public assets (WASM, themes, textures).
• backend/ – Node/TypeScript service (src/index.ts), Express-style routes or custom handlers, middleware, Prisma client, DB seeding/generation scripts.
• backend/db/docker – Docker Compose for local PostgreSQL.
• prisma/ in both frontend and backend – migrations and schema definitions, shared database.
• Patterns:
• Clear separation of UI (Next.js pages/components) vs. business logic/authoritative API (backend).
• App-router nested directories under frontend/app/(protected) for RBAC.
• Middleware folders in both layers (auth.ts in frontend for SSR, auth.config in backend).
• Shared lib modules for logging, error handling, DB connections.
README for additional insights
• Confirms Next.js app-router usage, SSR preference, architecture conventions (components colocated under “_components”), TypeScript interfaces, Tailwind dark-mode style, external dependencies.
Elements
• Frontend (blue rectangles)
• Backend (green rectangles)
• Annotations for major flows (e.g., “User Login Flow”, “Game Data Fetch”).