Skip to content

Conversation

@kryczkal
Copy link
Collaborator

No description provided.

kryczkal and others added 15 commits June 14, 2025 23:17
feat(ci): Refactor and fix test execution workflow

This commit resolves an issue where the CI pipeline was not running on pull request updates and significantly improves the reliability and maintainability of the test scripts.

Key Changes:

- **Fix Workflow Trigger:** Corrected the GitHub Actions workflow trigger to correctly run tests on pull request updates (synchronize events). This was the primary reason the pipeline wasn't running as expected.

- **Simplify Test Script:** Refactored the `run_tests.bash` script to use a single `docker compose` command for running tests. This removes complex manual steps for starting, waiting, and stopping containers.

- **Improve Reliability:** By using `docker compose --exit-code-from`, we now let Docker manage the test container lifecycle and correctly report the final test status, making the CI job more robust.

- **Fix Syntax Error:** Resolved a YAML syntax error in the `frontend-tests` job definition.
This major update transforms the Resellio platform from a foundational project into a more feature-rich and architecturally robust application. It introduces the full ticket resale lifecycle, implements dedicated dashboards for Organizer and Admin roles, and overhauls the frontend architecture for scalability and maintainability.
Frontend (Flutter)
A complete architectural refactor was performed, moving from a monolithic ApiService to a modern, scalable pattern.
Architectural Refactor (Repository Pattern & BLoC):
Replaced the centralized ApiService with a layered architecture using the Repository Pattern. Each feature domain (auth, events, cart, etc.) now has its own repository.
Introduced a dedicated ApiClient (Dio wrapper) for handling HTTP requests, auth tokens, and API-specific exceptions.
Migrated state management from ChangeNotifier to flutter_bloc/Cubit for all major features, resulting in more predictable and testable state logic.
Created a suite of reusable widgets (BlocStateWrapper, ListItemCard, EmptyStateWidget) to standardize UI patterns for loading, error, and empty states.
New Features & Pages:
Ticket Resale Marketplace: Implemented the full marketplace page where users can browse, filter (by price), and purchase tickets listed for resale.
My Tickets Page: Overhauled the page to be fully functional. Users can now:
Filter tickets (All, Upcoming, On Resale).
List their own tickets for resale via a price-input dialog.
Cancel an active resale listing.
Admin Dashboard: Added a new dashboard for administrators to view and verify/reject pending organizer accounts.
Organizer Dashboard: Implemented a dashboard for organizers, featuring an overview of event statistics, quick actions, and a list of recent events.
Profile Management: The profile page is now functional, allowing users to view and edit their personal information and log out securely via a confirmation dialog.
Shopping Cart: The cart is now powered by CartCubit and fully integrated with the backend API for adding, removing, and checking out items.
UI/UX Enhancements:
Completely redesigned the application AppTheme for a more polished and consistent dark-mode aesthetic.
Improved form inputs with a new CustomTextFormField and enhanced styling.
Updated navigation to link to the new, functional role-based pages.
Backend (FastAPI)
The backend was enhanced to support the new frontend features and improve data delivery.
Resale & Cart Logic:
The /cart/items endpoint now accepts either a ticket_type_id (for standard purchases) or a ticket_id (for resale purchases), enabling a unified cart experience.
Added validation to prevent users from adding their own resale tickets to their cart.
Enriched API Responses:
The /tickets endpoint now performs database joins to return comprehensive TicketDetails including event name, location, dates, and original price. This simplifies frontend logic and reduces the number of required API calls.
The endpoint also now securely defaults to showing tickets owned by the authenticated user.
Documentation & Infrastructure
README Overhaul: The README.md has been completely rewritten to serve as comprehensive project documentation. It now includes:
A detailed architecture overview with a Mermaid diagram.
Step-by-step instructions for local development (docker-compose) and full AWS deployment (Terraform).
Clear explanations of the project structure, tech stack, and CI/CD pipeline.
Bug Fixes
Corrected a critical typo in backend/requirements.txt from psycopg2-biary to psycopg2-binary, fixing dependency installation issues.
* Backend init

* Fixed t ests

* Initial admin pages

* Fixes

* Fixes

* Fix

* Fixes

* fix
* .env template update

* checkout updates

* resale ticket sending with an email

* registration confirmation email

* registration with sending confirmation email frontend integration

* email verifivation logic moved

* most tests passing - only customer2 fialing

* all tests passing
* Added create and modify option to organizer page

* Added event creation and editing

* Add minimum age field to event schema and update related components

- Added minimum_age field to EventUpdate schema.
- Updated event repository to accept event data as a Map.
- Modified event form and edit pages to handle minimum age input.
- Adjusted admin dashboard and organizer pages to hide cart button.
- Refactored stat card grid layout for better presentation.
- Updated profile page to conditionally show cart button based on user role.

* Refactor OrganizerDashboardCubit to include UserRepository and update loadDashboard method for profile verification

* Implement organizer events and statistics management with new pages and cubits

* Refactor event handling components to improve code organization and readability; introduce OrganizerEventListItem for event display and actions.

* Fixed tests

---------

Co-authored-by: Jakub Lisowski <Jlisowskyy@gmail.com>
* Fixed admin actions

* Fixed code

* Working ban prot on front

* New page
* Logout for admin

* Adjusted cart visuals

* creating event with standard tickets

* cart adding validation

* scaffold dispalying info about add to cart issues

* test fixes

* bugfix

* reverted kuba changes

* rethrow

* fixed testes

---------

Co-authored-by: Jakub Lisowski <Jlisowskyy@gmail.com>
* Najwiekszy bugfix w miescie

* Visual fixes

* Fixed marketplace confirmation

* compile fix

* Fix

* Error display fix

* tests
* Move UserModel to models and add local storage for auth service

* Abstract session storage to run on our tests
* Add event ticket types on edit

* Better handling of available events and modifying event types
@kryczkal kryczkal merged commit cc7641a into main Jun 16, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants