10 Commits

Author SHA1 Message Date
f557c06771 feat: complete database schema migration to UUID primary keys
## Database Migrations (18 new)
- Migrate all primary keys from SERIAL to UUID
- Add soft delete (deleted_at) to all 19 entities
- Add missing indexes for performance optimization
- Add CHECK constraints for data validation
- Add user audit fields (last_login_at, timezone, locale)
- Add weather station location fields (latitude, longitude, elevation)
- Add foreign key relationships (CameraDevice→Device, ValidatedEvent→WeatherStation)
- Prepare private key encryption fields

## Backend Entity Updates
- All entities updated with UUID primary keys
- Added @DeleteDateColumn for soft delete support
- Updated relations and foreign key types

## Backend Service/Controller Updates
- Changed ID parameters from number to string (UUID)
- Removed ParseIntPipe from controllers
- Updated TypeORM queries for string IDs

## Frontend Updates
- Updated all service interfaces to use string IDs
- Fixed CameraDevice.location as JSONB object
- Updated weather.ts with new fields (elevation, timezone)
- Added Supabase integration hooks and lib
- Fixed chart components for new data structure

## Cleanup
- Removed deprecated .claude/agents configuration files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 03:33:26 +08:00
1c272140d9 fix: resolve camera settings click and subscription API errors
- Camera settings: Use UUID `id` instead of optional `deviceId` for camera selection
- Camera settings: Only fetch history when deviceId exists
- Camera settings: Fix location display for JSONB location object
- Subscription: Safely handle empty JSON response when user has no subscription

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 03:25:03 +08:00
95353ae2d7 chore: clean up project structure
- Remove .bmad-core/ and web-bundles/ (AI tool configs)
- Remove tmp-home/ directories and cache files
- Move test scripts to scripts/ directory
- Move design file to docs/ directory
- Remove duplicate AGENTS.md (content in CLAUDE.md)
- Remove duplicate sample-app-config.toml
- Update .gitignore with missing entries
- Fix hardcoded credentials in check-migrations.js
- Update IMPLEMENTATION_SUMMARY.md date

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 00:08:01 +08:00
13ce6ae442 feat: implement complete edge device registration system
- Add hardware fingerprinting with cross-platform support
- Implement secure device registration flow with X.509 certificates
- Add WebSocket real-time communication for device status
- Create comprehensive device management dashboard
- Establish zero-trust security architecture with multi-layer protection
- Add database migrations for device registration entities
- Implement Rust edge client with hardware identification
- Add certificate management and automated provisioning system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 08:46:25 +08:00
d272a38247 polish frontend 2025-08-11 19:04:26 +08:00
f1ba9ff742 add history,analysis,camera... pages 2025-08-10 16:07:08 +08:00
12708e6149 display 2025-08-09 10:04:14 +08:00
3a014a3d20 fix:页面和node后端ok; 2025-08-04 01:02:29 +08:00
46d8af6084 🎉 Epic 2 Milestone: Successfully completed the final story of Epic 2: Commercialization & Core User Experience with full-stack date filtering functionality.
📋 What Was Accomplished

  Backend Changes:
  -  Enhanced API Endpoint: Updated GET /api/v1/events to accept optional date query parameter
  -  Input Validation: Added YYYY-MM-DD format validation to PaginationQueryDto
  -  Database Filtering: Implemented timezone-aware date filtering in EventsService
  -  Controller Integration: Updated EventsController to pass date parameter to service

  Frontend Changes:
  -  Date Picker Component: Created reusable DatePicker component following project design system
  -  Gallery UI Enhancement: Integrated date picker into gallery page with clear labeling
  -  State Management: Implemented reactive date state with automatic re-fetching
  -  Clear Filter Functionality: Added "Clear Filter" button for easy reset
  -  Enhanced UX: Improved empty states for filtered vs unfiltered views

  🔍 Technical Implementation

  API Design:
  GET /api/v1/events?date=2025-08-02&limit=20&cursor=xxx

  Key Files Modified:
  - meteor-web-backend/src/events/dto/pagination-query.dto.ts
  - meteor-web-backend/src/events/events.service.ts
  - meteor-web-backend/src/events/events.controller.ts
  - meteor-frontend/src/components/ui/date-picker.tsx (new)
  - meteor-frontend/src/app/gallery/page.tsx
  - meteor-frontend/src/hooks/use-events.ts
  - meteor-frontend/src/services/events.ts

   All Acceptance Criteria Met

  1.  Backend API Enhancement: Accepts optional date parameter
  2.  Date Filtering Logic: Returns events for specific calendar date
  3.  Date Picker UI: Clean, accessible interface component
  4.  Automatic Re-fetching: Immediate data updates on date selection
  5.  Filtered Display: Correctly shows only events for selected date
  6.  Clear Filter: One-click reset to view all events

  🧪 Quality Assurance

  -  Backend Build: Successful compilation with no errors
  -  Frontend Build: Successful Next.js build with no warnings
  -  Linting: All ESLint checks pass
  -  Functionality: Feature working as specified

  🎉 Epic 2 Complete!

  With Story 2.9 completion, Epic 2: Commercialization & Core User Experience is now DONE!

  Epic 2 Achievements:
  - 🔐 Full-stack device status monitoring
  - 💳 Robust payment and subscription system
  - 🛡️ Subscription-based access control
  - 📊 Enhanced data browsing with detail pages
  - 📅 Date-based event filtering
2025-08-03 10:30:29 +08:00
a04d6eba88 🎉 Epic 1 Complete: Foundation, User Core & First Light
## Major Achievements 

### Story 1.14: 前端事件画廊页面 - Gallery Page Implementation
-  Protected /gallery route with authentication redirect
-  Infinite scroll with React Query + Intersection Observer
-  Responsive event cards with thumbnail, date, location
-  Loading states, empty states, error handling
-  Dark theme UI consistent with design system

### Full-Stack Integration Testing Framework
-  Docker-based test environment (PostgreSQL + LocalStack)
-  E2E tests with Playwright (authentication, gallery workflows)
-  API integration tests covering complete user journeys
-  Automated test data generation and cleanup
-  Performance and concurrency testing

### Technical Stack Validation
-  Next.js 15 + React Query + TypeScript frontend
-  NestJS + TypeORM + PostgreSQL backend
-  AWS S3/SQS integration (LocalStack for testing)
-  JWT authentication with secure token management
-  Complete data pipeline: Edge → Backend → Processing → Gallery

## Files Added/Modified

### Frontend Implementation
- src/app/gallery/page.tsx - Main gallery page with auth protection
- src/services/events.ts - API client for events with pagination
- src/hooks/use-events.ts - React Query hooks for infinite scroll
- src/components/gallery/ - Modular UI components (EventCard, GalleryGrid, States)
- src/contexts/query-provider.tsx - React Query configuration

### Testing Infrastructure
- docker-compose.test.yml - Complete test environment setup
- test-setup.sh - One-command test environment initialization
- test-data/seed-test-data.js - Automated test data generation
- e2e/gallery.spec.ts - Comprehensive E2E gallery tests
- test/integration.e2e-spec.ts - Full-stack workflow validation
- TESTING.md - Complete testing guide and documentation

### Project Configuration
- package.json (root) - Monorepo scripts and workspace management
- playwright.config.ts - E2E testing configuration
- .env.test - Test environment variables
- README.md - Project documentation

## Test Results 📊
-  Unit Tests: 10/10 passing (Frontend components)
-  Integration Tests: Full workflow validation
-  E2E Tests: Complete user journey coverage
-  Lint: No warnings or errors
-  Build: Production ready (11.7kB gallery page)

## Milestone: Epic 1 "First Light" Achieved 🚀

The complete data flow is now validated:
1. User Authentication 
2. Device Registration 
3. Event Upload Pipeline 
4. Background Processing 
5. Gallery Display 

This establishes the foundation for all future development.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-31 18:49:48 +08:00