Frontend part of application was created with React.js library. The version of library I used is 16.8.6. To run it, first of all, you need to install node.js (https://nodejs.org/en/). Also you can find all the packages to run application in package.json and install them just running npm install
command. The list of used libraries:
-
Bootstrap 4.3.1 https://www.npmjs.com/package/bootstrap
-
Http Status Codes 1.3.2 https://www.npmjs.com/package/http-status-codes
-
Moment.js 2.24.0 https://www.npmjs.com/package/moment
-
Node sass 4.12.0 https://www.npmjs.com/package/node-sass
-
React color 2.17.3 https://www.npmjs.com/package/react-color
-
React google login 5.0.7 https://www.npmjs.com/package/react-google-login
-
React redux 7.1.1 https://www.npmjs.com/package/react-redux
-
Redux 4.0.4 https://www.npmjs.com/package/redux
API_URL
| define url of your backend applicationBOOK_TYPES
| book types. You need to keep them the same as on backendGOOGLE_CLIENT_ID
| define your google client for google-athentificationDEFAULT_PAGE_LIMIT
| default page size for render flights and airplanes
Backend part of application was created with asp.net core 3.0. To run it, you need to install .net core 3 or later on your pc (https://dotnet.microsoft.com/download/dotnet-core/3.0).
Server uses REST-api architecture (https://drive.google.com/file/d/0BwQRhBGRbZAdYzdIT09mWU1acFk/view)
I used MS SQL Server as Database source and Dapper library as micro-ORM to work with it.
All business-logic unit-tests were written using MSTest library.
The list of third-party libraries i used in project:
- AutoMapper https://automapper.org
- Dapper https://dapper-tutorial.net
- Google API library https://developers.google.com/api-client-library/dotnet/?hl=EN
- Serilog https://serilog.net
I tried to wrote application, that can be modified for your goals. By changing appsettings.json you can change some parameteres, to make application work as you need.
There a couple of sections in config file:
Change it to connect application with your MS SQL server.
Here you need to define origins of trusted client' applications that can use server.
Secret
| define your own secret key for creating jwt tokens.
ExpirationTime
| time after jwt token becomes non-valid
Issuer
| address of your server
ExpirationTime
| the time server waits for booking seat payment
TimeUntilBookingAvailable
| the time until user can book a flight' seat
NameUpdatingInterval
| the time after user can update it' name again
AvatarUpdatingInterval
| the time after user can update it' avatar again
StoragePath
| path on yout local machine where files will be storing
AllowedExtensions
| file extensions that user can upload to the server (in this application you need only images)
MaxMbSize
| maximum size of file in megabytes
StaticFilesCatalogName
| the catalog name, which users can use to get files
StaticFilesHost
| address of files server
MaxPageLimit
| count of items user can query by one time
DefaultPage
| default number of page that uses if user don't define it in request
DefaultPageSize
| default page size that uses if user don't define it in request
CachingTime
| the time of user info caching
PhotoKey
| the key application uses to save and load path to user' image
FlightHistoryKey
| the key application uses to save and load user' flight history
You can how read how to tune logger settings in official serilog documentation (https://serilog.net)