Case 03 Rails 8 · React · TypeScript · ClickHouse
Status Survey: hierarchical surveys, from form to data lake
A platform for creating and managing hierarchical survey and data-collection workflows for the New Apostolic Church (NAK). On a three-person team, I worked from the Rails 8 backend to the React interfaces, including authentication, data synchronization and delivery.
Context
Status Survey was developed through Oxeanbits for the New Apostolic Church (NAK). It organizes hierarchical survey and data-collection workflows: survey cycles that move through several levels of the organization.
The team had three people. On a team that size, each person takes on responsibilities that larger projects spread across several roles.
Problem
A multi-level organization needs to create survey cycles, distribute forms through its hierarchy, control who sees and answers what, and consolidate results into reports, in more than one language.
The collected data also has to reach analytics systems without manual copies, and the environment has to be reproducible, with backups and documentation for whoever comes next.
My responsibility
I was the leading full-stack contributor. I took part in defining the architecture and worked on the Ruby on Rails 8 backend and the React and TypeScript interfaces.
I implemented Keycloak and JWT authentication, role-based access control, and the synchronization between ClickHouse and PostgreSQL with data lake publishing. I also owned CI/CD, Docker environments, backups and technical documentation.
Decision
Authentication uses Keycloak with JWT tokens, and role-based access control defines what each level of the hierarchy can see and do. Identity and permissions are distinct responsibilities.
Data moves between PostgreSQL and ClickHouse, a database built for analytical queries, and is published to a data lake for other systems.
Alternatives and trade-offs
Present-day analysis written for this site. It is not a record of the alternatives evaluated at the time.
- Delegating identity to a provider such as Keycloak avoids reimplementing login, sessions and password policies, but adds a service to operate and requires careful token validation.
- Running more than one database has a cost: consistency, reprocessing and monitoring of the synchronization all need attention. In return, each database serves the kind of query it handles best.
Implementation
The scope covered four fronts that had to work together.
Identity and access
Keycloak and JWT for authentication; role-based access control to limit what each level of the organization can see and change.
Survey workflows
Survey cycle management, hierarchical workflows and dynamic forms in React and TypeScript, with internationalization.
Data and reporting
ClickHouse and PostgreSQL synchronization, data lake publishing, reports and PDF generation.
Delivery
Automated tests, CI/CD pipelines, Docker environments, backups and technical documentation.
Outcome
A complete platform delivered by a small team, covering everything from dynamic forms to PDF reports and from role-based permissions to publishing data for analysis.
Internal metrics record me as the project's leading individual contributor. Those are activity indicators, and the outcome belongs to a three-person team.