This app is designed to enhance the remote experience of a bootcamper. We have specifically focused our app on the weekly reflections that bootcampers are expected to submit.
This is a simple 3 page app with a landing page, a self assessment tool and a summary.
User reads instructions.
User inputs topics to be added to their list and provides a score between 1 and 10 based on how they feel they are doing in each topic.
User is provided with a summary of current and previous self assessed scores.
This section should be read and the page component trees should be used as a visual reference. The Front-end documentation outlines the main functionality of each component within the Reflectify App.
To start the server run npm start.
Each page of the App is routed through the App.js and is assigned individual URLs as follows:
- Home: http://localhost:3000/
- Self-assessment tool: http://localhost:3000/assessment
- Summary page: http://localhost:3000/summary
The Header & Footer are rendered in the App.js file and applied to all pages in the App.
Landing page for the user that contains guidance on how to use the self-assessment tool on a weekly basis. This page has a 'begin' button that allows navigation to the self-assessment tool page.
The assessment page renders the following components for the self-assessment tool:
- User input text field to generate user topic list
- Sliders to score understanding in each individual topic
- Submit All button to send scores to the database and allow navigation to the Summary page
Assessment.js passes props and functions to the following files:
NewTopic.jsTopicList.js
Assessment.js contains three functions, descriptions of these functions are available within the JS Docs for this App.
This javascript file handles the user input field and the add button on the Assessment page. The handleUserInput function tracks and stores the text input by the user. The handleAddButtonClick adds the stored text(along with a slider) to the list on the Assessment page and the the resetInputField function resets the text input field to blank when the Add button is clicked.
This file maps the topics onto a list on the assignment page. It requires the topics and setSliderValue function as parameters. The setSliderValue sets new topics and slider scores as key-value pairs.
TopicList.js passes props and a function to the following files:
TopicItem.js
This file is required to display the Topics inputed by the user along with the sliderValues. The TopicItem function requires the text and sliderValue values along with the setSliderValue function.
The slider input field tracks changes to topic scores on each slider using the setSliderValue function and passes these back up to the Assessment.js file. The handleSliderChange function updates the changes to the sliderValue scores everytime a change is made by the user. The topics and scores are saved in an array of objects(topics).
Body.js and Title.js components are for App display purposes only.
TBC. See Limitations and Extra Features.
| Color | Hex |
|---|---|
| Primary Color | |
| Secondary Color |
| HTTP Method | Path | Query Params | Result |
|---|---|---|---|
| GET | /api/bootcampers | Gets all bootcampers | |
| GET | /api/bootcampers/:id | ?id=name |
Gets a bootcamper by name |
| POST | /api/bootcampers | Adds a new bootcamper |
| HTTP Method | Path | Query Params | Resquest Body | Result |
|---|---|---|---|---|
| GET | /api/reviews | Gets all reviews | ||
| GET | /api/reviews/:id | ?id=id |
Gets a review by id | |
| POST | /api/reviews | topic_id, score, bootcamper_id | Adds a new review | |
| PATCH | /api/reviews/:id | Updates a review |
| HTTP Method | Path | Query Params | Result |
|---|---|---|---|
| GET | /api/topics | Gets all topics | |
| GET | /api/topics/:title | ?subject_title=title |
Gets a topic by its title |
To run the app locally you need to create a .env file and add it to your .gitignore file. The .env file must contain your PORT number and your DATABASE_URL.
The following commands run the scripts to set up the database:
npm run db-createcreates the database tablesnpm run db-dropdrops the tablesnpm run db-seedadds seed data into the databasenpm run db-resetwill drop, then create, then seed all tables in the database
To start the server run npm start.
When running in development ...
Cypress E2E tests are run using npx cypress open in the React app.
For these to run you will also need to have the server running on both the front and back end and the database set up.
Supertest unit tests are run in the Node app using npm test.
The app currently only supports one user input to be saved at a time. In future we aim for the full array of inputs to be saved in one fetch (POST) request.
Users earn badges based on the frequency of their reflections, whether they submitted them on time and the progress they've made (calculated using their own scores and how they change over time)



