Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
21
This is a **monorepo** dog shelter adoption website with separated frontend and backend:
Sign in to like and favorite skills
This is a monorepo dog shelter adoption website with separated frontend and backend:
/server) on port 5100 with SQLAlchemy ORM and SQLite database/client) on port 4321 with Svelte components and Tailwind CSS v4client/src/middleware.ts) forwards /api/* requests to Flask backendThe separation allows independent scaling, but they run together locally via
scripts/start-app.sh.
Always use:
./scripts/start-app.sh (or .ps1 on Windows) from project root
python app.py or npm run dev manuallyUse:
./scripts/seed-database.sh for idempotent database population from CSV files
server/models/*.csv (breeds.csv, dogs.csv)cd server && python -m unittest test_app.py (uses mocks, no real DB)cd client && npm run test:e2e (requires both servers running)test:e2e:ui (interactive), test:e2e:debug (step through), test:e2e:headed (see browser)def get_dogs() -> Response:Response (single) or tuple[Response, int] (with status code).query() pattern, not raw SQLserver/models/)base.py): Abstract base with shared validation methods (e.g., validate_string_length)dog.py): Uses AdoptionStatus enum, has @validates decorators for validationbreed.py): Has bidirectional relationship with Dog via dogs backrefserver/models/__init__.py which exports db (SQLAlchemy instance) and init_db()# Always join Dog with Breed to get breed name (it's a foreign key) query = db.session.query(Dog.id, Dog.name, Breed.name.label('breed')) .join(Breed, Dog.breed_id == Breed.id)
[{'id': dog.id, 'name': dog.name, ...} for dog in query.all()].name (e.g., status.name returns "AVAILABLE")jsonify({"error": "..."}), 404 tupleoutput: 'server' in astro.config.mjs (NOT static site generation)@astrojs/node standalone mode<DogList client:only="svelte" /> for interactive componentsinterface Dog { id: number; name: string; breed: string; }
export let syntax in Svelte 5 (e.g., export let dogs: Dog[] = [])/api/dogs (relative URL), middleware proxies to Flask@tailwindcss/vite plugin (NOT PostCSS)animate-pulse on slate-700 backgroundsonMount() for data fetchingloading, error, and data states separately{#if loading}...{:else if error}...{:else} control flowunittest.mock.patch for db.session.query_create_mock_dog(), _setup_query_mock() for reusable mockspage.getByRole() for semantic element selection (not CSS selectors)page.route('/api/dogs', route => route.fulfill(...))server/app.py with type hints and proper joinsclient/src/pages/*.astro (dynamic routes: [id].astro)client/src/components/*.svelte with inline TypeScript@validates decorator in model file, call validate_string_length()type(scope): descriptionfeat, fix, docs, style, refactor, test, chorefeat(api): add filter endpoint for dog breedsfix(ui): resolve loading state race conditiondocs(readme): update setup instructionssnake_case for functions/variables, PascalCase for classes, UPPER_CASE for constantscamelCase for functions/variables, PascalCase for components/classesdog_model.py, DogList.svelte, api-utils.ts).name not .value when returning enums in JSONexport const prerender = false;