How szemerics/ticket-manager works
Project type and purpose
• This is a full-stack web application (“Ticket Manager”) built for the University of Pannonia.
• Purpose: allow users to browse movies, book tickets, manage orders, seats, screenings, settings, and user roles.
File structure
Top-level modules:
• TicketManager.Frontend – a React/TypeScript SPA (Vite) that provides the UI.
• TicketManager – a .NET Web API project hosting REST endpoints (Controllers + Program.cs + appsettings).
• TicketManager.Services – a .NET class-library layer encapsulating business logic (MovieService, OrderService, UserService, etc.).
• TicketManager.DataContext – a .NET class-library providing Entity Framework Core context, entities, DTOs, migrations, and initdb.sql.
Architectural pattern: layered (Presentation → API → Business → Data → Database).
Key insights from README
• C#-based Ticket Manager.
• initdb.sql seeds base settings and users (password: almafa123).
• No third-party external dependencies beyond React, EF Core, AutoMapper, Axios, etc.
a. Components
1. Frontend (React SPA)
2. API Gateway / .NET Web API (Controllers)
3. Services Layer (TicketManager.Services)
4. Data Access Layer (TicketManager.DataContext – DbContext + Entities + Migrations)
5. Database (SQL Server / PostgreSQL etc. created by initdb.sql)
6. External/Internal shared elements: AutoMapper, configuration (appsettings.json), Authentication (JWT session).
b. Relationships & data-flow
1. User/browser ↔ Frontend UI (HTTP/HTTPS calls)
2. Frontend ↔ .NET Web API (axios configured with base URL → Controllers)
3. Controllers → Services Layer (inject IXYZService)
4. Services → DataContext (DbContext queries, CRUD operations)
5. DataContext ↔ Database
6. Database migrations and seed scripts run at startup or CI/CD.
c. Architectural patterns & principles
• Layered Architecture: clear separation of concerns (UI, API, business, data).
• Dependency Injection: Controllers depend on service abstractions; services depend on DbContext and AutoMapper.
• DTO Pattern: data transfer objects decouple entities from external contracts.
• Migrations: EF Core code-first migrations version control the schema.
• Configuration management: appsettings.json for environment-specific settings.
d. Technologies & frameworks
• Frontend: React, TypeScript, Vite, Axios
• API: .NET 7+ Web API, C# 10
• Business: .NET class library, AutoMapper
• Data: EF Core, SQL (initdb.sql)
• Auth: likely JWT or cookie based (AuthContext.tsx on frontend)