All projects

Projects / Fullstack

2026

Delivered · Demo + code

Academic

Course project for ESPA Vontovorona: an online survey on students' environmental habits, with a dashboard of the responses.

Admin dashboard: registered users, responses, people to follow up with, response rate and transport modes

Project facts

Period
August–September 2026
Context
Academic
Team
solo
Access
Public code and live demo
Hosting
Vercel, Supabase
Role
Survey design, Supabase schema and policies, React interface, dashboard and Excel export.
Stack
ReactViteTailwind CSSSupabasePostgreSQLRecharts

Summary

For
Administration and students of ESPA Vontovorona, an engineering school in Antananarivo.
Problem
The transport, consumption and waste habits of ESPA students are not measured. Decisions about campus life are made without hard data.
Outcome
Tested by 30 registered students (22 complete responses) as part of a course; not adopted by the ESPA administration.

Overview

Public home page: only four aggregated indicators are shown to signed-out visitors.Capture : September 2026
Admin dashboard: collection progress and first results.Capture : September 2026
Detailed statistics by topic (here: Technology).Capture : September 2026
Home page: what the tool brings to students and to the administration.Capture : September 2026

Problem

ESPA Vontovorona has no figures on how its students get around, use water and energy, eat or sort their waste. Without that data, student requests and campus planning choices rest on impressions.

My contribution

Academic project built solo for a course, in August and September 2026: survey, database schema, access policies, interface, dashboard and Excel export.

Solution

For students

  • A 9-step survey (transport, budget and water, food, digital, clothing, hygiene, waste, perception of the campus, general information).
  • One submission per account, enforced by the database.
  • Access to the survey's aggregated statistics.

For the administration

  • Dashboard: registered users, complete responses, people to follow up with, response rate.
  • Detailed statistics by topic, with charts.
  • Multi-sheet Excel export (wide view and detailed view) and user account management.

Results

The survey was shared with a small group of students to test it: 30 signed up and 22 filled in the whole survey. The ESPA administration did not adopt the tool. The figure of 22 dates from September 2026 and is no longer updated.

Try it

You can try the demo with the student role: create an account in the application, then fill in the survey and browse the statistics.

There is no demo admin account, for privacy reasons: that role gives access to the accounts of the students who took part in the test. The admin dashboard is shown in the screenshots in the overview (September 2026).

Technical details

Key decision

Responses stored in a JSONB column, one row per student (UNIQUE constraint on user_id).

Evolve the survey's 65 fields without schema migrations, while the database still guarantees a single submission per student.

Show technical details

Key decision and alternatives considered

  1. 01
    Choice
    Responses stored in a JSONB column, one row per student (UNIQUE constraint on user_id).
    Alternatives considered
    One SQL column per question, or a responses table with one row per question.
    Reason
    Evolve the survey's 65 fields without schema migrations, while the database still guarantees a single submission per student.

Architecture

Browser → React application on Vercel → Supabase (Auth, PostgreSQL with RLS, Storage); get_public_landing_kpis function for visitors

Supabase provides authentication, the PostgreSQL database and avatar storage. The React application reads from and writes to Supabase directly; access is filtered by Row Level Security policies. Statistics are computed in the database by two SQL functions that only return counts: get_public_landing_kpis() for the home page, get_survey_stats() for the Statistics page. An in-memory cache and localStorage avoid reloading the home page indicators on every visit.

Security

Row Level Security is enabled on the profiles and responses tables. Who can read what, according to the policies in place:

RoleResponses (responses)Profiles (profiles)
Signed-out visitorNo rows. Only 4 aggregated indicators via get_public_landing_kpis()None
Signed-in studentCreate and read their own response. Per-question counts via get_survey_stats()Read and edit their own profile
AdminRead all responsesRead, edit and delete all profiles

No policy allows a response to be edited or deleted. Example of an actual policy (initial migration; the policy name is in French in the code):

create policy "Un utilisateur cree sa propre reponse"
  on public.responses for insert
  with check (auth.uid() = user_id);

Admin status is checked by an is_admin() function declared security definer, which avoids infinite recursion between the profiles policies.

November 2026 fix: previously, any signed-in account could read the raw responses, because the Statistics page computed the charts in the browser. Now get_survey_stats() only returns counts, limited to the questions shown on screen: never the date of birth, exact age, field of study, year of study or free-text answers.

Testing and quality

The repository has no automated tests. Checks were done by hand.

Limitations

  1. 01Pseudonymization, not anonymity: each response is tied to the account ID, and an admin can link that ID to an email address.
  2. 02Statistics only show question-by-question breakdowns: no cross-analysis (for example, transport by gender).
  3. 03JavaScript ships as a single 2.08 MB file (560 KB compressed): no route-based code splitting.
  4. 04The demo data mode only kicks in when the responses table is empty or unreachable.
  5. 05No demo admin account: it would give access to the students' accounts.

Contact

Need something similar? Let’s talk.

Describe your project through the form, WhatsApp or email.