A full-stack convenience store mobile application built with Android (Java) and a serverless Spring Boot backend on AWS Lambda.
MetroMini is a mobile e-commerce application designed for convenience store shopping. It provides users with a seamless experience to browse products, manage their cart, apply vouchers, checkout with multiple payment methods, and track their order history β all from their Android device.
The project follows a client-server architecture with:
- A native Android front-end written in Java
- A Spring Boot 3 REST API back-end deployed as a serverless function on AWS Lambda via SAM
- User registration with email verification (OTP)
- Login with email/password
- Google Sign-In integration
- Password recovery via email OTP
- Profile management (avatar, name, phone, password)
- Browse products by category (Vegetables, Fruits, Beverages, Snacks)
- View featured/hot products on the home screen
- Product detail pages with images, descriptions, and pricing
- Search products by keyword
- Add products to favorites/wishlist
- Add/remove products with quantity controls
- Apply voucher/discount codes
- View subtotal, discount, and total breakdown
- Multiple payment methods: MoMo, ZaloPay, Cash
- View product reviews and star ratings
- Submit reviews with star rating and text comments
- Full order history with payment method indicators
- Detailed order view with itemized breakdown
- Order status tracking
MetroMini/
βββ android-app/ # Android client (Java, View Binding)
β βββ app/
β βββ src/main/
β βββ java/com/example/convenient/
β β βββ Activity/ # All Activity & Fragment classes
β β βββ adapters/ # RecyclerView adapters
β β βββ models/ # Data models (Product, Cart, Order, etc.)
β β βββ Utils/ # Helpers (HTTP, SharedPrefs, Cookies)
β βββ res/ # Layouts, drawables, values
βββ back-end/ # Spring Boot 3 serverless API
β βββ src/main/java/org/convenient/
β βββ controller/ # MVC controllers
β βββ rest_controller/ # REST API endpoints
β βββ models/ # JPA entity models
β βββ repository/ # Spring Data JPA repositories
β βββ services/ # Business logic layer
β βββ security/ # JWT auth & Spring Security config
β βββ dto/ # Data transfer objects
β βββ config/ # App configuration
βββ screenshots/ # App UI screenshots
| Layer | Technology |
|---|---|
| Language | Java 11 |
| Min SDK | 24 (Android 7.0) |
| Target SDK | 35 |
| UI | View Binding, Material Design Components |
| Networking | OkHttp 4, Volley |
| Image Loading | Glide 4.16 |
| Navigation | Jetpack Navigation Component |
| Auth | Google Play Services Auth |
| JSON | Gson |
| Layer | Technology |
|---|---|
| Framework | Spring Boot 3.4.4 |
| Language | Java 21 |
| Runtime | AWS Lambda (via SAM) |
| Database | MySQL |
| Auth | Spring Security + JWT (jjwt 0.11.5) |
| Caching | Caffeine (for OTP storage) |
| Spring Boot Starter Mail | |
| Storage | AWS S3 (product images, avatars) |
| Monitoring | Spring Boot Actuator |
- Android Studio (latest stable)
- JDK 21
- Maven
- AWS CLI (configured with credentials)
- SAM CLI
- A running MySQL instance
-
Clone the repository
git clone https://github.com/piracyiskey/Android.git cd Android/back-end -
Configure the database
Update
src/main/resources/application.properties(orapplication.yml) with your MySQL connection details. -
Build with SAM
sam build
-
Run locally
sam local start-apiThe API will be available at
http://127.0.0.1:3000. -
Deploy to AWS
sam deploy --guided
-
Open the project in Android Studio:
File β Open β select the android-app/ directory -
Update the API base URL
Point the app's HTTP client to your deployed (or local) backend URL.
-
Sync Gradle and Run on an emulator or physical device (min API 24).
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/register |
Register a new user |
POST |
/api/login |
Authenticate and receive JWT |
POST |
/api/otp/* |
Send & verify OTP |
POST |
/api/recovery/* |
Password recovery flow |
GET |
/api/products |
List all products |
GET |
/api/products/hot |
Get featured products |
GET |
/api/products/{id} |
Get product details |
GET/POST |
/api/cart/* |
Cart management |
GET/POST |
/api/favorites/* |
Favorites/wishlist |
POST |
/api/orders |
Place an order |
GET |
/api/orders |
Get order history |
GET/POST |
/api/ratings/* |
Product ratings & reviews |
PUT |
/api/profile |
Update user profile |
This project was developed for educational purposes.
Made with β€οΈ by the MetroMini team
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)