๐ซ Welcome to the Dibz interview coding exercise! ๐
This full-stack exercise mainly involves building a submit action on a form component in React that makes a request to the Node.js/Express.js backend.
The exercise requires Node.js to be installed. We recommend using the LTS version.
-
Start by forking this repository.
-
In the repo root directory, run
npm install
to gather all dependencies. -
Next,
npm run seed
will seed the local SQLite database. Warning: This will drop the database if it exists. The database lives in a local filedatabase.sqlite3
. -
Then run
npm start
which should start both the server and the React client.
- The server is running with nodemon which will automatically restart for you when you modify and save a file.
- The frontend was bootstrapped with Create React App
- The database provider is SQLite, which will store data in a file local to your repository called
database.sqlite3
. The ORM Sequelize is on top of it. You should only have to interact with Sequelize. - The API client we have set up for you is axios. You are welcome to swap this out for your favorite client if you prefer.
- The server is running on port 3001 and all AJAX requests from the frontend will automatically proxy to that endpoint. For instance, you can
axios.get('/team')
and it will automatically hitlocalhost:3001/team
.
Below is a list of user stories corresponding to our acceptance criteria.
-
Filter out
createdAt
andupdatedAt
fields from the/team
endpoint response. -
Alphabetically sort the
/team
endpoint response by first name. -
I can fill out a form with my required team member information as per the data model (see
backend/model.js
). -
Submitting the form will create a new team member in the database that persists on reload.
-
I can see team member cards for all of the new team members I have created.
Thank you and good luck! ๐