The Problem with Online Quizzes

Most online personality quizzes collect user data, sending answers to a server for processing and storage. This practice raises significant privacy concerns. Users often unknowingly share personal information that can be aggregated, analyzed, or even sold. The author of this project sought an alternative: a personality quiz that respects user privacy by keeping all data local to the browser. This approach eliminates the need for a backend infrastructure, simplifying development and enhancing security.

Screenshot of the Soul Color Test quiz interface running in a browser

What Was Built: Soul Color Test

The project, named Soul Color Test, offers two modes: a quick 7-question version and a more in-depth 16-question version. The core of the quiz involves mapping user answers to four reflective dimensions: depth, clarity, connection, and momentum. Unlike traditional quizzes, all calculations and results are performed directly within the user's browser. This architecture means no user data ever leaves their device, providing a strong privacy guarantee. The application leverages modern web technologies to deliver a seamless and interactive experience without relying on server-side logic.

Technical Decisions and Implementation

The developer chose Next.js and TypeScript for building the application. Next.js, a popular React framework, is well-suited for creating performant, server-rendered, or statically generated web applications. TypeScript adds static typing, improving code quality and maintainability. A key decision was to use a static export and deploy it on Cloudflare Pages. Cloudflare Pages is a platform for deploying web applications directly from Git repositories, offering global distribution and edge caching, which benefits performance and reliability. By statically exporting the Next.js application, the entire site becomes a set of static files, eliminating the need for a dynamic server at runtime.

The quiz logic itself is implemented entirely in JavaScript. User responses to the questions are captured and processed client-side. For example, each answer choice is assigned points that contribute to the four dimensions. The summation and analysis of these points happen within the browser. This client-side processing is efficient for this type of application, as the computational load is minimal and does not require persistent state management on a server. The results are then displayed directly to the user, without any data transmission.

Privacy by Design

The privacy-first aspect is central to this project. By foregoing a backend, the application inherently minimizes data collection. There are no databases to store answers, no APIs to transmit data, and no server logs to analyze user behavior. This architecture is particularly appealing in an era of increasing data breaches and growing user awareness about online privacy. The entire user journey, from answering questions to receiving results, is contained within the browser's sandbox. This approach is not only more private but also potentially more cost-effective for developers, as it removes the ongoing expenses associated with server hosting, maintenance, and scaling.

Performance and Deployment

Deploying the statically exported Next.js application on Cloudflare Pages ensures high performance. Static sites are inherently fast because they serve pre-built HTML, CSS, and JavaScript files directly from a CDN. Cloudflare's global network of servers means that users receive content from a location geographically close to them, reducing latency. This setup provides an excellent user experience, with rapid load times and smooth interactivity, all while maintaining the privacy benefits of a client-side-only application. The developer highlighted the ease of deployment through Git integration, allowing for continuous integration and continuous deployment (CI/CD) workflows.

The absence of a backend also means that the application is inherently resilient to many common server-side failures. Since there are no servers to manage or scale, the primary concern shifts to the reliability of the CDN and the browser environment. For a read-only, interactive application like a personality quiz, this model is highly robust. The developer effectively demonstrated that complex interactive experiences can be delivered on the web without traditional server infrastructure, paving the way for more privacy-conscious web applications.