Hello potential Inter-webb Intern, In this challenge you are required to build a full-stack Vehicle management web app.
Your app should be able to receive user input from a frontend form, save the data into a database and display the entries.
Please read all the instructions before you get started.
Clone this repo to your local machine
- Run npm install to install npm packages,
prisma
for CRUD andZod
for backend validation - Navigate to the folder called
pages/vehicle
:- In this folder create a
form.tsx
file. This is where your form logic will be. - The form should consist of 3 fields,
name
,model
andnumber of wheels
. The number of wheels should have 3 options, 2 wheels, 3 wheels and 4 wheels. - The form fields should be
required
and only accept input of the right type. - In the same folder create an
index.tsx
file where you will display all the vehicles in the db. - The vehicle data should be displayed alongside
edit
anddelete
buttons. Both should be functional
- In this folder create a
- In the
pages/api
folder you are required to create 2 api endpoints:- The first api endpoint will handle
creation
of a single vehicle entry andretrieval
of all vehicle entries - The second api endpoint will handle
updating
,deleting
andretrieving
a single entry. - Data received at both api endpoints should be validated with ZOD.
- The first api endpoint will handle
- Once the web app is complete, you are required to
push your code to a public github repo
and then share with us the link to your repo at this email: interwebbbc@gmail.com
- Next.Js
- TypeScript
- Prisma
- Zod
- SQL database of your choice
Extra points will be awarded to candidates with:
- Good UI
- Commented code