GitHunt
JA

javitocor/PsychologicalTest-React-Django-

A one-page app to test if you are an introvert or an extrovert person. Frontend built with React&Redux and the backend built with Django&Django Rest Framework.

Contributors
Forks
Stargazers
Issues
Hireable

Introvert/Extrovert Test Django/React

A one page app to test if you are an introvert or an extrovert person. Frontend built with React&Redux and the backend built with Django&Django Rest Framework.

Additional description about the project and its features.

Landing Page:
screenshot
Test Page:
screenshot

Built With

  • DJANGO
  • REACT
  • REDUX
  • BOOTSTRAP
  • DJANGO REST FRAMEWORK
  • ESLINT
  • GITHUB ACTIONS
  • VSCODE

Getting Started

Usage

To have this app on your pc, you need to:

  • download or clone this repo:

    • Clone with SSH:
      git@github.com:javitocor/PsychologicalTest-React-Django-.git
    
    • Clone with HTTPS
      https://github.com/javitocor/PsychologicalTest-React-Django-.git
    
  • In the project directory, you can run:

Install dependencies in your home folder with:

   pip install -r requirements.txt

Run migrations:

   py manage.py makemigrations
   py manage.py migrate

Seed the database:

  py manage.py seed

Go to the './frontend' folder and install the frontend dependencies:

  npm install

And then:

  npm run build

Back to the home folder, run the server:

   py manage.py runserver

Access the page by typing in your web browser

   http://127.0.0.1:8000/

Information about the project

Endpoints

  Get all questions
    get http://127.0.0.1:8000/api/questions/
  Create a Question
    post http://127.0.0.1:8000/api/questions/
  Update a Question
    put http://127.0.0.1:8000/api/questions/:id
  Delete a question
    delete http://127.0.0.1:8000/api/questions/:id
  Get question's answer
    get http://127.0.0.1:8000/api/questions/:id/answers
  Create question's answer
    post http://127.0.0.1:8000/api/questions/:id/answers
  Delete single question's answer
    delete http://127.0.0.1:8000/api/questions/:id/answers/:id

Modify questions to show

  • You can modify the number of questions to show to the user by changing the number in 'pickQuestions' function at './frontend/src/containers/Test.js'. After seeding there are 14 questions with its 4 different answers, but you can add new ones using the endpoint proposed.

Author

๐Ÿ‘ค Javier Oriol Correas Sanchez Cuesta

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a โญ๏ธ if you like this project!

Acknowledgments ๐Ÿš€

๐Ÿ“ License

This project is MIT licensed.