Go to file
2023-10-01 16:10:29 -04:00
deploy Backend done 2023-04-26 15:09:24 -04:00
migrations A 2023-05-10 12:52:20 -04:00
sql A 2023-05-10 12:52:20 -04:00
src A 2023-05-10 12:52:20 -04:00
.gitignore Backend done 2023-04-26 15:09:24 -04:00
Cargo.lock Versioned dependencies so that nothing fails 2023-10-01 16:10:29 -04:00
Cargo.toml Versioned dependencies so that nothing fails 2023-10-01 16:10:29 -04:00
Readme.md Added shortcode to agents 2023-04-14 14:42:52 -04:00
sqlx-data.json A 2023-05-10 12:52:20 -04:00

Jorge Ledezma Backend

This backend should only expose two main things:

Admin routes

These are located in src/routes/admin.rs

They are what the realtor (The client) will use to upload projects, update them, or delete them.

The whole app pretty much rotates around the following structs:

  • Agent (Who is in charge of selling the project)
  • Location (Where is the project located)
  • Project (What will be listed)
  • Unit (Goes inside projects. A project can have many units. It's like saying a country has many cities. The project is the container for all the units.)

So the client will need to be able to add, update, delete all these structures.

Read routes

These are located in src/routes/read.rs

They are what all the customers of the website and of our client will use to see the website, interact with it, etc...

The main entry point for the whole thing is in one route. get_projects_paged since this is the route that returns all of the projects. This is where the customers can filter by what they want in a project, then see which projects they like, then ask for more information (Meaning seeing all the project details and all of the units in the project and the agent who sells the units).

This client did not ask for any renting. So everything will be sale only, the prices in US dollars.

What's next?

In reality, this specific backend is pretty much done (although there's more to come). The only thing left to do is add authentication to all the admin routes. For this, there's a couple of choices. One is connect with user service (Our already created service for authentication). But this does not have email or sms access in case the client forgets his password. So I would instead connect this with a service like google authentication so that the client can connect his account with google. This means the database must have a new table named admins that contains everything regarding authentication. A part of the migration should be adding the client's user, as for now it shall only be him.

Filtering by rooms as well