DEV Community

Discussion on: Need help with building a simple web application ( CRUD ) to manage rented items

Collapse
 
devdrake0 profile image
Si

Here's how I would approach it, without spending too much time whiteboarding/architecting the solution (as it seems like it's a hobby project).

Start on the backend

Database

  • How are you going to store the cars and their state ("occupied", "available")? Which database?
  • What attributes does the car need (colour, year, make, model etc)?
  • Define your database schema, and build your database.

CRUD operations

  • Build an API (what's your language of choice?), which can call the Database and create/read/update and delete cars.

Start on the frontend

  • Build a frontend that consumes your API and lists the cars, their state, and the attributes.
  • Extend the frontend to include a form to create a new car
  • Extend the frontend to update a car
  • Extend the frontend to delete a car
  • Make it look better with styling etc.

Login page

  • Do you need this? If you're just starting out, I would try and stay away from this for now. Get everything above working and then come back and get some help as you'll need to create a users table, with password hashes and salts, and be able to handle JWT's etc.
Collapse
 
jankosutnik profile image
Jan Kosutnik

Hi Si, thank for your answer and guidelines, I have answered your questions below:

Database

  • Cars state: Occupied, available.
  • Car attributes: 3 predefined models ( keeping it simple )

CRUD operations

  • What's your language of choice? Was thinking of using Vue, since I am a beginner ( learned some VanillaJs ) and React might be too much of a challenge.

This are also the challenges that I am facing:

  • Build a frontend that consumes your API and lists the cars, their state, and the attributes.
  • Extend the frontend to include a form to create a new car
  • Extend the frontend to update a car
  • Extend the frontend to delete a car

Login page - not necessary, but some kind of authentication would be needed.

Like I have said, I am a beginner and I have been going through a Front-End Handbook to expand my knowledge, because there are a lot of unknowns, even with a simple app such as this one, that I need to find answers too.

Collapse
 
devdrake0 profile image
Si • Edited

What's your language of choice? Was thinking of using Vue, since I am a beginner ( learned some VanillaJs ) and React might be too much of a challenge.

It sounds like you're only thinking about the frontend. If you want to build an API that your frontend will consume you need to look into a JavaScript framework like Express.js. I recently wrote an article on how to write such an API over on CodeTips, here, that you might find useful.

Edit: If you're just beginning, you might actually find it useful going through some of the more "beginner friendly" articles on CodeTips first.

Edit 2: Also, if you need more real-time feedback/help, there is also a CodeTips slack channel

Thread Thread
 
jankosutnik profile image
Jan Kosutnik

I know, not used to thinking about the Backend, will checkout Express.js. Thank you for the Slack invite.

Collapse
 
csilva2810 profile image
Carlos Silva

Nice Approach!