Skip to content

Commit d52d69a

Browse files
docs: update .clinerules
1 parent 37e468e commit d52d69a

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

.clinerules

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@ This is a Nuxt 3 + Supabase project using TypeScript
3535
- supabase/.env: Local Supabase configuration (copy from .env.example)
3636
- tsconfig.json: TypeScript configuration
3737
- .env: Frontend environment variables (base64 encoded in GitHub secrets)
38+
- supabase/seed.sql: Contains test data for development
3839

3940
## Development Requirements
4041

4142
- Node.js is managed via asdf (.tool-versions)
4243
- Supabase requires Docker for local development
4344
- Environment setup requires:
44-
1. Copying supabase/.env.example to supabase/.env
45+
1. Copying supabase/.env.example to supabase/.env (ONLY if .env doesn't exist)
4546
2. Setting up .env with frontend configuration
4647

4748
## Deployment
@@ -64,6 +65,24 @@ This is a Nuxt 3 + Supabase project using TypeScript
6465
- project_stage: Project lifecycle stages
6566
- tag_class: Tag categories (tech, topic, event)
6667

68+
### Test Data (supabase/seed.sql)
69+
70+
Before implementing features, always examine seed.sql to understand:
71+
72+
- Available test data for development
73+
- Data relationships and structure
74+
- Example values for each field
75+
- Tag categories and their usage
76+
- Project stages and their values
77+
78+
For example, seed.sql contains:
79+
80+
- 20 sample projects with varied stages and relationships
81+
- Tech tags (JavaScript, Python, React, etc.)
82+
- Topic tags (Civic Engagement, Education, etc.)
83+
- Event tags (Civic Hackathon 2024, Code Sprint 2024)
84+
- Project-tag relationships showing proper usage
85+
6786
### Frontend Types (types/supabase.ts)
6887

6988
- TypeScript types mirror the database schema
@@ -112,8 +131,6 @@ This is a Nuxt 3 + Supabase project using TypeScript
112131
const client = useSupabaseClient<Database>()
113132

114133
// Async data fetching
115-
116-
```typescript
117134
const { data, pending, error } = await useLazyAsyncData<Project[]>('key', async () => {
118135
const { data, error } = await client
119136
.from('projects')
@@ -165,13 +182,18 @@ This is a Nuxt 3 + Supabase project using TypeScript
165182
- Changes to Supabase configuration require Docker container restart
166183
- Components follow a modular design pattern with clear separation of concerns
167184
- Video and image assets are stored in /assets directory and referenced using ~/assets path
168-
- When replicating existing pages, first capture a full-resolution screenshot:
185+
- NEVER overwrite existing .env files with .env.example - they may contain important local configuration
186+
- ALWAYS examine seed.sql before implementing features to understand available test data
187+
- When examining any codeforphilly.org URL, ALWAYS use the puppeteer screenshot command first:
169188

170189
```bash
171-
# Example for capturing homepage:
190+
# REQUIRED: Capture full-resolution screenshot before examining any codeforphilly.org URL
191+
puppeteer screenshot --viewport 1280x720 <url> .scratch/<descriptive-name>.png
192+
193+
# Examples:
172194
puppeteer screenshot --viewport 1280x720 https://codeforphilly.org/ .scratch/home.png
173-
# Example for capturing projects page:
174195
puppeteer screenshot --viewport 1280x720 https://codeforphilly.org/projects .scratch/projects.png
196+
puppeteer screenshot --viewport 1280x720 https://codeforphilly.org/projects/neighborhood-safety .scratch/project-details.png
175197
```
176198

177199
Then examine the saved image to ensure accurate replication at desktop resolution

0 commit comments

Comments
 (0)