Skip to content

Joaaofiilho/Mali

Repository files navigation

logo

What is Malí?

Malí is an app that keeps track of all of yours supermarket shops. In Malí, you can add an item to the shopping list, as well as mark it as done, delete it or even set it to a specific category.

Application

Mali was made using Android + Kotlin, MVVM + Clean architecture to the code structure, Jetpack Compose for UI elements and JUnit for unit testing.

At the start of the app, you will be prompted into a screen where you can find an add button.

Clicking on the add button, you should see a bottom sheet with inputs to be filled to add a market item.

After pressing cancel, the bottom sheet should disappear and be cleared.

After pressing ok, the filled item should be added to the list and the bottom sheet should disappear.

Items can be checked as done by clicking on them.

If the backend recieves the request, it should update the UI with the updated value. If not, it should show an error message telling that there was a problem with the request.

You can as well delete an item by dragging it to the left.

It will wait for the backend to respond and, if everything did ok, it will be deleted.

API

Malí uses a simple backend API (GitHub) made by me specially created for this app. It has no login feature, so everybody can make changes to it1 (oh boy D:)

It was made using NodeJS with the help of the Express library and hosted on Heroku. 🚀


https://mali-backend.herokuapp.com


CREATE

ROUTE: /create

BODY:

{
	"title": "Bread",
	"quantity": 2,
	"done": false,
	"category": "FOOD"
}

RESPONSE (200)


GET ALL

ROUTE: /all

RESPONSE (200):

[
    {
        "_id": "623531feef037e0be21325d6",
        "title": "Bread",
        "quantity": 2,
        "category": "FOOD",
        "done": false,
        "__v": 0
    },
    {
        "_id": "6235321fef037e0be21325d9",
        "title": "Salsicha",
        "quantity": 2,
        "category": "FOOD",
        "done": false,
        "__v": 0
    }
]

GET BY ID

ROUTE: /item/{id}

RESPONSE (200):

{
    "_id": "6235321fef037e0be21325d9",
    "title": "Salsicha",
    "quantity": 2,
    "category": "FOOD",
    "done": false,
    "__v": 0
}

RESPONSE (404):

{
    "message": "There are no items with this id"
}

UPDATE

ROUTE: /update/{id}

BODY:

{
	"title": "Banana",
	"quantity": 4,
	"done": true,
	"category": "BEAUTY"
}

RESPONSE(404):

{
    "message": "There are no items with this id"
}

DELETE BY ID

ROUTE: /delete/{id}

RESPONSE(200)

RESPONSE(404):

{
    "message": "There are no items with this id"
}

DELETE ALL DONE

ROUTE: /deletedone

RESPONSE(200)


Thanks for the opportunity for making this app, it was really fun :octocat:

Footnotes

  1. The app wasn't made for multiple accesses, so it is expected to work fine with just one application running.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages