Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 3 KB

File metadata and controls

75 lines (55 loc) · 3 KB

Tailspin Toys Crowd Funding Development Guidelines

This is a crowdfunding platform for games with a developer theme. The application uses a Flask backend API with SQLAlchemy ORM for database interactions, and an Astro/Svelte frontend with Tailwind CSS for styling. Please follow these guidelines when contributing:

Agent notes

  • Do not generate summary markdown files upon completion of a task
  • Always use absolute paths when running scripts and BASH commands

Code standards

Required Before Each Commit

  • Run Python tests to ensure backend functionality
  • For frontend changes, run builds in the client directory to verify build success and the end-to-end tests, to ensure everything works correctly
  • When making API changes, update and run the corresponding tests to ensure everything works correctly
  • When updating models, ensure database migrations are included if needed
  • When adding new functionality, make sure you update the README
  • Make sure all guidance in the Copilot Instructions file is updated with any relevant changes, including to project structure and scripts, and programming guidance

Code formatting requirements

  • When writing Python, you must use type hints for return values and function parameters.

Python and Flask Patterns

  • Use SQLAlchemy models for database interactions
  • Use Flask blueprints for organizing routes
  • Follow RESTful API design principles

Svelte and Astro Patterns

  • Use Svelte for interactive components
  • Follow Svelte's reactive programming model
  • Create reusable components when functionality is used in multiple places
  • Use Astro for page routing and static content

Styling

  • Use Tailwind CSS classes for styling
  • Maintain dark mode theme throughout the application
  • Use rounded corners for UI elements
  • Follow modern UI/UX principles with clean, accessible interfaces

GitHub Actions workflows

  • Follow good security practices
  • Make sure to explicitly set the workflow permissions
  • Add comments to document what tasks are being performed

Scripts

  • Several scripts exist in the scripts folder
  • Always use available scripts to perform tasks rather than performing operations manually
  • Existing scripts:
    • scripts/setup-env.sh: Performs installation of all Python and Node dependencies
    • scripts/run-server-tests.sh: Calls setup-env, then runs all Python tests
    • scripts/start-app.sh: Calls setup-env, then starts both backend and frontend servers

Repository Structure

  • server/: Flask backend code
    • models/: SQLAlchemy ORM models
    • routes/: API endpoints organized by resource
    • tests/: Unit tests for the API
    • utils/: Utility functions and helpers
  • client/: Astro/Svelte frontend code
    • src/components/: Reusable Svelte components
    • src/layouts/: Astro layout templates
    • src/pages/: Astro page routes
    • src/styles/: CSS and Tailwind configuration
  • scripts/: Development and deployment scripts
  • data/: Database files
  • docs/: Project documentation
  • README.md: Project documentation