{"id":35175746,"url":"https://github.com/aryanvbw/eventyay-checkout","last_synced_at":"2026-05-21T04:37:19.496Z","repository":{"id":313534127,"uuid":"1028192355","full_name":"AryanVBW/eventyay-CHECKOUT","owner":"AryanVBW","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-06T20:47:04.000Z","size":24460,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-06T19:02:45.517Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AryanVBW.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-29T06:58:15.000Z","updated_at":"2025-07-29T06:59:29.000Z","dependencies_parsed_at":"2025-09-06T19:13:02.315Z","dependency_job_id":null,"html_url":"https://github.com/AryanVBW/eventyay-CHECKOUT","commit_stats":null,"previous_names":["aryanvbw/eventyay-checkout"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/AryanVBW/eventyay-CHECKOUT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AryanVBW%2Feventyay-CHECKOUT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AryanVBW%2Feventyay-CHECKOUT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AryanVBW%2Feventyay-CHECKOUT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AryanVBW%2Feventyay-CHECKOUT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AryanVBW","download_url":"https://codeload.github.com/AryanVBW/eventyay-CHECKOUT/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AryanVBW%2Feventyay-CHECKOUT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33288914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T02:57:32.698Z","status":"ssl_error","status_checked_at":"2026-05-21T02:57:31.990Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-28T22:15:45.569Z","updated_at":"2026-05-21T04:37:19.490Z","avatar_url":"https://github.com/AryanVBW.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Checkout Functionality Implementation\n\nThis document describes the implementation of checkout functionality for the eventyay-tickets backend and Check-In app.\n\n## Overview\n\nThe checkout functionality allows event organizers to:\n1. Check out individual attendees via QR code scanning\n2. Perform bulk checkout of all checked-in attendees for an event\n3. Toggle between check-in and check-out modes in the UI\n4. Track checkout statistics alongside check-in statistics\n\n## Backend Implementation (eventyay-tickets)\n\n### 1. Checkout Service (`pretix/base/services/checkout.py`)\n\n**New file created** with reusable checkout functions:\n\n- `perform_bulk_checkout()`: Checks out all attendees currently checked in to an event\n- `perform_single_checkout()`: Checks out a single attendee position\n- `CheckOutError`: Custom exception class for checkout-specific errors\n\n**Key Features:**\n- Transactional operations for data integrity\n- Comprehensive error handling\n- Support for forced checkouts\n- Audit logging for all checkout operations\n- Signal emission for external integrations\n\n### 2. API Views (`pretix/api/views/checkin.py`)\n\n**Added new API endpoints:**\n\n#### Bulk Checkout API\n- **Endpoint:** `POST /api/v1/organizers/{organizer}/events/{event}/checkout/bulk/`\n- **Purpose:** Check out all attendees in an event\n- **Parameters:**\n  - `checkin_lists` (optional): List of checkin list IDs to checkout from\n  - `force` (optional): Force checkout even if not checked in\n  - `datetime` (optional): Custom checkout timestamp\n\n#### Single Checkout API  \n- **Endpoint:** `POST /api/v1/organizers/{organizer}/events/{event}/checkout/single/`\n- **Purpose:** Check out a specific attendee\n- **Parameters:**\n  - `position_id`: Order position ID to checkout\n  - `checkin_list_id`: Checkin list ID\n  - `force` (optional): Force checkout even if not checked in\n  - `datetime` (optional): Custom checkout timestamp\n\n### 3. URL Configuration (`pretix/api/urls.py`)\n\nAdded new URL patterns for checkout endpoints:\n- `/checkout/bulk/` for bulk operations\n- `/checkout/single/` for individual operations\n\n### 4. Testing (`tests/api/test_checkout.py`)\n\n**Comprehensive test suite including:**\n- Authentication requirements\n- Empty event scenarios\n- Bulk checkout with checked-in attendees\n- Single attendee checkout\n- Error handling for non-checked-in attendees\n- Forced checkout functionality\n\n## Frontend Implementation (eventyay-checkin)\n\n### 1. Checkout Store (`src/stores/processCheckOut.js`)\n\n**New store** for managing checkout operations:\n- `checkOutAttendeeScannerFromRoom()`: Handle QR code checkout scanning\n- `bulkCheckOutEvent()`: Perform bulk checkout via API\n- Error handling and user feedback\n- Integration with loading states\n\n### 2. Attendees Store Updates (`src/stores/attendees.js`)\n\n**Extended existing store** with checkout functions:\n- `checkOutAttendee()`: Individual attendee checkout\n- `bulkCheckOutEvent()`: Bulk event checkout\n- Pretix API integration\n\n### 3. Checkout Camera Component (`src/components/CheckIn/CheckOutCamera.vue`)\n\n**New component** for checkout scanning:\n- QR code scanning for checkout operations\n- Session support for non-daily scanners\n- Real-time feedback messages\n- Consistent UI with check-in component\n\n### 4. Enhanced Check-In Components\n\n#### Check-In Camera (`src/components/CheckIn/CheckInCamera.vue`)\n**Enhanced with:**\n- Mode toggle between check-in and check-out\n- Dynamic QR type switching\n- Dual store management\n- Visual mode indicators\n\n#### Check-In Stats (`src/components/CheckIn/CheckInStats.vue`)\n**Enhanced with:**\n- Checkout mode toggle switch\n- Bulk checkout button\n- Checkout status messages\n- Real-time stats refresh\n\n#### QR Camera (`src/components/Common/QRCamera.vue`)\n**Enhanced with:**\n- Support for `checkOut` QR type\n- Integration with checkout store\n- Unified scanning interface\n\n## Usage Instructions\n\n### For Event Staff (Frontend)\n\n1. **Individual Checkout:**\n   - Navigate to the check-in interface\n   - Toggle to \"Check-Out\" mode using the mode buttons\n   - Scan attendee's QR code\n   - Receive immediate feedback\n\n2. **Bulk Checkout:**\n   - Go to the Stats page\n   - Enable \"Checkout Mode\" using the toggle\n   - Click \"Bulk Checkout All\" button\n   - Confirm the operation\n\n### For Developers (API)\n\n1. **Bulk Checkout:**\n```bash\ncurl -X POST \\\n  'https://api.eventyay.com/api/v1/organizers/myorg/events/myevent/checkout/bulk/' \\\n  -H 'Authorization: JWT your-token' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"checkin_lists\": [1, 2],\n    \"force\": false\n  }'\n```\n\n2. **Single Checkout:**\n```bash\ncurl -X POST \\\n  'https://api.eventyay.com/api/v1/organizers/myorg/events/myevent/checkout/single/' \\\n  -H 'Authorization: JWT your-token' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"position_id\": 123,\n    \"checkin_list_id\": 1,\n    \"force\": false\n  }'\n```\n\n## Error Handling\n\n### Backend Errors\n- `not_checked_in`: Attendee is not currently checked in\n- `invalid_position`: Position or checkin list not found\n- `permission_denied`: Insufficient permissions\n- `validation_error`: Invalid request data\n\n### Frontend Errors\n- QR code validation\n- Network connectivity issues\n- API response handling\n- User feedback messages\n\n## Security Considerations\n\n1. **Authentication:** All API endpoints require proper authentication\n2. **Authorization:** Permission checks for checkin/checkout operations\n3. **Validation:** Input validation for all parameters\n4. **Audit Trail:** All operations are logged for accountability\n\n## Performance Optimizations\n\n1. **Bulk Operations:** Efficient database queries for bulk checkout\n2. **Transactions:** Atomic operations to prevent data inconsistency\n3. **Caching:** Event and checkin list caching where appropriate\n4. **Error Handling:** Graceful degradation on failures\n\n## Future Enhancements\n\n1. **Partial Checkout:** Support for checking out specific checkin lists\n2. **Scheduled Checkout:** Automatic checkout at specified times\n3. **Export Functionality:** Export checkout data and statistics\n4. **Mobile Optimization:** Enhanced mobile interface for staff\n5. **Offline Support:** Offline checkout capability with sync\n\n## Development Practices Followed\n\n1. **Minimal Changes:** Leveraged existing patterns and structures\n2. **Reusable Code:** Created separate service files for maintainability\n3. **Error Handling:** Comprehensive error handling for edge cases\n4. **Testing:** Full test coverage for new functionality\n5. **Documentation:** Clear documentation and code comments\n\n## Integration Points\n\nThe checkout functionality integrates with:\n- Existing checkin system\n- Order management\n- Event statistics\n- Audit logging\n- Permission system\n- Device authentication\n\nThis implementation provides a robust, scalable checkout system that complements the existing check-in functionality while maintaining code quality and system reliability. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryanvbw%2Feventyay-checkout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faryanvbw%2Feventyay-checkout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryanvbw%2Feventyay-checkout/lists"}