Skip to content

therapy-gabriel-set-up #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint"],
"rules": {
"react/react-in-jsx-scope": "off",
"react/no-unescaped-entities": "off",
"typescript-eslint/no-empty-function": "off"
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.DS_Store
.env
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": false,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all",
"jsxSingleQuote": true,
"bracketSpacing": true
}
13 changes: 13 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/preset-create-react-app',
],
framework: '@storybook/react',
core: {
builder: '@storybook/builder-webpack5',
},
}
9 changes: 9 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}
67 changes: 24 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,36 @@
## Front End Code Challenge
# JANE THERAPIST

This is Limbic's React/React Native Coding Challenge which will allow us to get a glimpse into our candidates' overall developer skills.

You are free to create a React web app, or a React Native mobile app, it's up to you. We'd rather you use something you are comfortable with so that time isn't wasted on project setup and we can get a real feel for your coding patterns and understanding of best practices with React and/or React Native, regardless of the end use case.

### Instructions

1. **Submitting Code:**

Option A:
- Fork this repo
- Issue a Pull Request when you're ready to start. This will count as your starting date.
- Setup your development environment for React or React Native
- Implement your solution
- Commit your changes into the forked repo

Option B:
- Setup your development environment for React or React Native
- Implement your solution
- Archive your solution into a zip file
- Send us the zip file. We should be able to extract the content and run it from there (w/o node_modules)

2. **Deadline:**

You have 1 week to complete as much tasks as you can from the challenge below. Countdown starts from the date you issued the PR or from the date you were invited to complete this challenge via email.
# Description
Jane is a clinical therapist and wants her clients to answer simple questionnaires in order to better understand them. She needs a way to add/delete/edit questions and also see the answers of each client.

3. **Implementation:**
## Prerequites

There is no correct way to do it, you are free to use whatever libraries you like. We want to see what you come up with on your own.
- React
- Typescript
- JSON-SERVER
- SCSS

### The Challenge
# Enviroment Variables
REACT_APP_BACKEND_API_URL = http://localhost:3000

Jane is a clinical therapist and wants her clients to answer simple questionnaires in order to better understand them. She needs a way to add/delete/edit questions and also see the answers of each client.
# Running the Project
cd janet-therapist

### Requirements
install all dependencies
$ yarn

Your app should be able to complete the following tasks:
then make sure the correct values have been set in the .env file (create a .env file after cloning, in the root of the project). You can run the following command to create the .env file.

- See a list of questions
- Add a new question
- Edit a question
- Delete a question
- See a list of clients
- See a client's answers
$yarn start

### Bonus Points

The following tasks will **NOT** have a negative impact in how well you did, but you will get bonus points for completing any of them.
start JSON-SERVER
$ cd src/services/database
$ npx json-server --watch db.json

- Ability to persist data locally
- Ability to select the type of answer a question will have. Types like free text, single choice from a predefined list, multiple choice from a predefined list, etc.
- Ability for the app to answer the questions. Basically using a fake login it could determine if the user is a client and display the questionnaire they need to answer. (fake login can be two buttons chosing the type of user
# Login as admin
[email protected]
Enter a password that the frontend validates. Example: OfuU5050@@##

Good Luck!
Within the DB files, you'd find all the users. As long as they exists in the database enter a password that
frontend validates. Example: IfeMe@@##
Loading