Skip to content
Amirhossein Nakhaei edited this page May 26, 2023 · 2 revisions

Welcome to the Commonsense-Platform wiki!

Description

This project is a web application built using Express.js and React. It serves as a platform for users to complete a common sense survey. The application allows users to answer survey questions and provides an interactive interface for collecting and analyzing survey data.

Goals and Vision

The primary goal of the platform is to create an online space where individuals can actively contribute to the Common Sense project. Users are encouraged to participate in surveys and provide valuable data that contributes to the understanding of common sense.

Key objectives of the Common Sense platform include:

  • Survey Participation: The platform seeks to engage users in completing surveys that involve rating statements based on their level of common sense. This interactive element allows individuals to actively contribute their perspectives and insights.
  • Personal Common Sense Measure: Upon completing the surveys, users are provided with a measure of their own commonsensicality. This feature enables individuals to gain insights into how their common sense aligns with others participating in the platform.
  • Comparative Analysis: The platform facilitates the comparison of an individual's commonsensicality score with that of other participants. This comparative analysis serves as a benchmark for users to understand how their common sense measures up against others both globally and within their social circles.
  • Statement Submissions: The Common Sense platform encourages users to submit their own statements for rating by others. This feature promotes a collaborative environment where participants can actively contribute new ideas and perspectives to the ongoing exploration of common sense.

Overall, the Common Sense platform aims to create an inclusive and diverse community where individuals can engage in meaningful discussions, explore common sense from various angles, and contribute to the ongoing research and understanding of common sense.

Features

  • User authentication: Users can create accounts, log in, and log out.
  • Survey creation: Administrators can create and manage statements.
  • Survey participation: Users can access and complete the statement questions.
  • Survey data analysis: The application provides tools for analyzing and visualizing survey data.
  • Admin dashboard: Administrators have access to an admin dashboard for managing surveys and viewing survey results.
  • User profiles: Users can view and update their profiles.

Technologies Used

  • Frontend:

    • React
    • React Router
    • Redux
    • Axios (for making API requests)
    • HTML
    • CSS (Tailwind)
  • Backend:

    • Express.js
    • Express-sessions (session manager)
    • Sequelize (ORM for database operations)
    • MySQL
    • JWT (JSON Web Tokens) for authentication
    • Bcrypt (for password hashing)
  • Deployment:

    • AWS
    • GitHub Actions (for CI/CD)

Getting Started

To run the application locally, follow these steps:

  1. Clone the repository:
git clone https://github.com/Watts-Lab/Commonsense-Platform.git
  1. Install the dependencies for the frontend and backend:
cd Commonsense-Platform
cd client
npm install
cd ../server
npm install
  1. Configure the backend:
  • Create a MySQL database and update the database configuration in the server's config.json file.
  • Run database migrations to create the necessary tables:
npx sequelize-cli db:migrate
  1. Start the development servers:

Start the backend server:

npm run dev

Start the frontend development server:

cd ../client
npm run dev
  1. Access the application in your browser at http://localhost:5173.

Contributing

Contributions to this project are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request. Make sure to follow the project's code of conduct.

License

This project is licensed under the MIT License.

Contact

For any inquiries or questions, you can reach out to the project maintainers: