Skip to content

Latest commit

 

History

History
105 lines (74 loc) · 3.99 KB

README.md

File metadata and controls

105 lines (74 loc) · 3.99 KB

pharmacist

A simple but powerful Pharmacy Management application ⚕️.

Authors

Professors: João Coelho Garcia and David Rogério Póvoa de Matos

@IST
Master in Computer Science and Computer Engineering
Mobile and Ubiquitous Computing - Group 03
Summer Semester of 2023/2024

Table of Contents


Architecture

Backend

The backend code is located in the src/backend directory.

The backend is a REST API built using Spring Boot and Kotlin. It is responsible for managing the data and the business logic of the application.

It's implemented following the layered architecture pattern, with the following layers:

  • HTTP: responsible for handling the HTTP requests and responses, and the HTTP pipeline.
  • Service: responsible for the business logic of the application.
  • Repository: responsible for managing the data.

For simplicity, the backend uses an in-memory database to store the data. This means that the data is not persisted between runs of the application. A future improvement could be to use a relational database to store the data.

Frontend

The frontend code is located in the src/frontend directory.

The frontend is a mobile application for Android built using Kotlin and Jetpack Compose. It is responsible for providing a user interface for the application.

For client-side persistence, the frontend uses Room to store the data locally on the device and enable caching for offline usage. We also use Coil for image loading. Finally, we use OkHttp to make HTTP requests to the backend.

The frontend code is organized as follows:

  • Domain: contains the domain models of the application.
  • Service: contains the service classes for the location service and the real time updates service.
  • Repository: contains the repository classes
  • that manage the data, and communication with the backend.
  • Session: contains the session classes that manage the user session.
  • UI: contains the UI components of the application.
    • Screens: contains the screens of the application, where each screen is implemented using a:
      • Screen.kt: the screen composable.
      • ViewModel.kt: the view model of the screen, responsible for managing the screen's state.
      • Activity.kt: the activity that hosts the screen.

How to Run

To run the project, follow these steps:

  1. Clone the repository or download the source code;

  2. Run the Docker Compose command in the root directory of the project to start the backend server:

docker-compose up

Note: if you do not have Docker installed, you can run the backend server using the following command:

cd src/backend
gradlew clean build
gradlew bootRun

In any of the cases, the server will be running on http://localhost:8080.

  1. Open the frontend project in Android Studio and run the application on an Android Emulator or a Physical Device.