|
1 |
| -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). |
2 |
| - |
3 |
| -## Getting Started |
4 |
| - |
5 |
| -First, run the development server: |
6 |
| - |
7 |
| -```bash |
8 |
| -npm run dev |
9 |
| -# or |
10 |
| -yarn dev |
11 |
| -# or |
12 |
| -pnpm dev |
13 |
| -``` |
14 |
| - |
15 |
| -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
16 |
| - |
17 |
| -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. |
18 |
| - |
19 |
| -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. |
20 |
| - |
21 |
| -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. |
22 |
| - |
23 |
| -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. |
24 |
| - |
25 |
| -## Learn More |
26 |
| - |
27 |
| -To learn more about Next.js, take a look at the following resources: |
28 |
| - |
29 |
| -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
30 |
| -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
31 |
| - |
32 |
| -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! |
33 |
| - |
34 |
| -## Deploy on Vercel |
35 |
| - |
36 |
| -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
37 |
| - |
38 |
| -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
| 1 | +## Overview |
| 2 | +The RPS Survey Platform is a web application built to address the needs of researchers in conducting surveys and collecting data from participants. It provides a user-friendly interface for researchers to create surveys, analyze results, and manage participants. Additionally, participants can access the platform to take surveys and contribute data. Below, you'll find information about the project, including its architecture, database schema, and usage flow. |
| 3 | +> Note: This project was built for the Applied Behavioral Science Lab at KU to conduct the generalized matching law research. |
| 4 | +
|
| 5 | +## Features |
| 6 | +- Survey Creation: Researchers can create and customize surveys according to their research needs. |
| 7 | +- Participant Management: Researchers can manage participants, including creation and deletion. |
| 8 | +- Role-Based Authentication: Implemented role-based authentication to provide different access levels for researchers and participants. |
| 9 | +- Data Collection: Utilized local storage and periodic batch data saving to ensure smooth data collection. |
| 10 | +- Data Analysis: Provides a view in Postgres to export as a CSV and perform data analysis. |
| 11 | + |
| 12 | +## Database Schema |
| 13 | +Below is the schema of the PostgreSQL database used in the project: |
| 14 | + |
| 15 | +<img width="928" alt="Screen Shot 2024-03-08 at 12 34 14 PM" src="https://github.com/bhavik-goplani/RPS-Survey/assets/56516858/981ff35f-60bb-4d12-ae09-3c053d815a34"> |
| 16 | + |
| 17 | + |
| 18 | +## Flow of the Research Platform |
| 19 | +1. Requirements Gathering: Identified three main challenges - data integrity, participant user experience, and enabling participant access to the platform. |
| 20 | +2. Database Modeling: Utilized data normalization techniques to ensure data integrity, scalability, and simplified querying process. |
| 21 | +3. Role-Based Authentication: The platform implements role-based authentication with two roles: researcher and participant. This is managed in the auth schema of PostgreSQL, with two functions for creating and deleting participants. This gives role-based access to the API endpoints and database tables, ensuring that participants can access the platform to take part in surveys. |
| 22 | +4. Researcher point of view: Created a user-friendly dashboard for researchers to create surveys and links for participants. |
| 23 | +5. Participant point of view: Participants get an email with credentials to log in and participate in the survey. Data gets saved in local storage and is periodically sent in batches to the database even in the event of browser closure or interruptions. |
| 24 | +6. Deployment: The project is built using Next.js & Supabase and hosted using Vercel at [RPS Survey App](https://rps-survey.info) |
| 25 | + |
| 26 | +## Technologies Used |
| 27 | +- Next.js |
| 28 | +- PostgreSQL |
| 29 | +- Supabase |
| 30 | +- React |
| 31 | +- Typescript |
| 32 | +- HTML/CSS |
0 commit comments