Skip to content

Commit aae808f

Browse files
committed
Add copilot instructions for Tailspin Shelter project
1 parent 7bacaa1 commit aae808f

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed

.github/copilot-instructions.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Tailspin Shelter
2+
3+
The Tailspin Shelter is a full-stack web application that showcases a fictional dog shelter.
4+
5+
## Technology Stack
6+
7+
### Frontend (Client)
8+
- **Framework**: [Astro](https://astro.build/) v5.4+ - Static site generator with server-side rendering
9+
- **Component Library**: [Svelte](https://svelte.dev/) v5.23+ - For dynamic interactive components
10+
- **Styling**: [Tailwind CSS](https://tailwindcss.com/) v4.0+ - Utility-first CSS framework
11+
- **Language**: TypeScript - Strongly typed JavaScript
12+
- **Adapter**: Node.js adapter for server-side rendering
13+
14+
### Backend (Server)
15+
- **Framework**: [Flask](https://flask.palletsprojects.com/) - Python web framework
16+
- **Database**: SQLite with [SQLAlchemy](https://www.sqlalchemy.org/) ORM
17+
- **Language**: Python 3.13+ with type hints
18+
- **CORS**: Flask-CORS for cross-origin requests
19+
- **Testing**: Python unittest framework
20+
21+
## Project Structure
22+
23+
```
24+
pets-workshop/
25+
├── client/ # Astro frontend application
26+
│ ├── src/components/ # Svelte components (DogList, DogDetails)
27+
│ ├── src/layouts/ # Astro layout templates
28+
│ ├── src/pages/ # Astro pages (routing)
29+
│ └── src/styles/ # Global CSS and Tailwind imports
30+
├── server/ # Flask backend API
31+
│ ├── models/ # SQLAlchemy models (Dog, Breed)
32+
│ ├── tests/ # Python unit tests
33+
│ └── app.py # Main Flask application
34+
└── scripts/ # Automation scripts (run-tests.sh, setup-environment.sh, start-app.sh)
35+
```
36+
37+
## Design Philosophy & Theme
38+
39+
**CRITICAL**: Maintain the dark, modern aesthetic throughout:
40+
- **HTML Class**: Always include `class="dark"` on the html element
41+
- **Background**: Use `bg-slate-900` for main backgrounds
42+
- **Text**: Default to `text-white` for primary content
43+
- **Typography**: Inter font family with clean, readable text
44+
- **Responsive**: Mobile-first approach using Tailwind's responsive prefixes
45+
- **Transitions**: Include `transition-colors duration-300` for smooth interactions
46+
47+
## Development Guidelines
48+
49+
### Use Scripts, Not Direct Commands
50+
**IMPORTANT**: Always prefer using the provided scripts in the `scripts/` directory rather than running commands directly:
51+
- **Testing**: Use `./scripts/run-tests.sh` instead of `python -m unittest`
52+
- **Environment Setup**: Use `./scripts/setup-environment.sh` for initial setup
53+
- **Application Start**: Use `./scripts/start-app.sh` to launch the application
54+
55+
### API Patterns
56+
- **Endpoints**: RESTful API design with `/api/` prefix
57+
- **Response Format**: Always return JSON with proper HTTP status codes
58+
- **Type Hints**: Use Python type hints for all function parameters and returns
59+
60+
### Frontend Patterns
61+
- **Component Structure**: Use Svelte for interactive components, Astro for static layouts
62+
- **Data Fetching**: Fetch data on the server side when possible
63+
- **Styling**: Use Tailwind utility classes, avoid custom CSS unless necessary
64+
- **Routing**: File-based routing through Astro's pages directory
65+
66+
### Database Patterns
67+
- **Models**: Use SQLAlchemy declarative base with proper relationships
68+
- **Queries**: Prefer SQLAlchemy query syntax over raw SQL
69+
- **Data Seeding**: Use the utilities in `utils/seed_database.py`
70+
71+
## Coding Standards
72+
73+
### Python (Backend)
74+
- Follow PEP 8 style guidelines
75+
- Use type hints for all function signatures
76+
- Use meaningful variable names with snake_case
77+
- Handle exceptions gracefully with proper error messages
78+
79+
### TypeScript/JavaScript (Frontend)
80+
- Use TypeScript for type safety
81+
- Follow Astro's component conventions
82+
- Use camelCase for variables and functions
83+
- Include proper prop types for Svelte components
84+
85+
### CSS/Styling
86+
- Use Tailwind utility classes primarily
87+
- Maintain dark theme consistency
88+
- Ensure responsive design across all breakpoints
89+
- Use semantic HTML elements when possible
90+
91+
## AI Assistant Guidelines
92+
93+
When working with this codebase:
94+
1. Always maintain the dark theme aesthetic
95+
2. Use the provided scripts for common operations
96+
3. Follow the established patterns for API responses and component structure
97+
4. Ensure type safety in both Python and TypeScript code
98+
5. Consider the educational context when suggesting improvements
99+
6. Test changes using the appropriate testing frameworks
100+
7. Keep code readable and well-documented for learning purposes

0 commit comments

Comments
 (0)