This take-home assignment is designed to assess your skills as a Fullstack Developer with a focus on frontend development at ble-ble.
This assignment uses the same stack as our product, and the tasks are similar to what you would be working on if you join our team.
Using the provided wireframes, create a functional UI and implement the following features.
Feel free to modify the project structure, design patterns, database schema, UI design, installed packages, UI component library as needed, and any other aspects to improve the project.
Use any tools you prefer for development, including ChatGPT.
The only technologies you have to stick with are: React.js, TypeScript, TanStack Query, Node.js, Express, and Prisma.
Commit your changes regularly to show your progress.
-
UI/UX:
- Develop the UI layout based on the provided wireframes. Feel free to make changes to the design, it's just a starting point.
- Ensure the UI clearly communicates loading states, errors, and what each button does for a user-friendly experience.
-
Leads Table:
- Display leads in a table format.
- Rows can be selected, to perform actions on selected leads.
-
Delete Selected Leads:
- Implement functionality to delete selected leads.
-
Custom Message Generation:
- Generate a personalized message for each lead by replacing
{field}
in the template with the lead's corresponding field value. - If a field used in the template is missing on a lead:
- Display an error message.
- Do not generate the message for that lead.
- For now, we just need to store 1 message per lead, so it can be a column in the leads table.
- Generate a personalized message for each lead by replacing
-
Gender Guessing:
- Use an external API (e.g., Genderize API) to guess the gender of selected leads.
- Ensure the API call is made on the backend.
- Save the guessed gender in the database.
-
CSV Import:
- Import leads from a CSV file.
- Two leads are considered the same if they have the same
firstName
andlastName
. - Exclude leads missing required fields (e.g., first name).
- You can find some example CSV files in the
/docs
folder. - [OPTIONAL] Import report: Save import information (timestamp, file name, attempted imports, successful imports, text describing the errors) in the database and link this information to the respective leads. It doesn't need to be displayed in the UI, nor very detailed.
- No code, lint, or console errors
- User experience and interface quality
- Production-ready code
- Effective use of TypeScript and libraries
To set up and run the backend:
cd backend
npm install
npm run dev
Every time you change the Prisma schema, run:
npx prisma migrate dev
To set up and run the frontend:
cd frontend
npm install
npm run dev
- We included the hook
useApiMutation
that lets us centralize optimistic updates. We use it in our code, but since it may be a bit complex to understand without us explaining it, feel free to use theuseMutation
hook directly, or any other way you prefer. - We included the function
endpoint
that lets us build anapi
object with all the endpoints. To reference the types used, useApiOutput
andApiOutput
, like so:ApiOutput<typeof api.leads.getMany>
.