Skip to content

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’Š Recept24

Find Medicines. Compare Prices. Locate Pharmacies.

A full-stack medicine search platform built for Uzbekistan β€” search drugs across pharmacies in real time, compare prices, and navigate to the nearest available stock.


Build Django Flutter Python Railway License: MIT


πŸ“Έ Screenshots


πŸ“‹ Table of Contents


πŸ” Overview

Recept24 solves a daily frustration: going from pharmacy to pharmacy to find a specific drug. Users search by medicine name, pick multiple items, and the platform instantly finds the pharmacies that stock all of them at the best combined price.

Core user flow:

Search medicine β†’ Add to basket β†’ System finds optimal pharmacy β†’ Navigate via Maps

Built for Nukus, Uzbekistan β€” seeded with real pharmacy locations and coordinates.


πŸ— Architecture

Recept24 follows a Decoupled Architecture: a Django backend acts as the data and logic engine, while a Flutter client app handles all UI and user interaction. The two communicate via JSON API.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Flutter Client App                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Screens  β”‚  β”‚   Services   β”‚  β”‚  Maps (GMapsβ”‚  β”‚
β”‚  β”‚  (Search,  β”‚β†’ β”‚ api_service  β”‚  β”‚  Flutter)   β”‚  β”‚
β”‚  β”‚  Pharmacy) β”‚  β”‚   .dart      β”‚  β”‚             β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     JSON / HTTP
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚            Django REST Backend                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚              search/views.py                  β”‚   β”‚
β”‚  β”‚  β€’ api_search_medicines                       β”‚   β”‚
β”‚  β”‚  β€’ api_search_pharmacies  (Smart Algorithm)   β”‚   β”‚
β”‚  β”‚  β€’ api_medicine_detail                        β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚              search/models.py                 β”‚   β”‚
β”‚  β”‚  Medicine ←──── MedicineStock ────→ Pharmacy  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                     SQLite / PostgreSQL               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ—„ Data Models

Three core models power the entire platform (search/models.py):

Medicine

Stores the drug catalog with detailed descriptions.

Field Type Description
name CharField Drug name
description TextField Detailed description
manufacturer CharField Producing company
image_url URLField Link to drug photo
category CharField Medicine category (e.g. Tablets)

Pharmacy

Stores pharmacy locations with GPS coordinates.

Field Type Description
name CharField Pharmacy name
address CharField Street address
phone CharField Contact number
latitude FloatField GPS latitude
longitude FloatField GPS longitude
work_hours CharField Opening hours

MedicineStock

The Many-to-Many bridge β€” linking pharmacies to medicine availability.

Field Type Description
medicine ForeignKey β†’ Medicine Drug reference
pharmacy ForeignKey β†’ Pharmacy Pharmacy reference
price DecimalField Current price
in_stock BooleanField Availability flag

πŸ“‘ API Reference

All endpoints are reachable under the root URL.

Base URL: https://your-app.railway.app/api/

Method Endpoint Description
GET /api/search/?q= Search medicines (autocomplete)
GET /api/search-pharmacies/?m=1&m=2 Smart search β€” find pharmacies with selected medicines
GET /api/medicines/ List all medications
GET /api/pharmacies/ List all pharmacies
GET /api/medicine/<id>/ Detailed medicine profile

Smart Search Logic (api_search_pharmacies)

The core engine:

  1. Receives multiple m (medicine ID) parameters.
  2. Filters pharmacies that stock all selected items using Django's Count and Q expressions.
  3. Calculates total_price for each valid pharmacy.
  4. Returns results sorted by lowest total price.

πŸ›  Tech Stack

Layer Technology Role
Backend language Python 3.11+ Core runtime
Web framework Django 5.x ORM, logic, routing
Database SQLite (dev) / PostgreSQL (prod) Data storage
App server Gunicorn WSGI server
Static files Whitenoise Asset management
Frontend Flutter 3.x + Dart Cross-platform mobile UI
Maps google_maps_flutter Geo-location & visualization
Hosting Railway Cloud deployment

πŸš€ Quick Start

Backend Setup

# 1. Clone & Enter
git clone https://github.com/aza4k/recept24.git
cd recept24

# 2. Virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate

# 3. Install
pip install -r requirements.txt

# 4. Initialize Database
python manage.py migrate
python seed.py

# 5. Run
python manage.py runserver

Frontend Setup

cd recept24_app
flutter pub get

# Configure API URL in lib/services/api_service.dart
# static const String baseUrl = 'http://127.0.0.1:8000';

flutter run

☁️ Deployment

Pre-configured for Railway via Procfile and railway.json. The system automatically handles migrations and data seeding on each deploy.


πŸ“„ License

MIT Β© aza4k


Developed by fundev Team
Built for the Karakalpakstan healthcare ecosystem Β· Nukus

About

πŸ₯ Full-stack medicine search platform with real-time stock analysis. Optimizes drug procurement by finding the best pharmacy for multi-item baskets using advanced Django ORM queries and Flutter UI.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages