How martindios/greendots works
Project Type & Purpose
• This project is a full-stack mobile application that allows users to explore, review, and evaluate businesses based on sustainability (aligned with Sustainable Development Goals). It consists of a backend REST API (built in Java with Spring Boot), a PostgreSQL database (containerized via Docker), and a mobile frontend application (Android app written in Kotlin).
• The README explicitly describes the mobile app as “Green Dots” with a focus on sustainability and community reviews.
Analyzing the File Structure
• The project is clearly divided into two major parts:
• The “database” directory contains two sub-parts:
▪ A Docker configuration (in database/Docker) to run the PostgreSQL database.
▪ A “Server” subdirectory (database/Server) – a Java project using Gradle with code organized by layers (controllers, DAOs, database connection, and models), indicating a typical Spring Boot architecture.
• The “movilapp” directory is an Android project. It includes:
▪ Android-specific resources (layouts, drawables, and navigation files).
▪ Kotlin source code, where network API interactions are handled via Retrofit (as seen in ApiService.kt and RetrofitClient.kt) and UI components are structured in fragments and ViewModels.
• This clear split confirms that the system has a backend API and a mobile frontend interacting with it.
Suggested Components
a. Main Components:
• Mobile Frontend:
• Android app written in Kotlin.
• Contains UI layers (fragments, ViewModels) and connectivity modules (Retrofit API client) to interact with the backend.
• Backend Server:
• Java-based Spring Boot REST API that processes business logic.
• Organized into controllers, DAOs, and service layers; responsible for authenticating users, handling requests, and interfacing with the database.
• Database:
• PostgreSQL, deployed via a Docker container.
• Manages persistent data such as user profiles, business details, reviews, and sustainability statistics.
b. Interactions/Relationships:
• The Mobile Frontend sends HTTP requests (using Retrofit) to the backend REST API.
• The Backend Server handles these requests, performs business logic, and reads/writes data from/to the PostgreSQL database.
c. Architectural Patterns & Design Principles:
• The backend uses a layered (possibly MVC) architecture – separation between controllers, data-access objects (DAOs), and models.
• Modularity is a key design aspect, as clearly seen in the separate projects for the mobile app and server, which will help support potential additional clients (like desktop apps or web interfaces) in the future.
d. Relevant Technologies:
• Backend: Java, Spring Boot, Gradle.
• Database: PostgreSQL (Dockerized).
• Frontend: Android, Kotlin, Retrofit for API connectivity.
• Development/Deployment Tools: Docker (for database), Gradle for builds, and potentially Git for version control.
Summary
• Architectural patterns (such as MVC in the backend) and note the use of technologies like Spring Boot, PostgreSQL (Docker), and Retrofit in the mobile application.
Happy diagramming!