Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement basic app shell for the authenticated area #131

Merged

Conversation

fabian-emilius
Copy link
Collaborator

@fabian-emilius fabian-emilius commented Jul 21, 2024

This is a large refactoring PR but needed to set the foundations for the planned features. The old functionality to submit an application and to review application still exists and is working

I am sorry that this PR is so large. This should not be required going forward. Dont be intimidated by the amount of files. Most files are just containing an empty component because I already implemented a component for every page that will exist.

Testing URLs:

Screenshot of new AppShell + Old review application logic
image

Changes

  • Implement a basic app shell for the authenticated area where students will be able to submit applications and advisors can manage applications and ongoing theses (src/app/layout/AuthenticatedArea)
  • Updated authentication flow using context api because multiple pages need authentication now (src/contexts/AuthenticationContext)
  • New request logic: Remove axios and use standard fetch api. This makes it easier to do requests in react with proper cancelling (src/requests/request.ts)
  • Remove the need of 2 keycloak client and only use one for client and server. The client can be configured with environment variables now to allow a separated staging setup
  • Rename environment variables for easier configuration (webpack.config.js)
  • Add empty components for all pages and introduce new folder structure that makes it easier to work on a larger application (src/pages)
  • Move old logic into legacy folder and rename all components to legacy that will be replaced later on (src/legacy)
  • Add runtime environment variables to make docker images reusable across universities
  • Reduce bundle size from 5MB to 800kb (initial load). File splitting is improved and lazy loading for all pages is added (webpack.config.js)
  • Remove unnecessary packages to reduce bundle size (package.json)
  • Improve build time to sub 10 seconds (webpack.config.js)

Deployment Changes

  • Renamed environment variable REACT_APP_SERVER_HOST to API_SERVER_HOST
  • Renamed environment variable REACT_APP_KEYCLOAK_HOST to KEYCLOAK_HOST
  • Renamed environment variable REACT_APP_KEYCLOAK_REALM_NAME to KEYCLOAK_REALM_NAME
  • Added KEYCLOAK_CLIENT_ID to configure keycloak client id as environment
  • Only one keycloak client should be used going forward. I would suggest creating a new client called thesis-track-app. This client should be public and not authenticated. To access the application management, the new admin resource role is needed (Create role admin in newly created client or use existing thesis-track-client keycloak client). I added an example keycloak realm export to the repository but probably not needed

This new configuration should allow to configure a seperate client for the dev / staging deployment which makes it easier to test features

…ub.com:ls1intum/thesis-track into feature/thesis-chart-mockup

# Conflicts:
#	.gitignore
#	client/eslint.config.mjs
#	client/package.json
#	client/src/App.tsx
#	client/src/pages/ThesisManagementConsole/components/ThesisApplicationsDatatable/ThesisApplicationsDatatable.tsx
#	client/webpack.config.ts
#	client/yarn.lock
…ment-basic-app-shell-for-the-authenticated-area

# Conflicts:
#	client/src/interface/application.ts
#	client/webpack.config.ts
@fabian-emilius fabian-emilius merged commit 4770f25 into main Jul 29, 2024
3 checks passed
@fabian-emilius fabian-emilius deleted the 82-implement-basic-app-shell-for-the-authenticated-area branch July 29, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement basic App shell for the authenticated Area
2 participants