About this project
This repository contains the frontend for Tuleva's web-based pension onboarding client, available at pension.tuleva.ee. It is built with React and JavaScript/TypeScript, and has evolved over time to adopt modern practices.
Key technical details:
- Originally built with JavaScript, Redux, and Enzyme for testing, the project now encourages TypeScript conversion, functional components, and the use of React Query for data fetching, with React's native context for localized state sharing.
- The codebase includes a migration guide for moving away from Redux, favoring React Query hooks and abstracting legacy Redux usage into separate hooks.
- Development requires Node.js LTS (22.17.0) and NPM (10.9.2), with asdf recommended for version management.
- To run locally, install dependencies with `npm install`, start the server with `npm run develop` (or `npm run develop-production` for production), and run tests with `npm test`. The onboarding-service is expected on port 9000 for non-production runs.
- Deployment is automated via CircleCI on master push to AWS, while the inline widget is manually updated via FTP and WordPress theme URL updates.
- Node.js version updates are managed by editing package.json engines, CircleCI config, and .tool-versions.
Testing uses React Testing Library and MSW, with an example in CancellationFlow.tsx showing incremental migration while reusing existing Redux code. Timezone-dependent tests require TZ=UTC in IntelliJ run configurations.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.