A mobile marketplace app built with Kivy (Python), backed by a Django REST API and PostgreSQL database. Users can browse products, manage a shopping cart, place orders, and sell their own products — all from a single cross-platform app (desktop or Android APK).
[Kivy App (Desktop / APK)] │ HTTPS + JWT ▼
- [Django REST API] ──────► [PostgreSQL (hosted on Render)]
- The Kivy app never talks to the database directly — it only communicates with the Django API over HTTP.
- Authentication is handled with JWT (access + refresh tokens).
- The backend is deployed on Render; the database is a managed PostgreSQL instance also on Render.
- User registration & login (JWT-based)
- Browse products with search and price filters
- Product detail view with quantity selector
- Shopping cart (add / update quantity / remove)
- Checkout — automatically splits an order per seller if the cart contains items from multiple sellers
- Become a seller, add products (with real image upload)
- Sellers can view, edit, and delete their own products
- Sellers can view their incoming orders and update order status (pending / confirmed / shipped / delivered / cancelled) or delete an order
digishop/ ├── main.py # Kivy app entry point ├── requirements.txt # Kivy app dependencies ├── buildozer.spec # Android build configuration │ ├── api/ │ └── client.py # HTTP client, token/session management │ ├── models/ # API-backed data layer (no direct DB access) │ ├── user.py │ ├── product.py │ ├── cart.py │ └── order.py │ ├── ui/ │ ├── app.py # ScreenManager setup │ └── screens/ # One file per screen │ ├── .github/workflows/ │ └── build-apk.yml # CI: builds an Android APK on every push │ └── backend/ # Django REST API project ├── manage.py ├── requirements.txt ├── runtime.txt # Pinned Python version for Render ├── digishop_backend/ # Django project settings ├── accounts/ # User, Customer, Seller + JWT auth ├── products/ # Product CRUD ├── cart/ # Cart management └── orders/ # Order creation & seller order management
- Navigate to the backend folder:
cd backend- Install dependencies:
pip install -r requirements.txt- Copy the example config and fill in your own values:
cp digishop_backend/config.example.py digishop_backend/config.py- Run migrations:
python manage.py migrate- Start the development server:
python manage.py runserver- From the project root, install dependencies:
pip install -r requirements.txt- In
api/client.py, setAPI_BASE_URLto your backend's address (local or deployed). - Run the app:
python main.pyEvery push to master triggers a GitHub Actions workflow (.github/workflows/build-apk.yml) that builds a debug APK using Buildozer. Once the workflow finishes, download the APK from the Actions tab under that run's artifacts.
- The Kivy app / APK never stores database credentials — it only knows the public API URL.
- Database credentials and the Django secret key are kept in environment variables on Render (or a local
config.py, which is git-ignored) — never committed to the repository. - All protected endpoints require a valid JWT access token.
- Render's free tier does not provide persistent file storage, so uploaded product images may be cleared on server restarts.
- Sessions are kept in memory only (not persisted to disk), so the app requires a fresh login each time it's restarted.
