Airline application final project for design of software systems CS509 at Worcester Polytechnic Institute
Launch Process:
Ensure that in the program.cs file of the backend the policy.withorigin line properly references your local host servers
--Using 2 terminals-- In terminal 1 'cd AppBackend' and use 'dotnet run' to start backend server
In terminal 2 'cd AppFrontend' and use 'npm run dev' to start frontend server
Please add Environment variable in your your system that is called "DefaultConnection" that has the connecting string to your database.
- .NET 8 SDK
- MySQL Server
- Stripe CLI for webhook testing
- Node.js & npm (if using frontend)
Set the following Environmetal variables STRIPE_SECRET_KEY=sk_test_xxx STRIPE_WEBHOOK_SECRET=whsec_xxx DefaultConnection=server=localhost;port=3306;user=root;password=yourpass;database=yourdbname;
stripe listen --forward-to localhost:5218/api/v1/webhook
IF your database tables bookedseat,ticketbooking were already populated pls run the following commands if you have issues:
SET SQL_SAFE_UPDATES = 0;
UPDATE TicketBookings SET ConfirmationCode = CONCAT('FL-', UPPER(SUBSTRING(UUID(), 1, 8))) WHERE ConfirmationCode IS NULL OR ConfirmationCode = '';
SET SQL_SAFE_UPDATES = 1;
SET SQL_SAFE_UPDATES = 0;
UPDATE BookedSeats bs JOIN TicketBookings tb ON bs.SessionId = tb.SessionId SET bs.TicketBookingId = tb.Id WHERE bs.IsConfirmed = 1;
SET SQL_SAFE_UPDATES = 1;