Reference to the design document
- Install MySQL on local machine (or dockerize). Connection strings in
appsettings.json
need to be changed appropriately. - Navigate to the AdminDashboard/ directory (where the .sln file is) and run
dotnet restore
- Run
dotnet user-secrets init
- Run
dotnet user-secrets "AuthorizationConfiguration:Secret" "RY25waYFu+VlSdPUikfbLJEUpt2SuD5rF2bkQMAqwJ+N+6hm
(For purposes of running the application, the credentials are exposed as shown) - Navigate to the client/ directory and run
npm install
- Run
npm start
. Make sure thewebpack.config.js
points at the exposed URL from the server.
- Log in. Username is [email protected] and password is GravitationalInterviewByMinhNovember2019
- Through a REST client like Postman, register users on the account (Note the account's ID is exposed on the UI for convenience)
- Once the user limit is reached, upgrade the plan to enterprise
- Dismiss the congratulatory upgrade message
- Log out
- In the
TestFixture.cs
of the backend, insert lineClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", <token>);
on line 29. To get the token, call the login endpoint on the web API with the correct username and password.
- Have the integration tests run without any manual changes by overriding Startup.cs and bypassing authorization.
- Refactor server side so there is no concept of "Account ID", and have a default account to use by the client. On the client side, have the account already created by the time the admin logs in and simply get the default account.
- Use react router correctly and include the account ID as query parameters between components
- Upon server side errors, handle correctly in the client to redirect to an Error page