This repository contains the source code for the new booking system for FlyDreamAir.
You will need the .NET 8.0 SDK to build the code.
To build the app:
dotnet build FlyDreamAir/FlyDreamAir.csproj
Before your first run, you will need to prepare the application's runtime environment.
This application uses the PostgreSQL 16 DBMS.
Running this app requires a dedicated user and database, which may be set up by running this in a query window:
CREATE USER <UserName> WITH PASSWORD '<UserPassword>';
CREATE DATABASE <DatabaseName>;
GRANT ALL ON DATABASE <DatabaseName> TO <UserName>;
ALTER DATABASE <DatabaseName> OWNER TO <UserName>;
Replace <UserName>
, <UserPassword>
, and <DatabaseName>
with your chosen values.
Then, we should register the connection string as a .NET app secret:
dotnet user-secrets set ConnectionStrings:DefaultConnection \
"Host=<HostName>; Database=<DatabaseName>; Username=<UserName>; Password=<UserPassword>" \
--project FlyDreamAir/FlyDreamAir.csproj
We use Postmark for sending emails. For this to work, we need a Server Token from Postmark.
After getting one, we should register this as a .NET app secret:
dotnet user-secrets set ApiKeys:Postmark "<Postmark Server Token>" \
--project FlyDreamAir/FlyDreamAir.csproj
For external authentication providers, we need to acquire client IDs and client secrets from the corresponding portal.
You only need to get the client ID and secret then store it using dotnet user-secrets set
. The
other steps in the tutorials below are for app developers and are not necessary for configuration.
For Google, please follow these instructions.
For Microsoft, please follow these instructions.
After the database and API keys are ready, you can run the app by using:
dotnet run --project FlyDreamAir/FlyDreamAir.csproj
The source code of the FlyDreamAir booking system is released under the MIT License. See LICENSE.md file more details.
Please note that this repository contains assessed work for CSIT214 which has been made public for the purpose of evaluation by academic staff.
Be sure to consider the Academic Integrity Policy before accessing and using this repository.