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.
- Overview
- Architecture
- Data Models
- API Reference
- Tech Stack
- Quick Start
- Environment Variables
- Deployment
- Project Structure
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.
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 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Three core models power the entire platform (search/models.py):
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) |
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 |
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 |
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 |
The core engine:
- Receives multiple
m(medicine ID) parameters. - Filters pharmacies that stock all selected items using Django's
CountandQexpressions. - Calculates
total_pricefor each valid pharmacy. - Returns results sorted by lowest total price.
| 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 |
# 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 runservercd 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 runPre-configured for Railway via Procfile and railway.json. The system automatically handles migrations and data seeding on each deploy.
MIT Β© aza4k
Built for the Karakalpakstan healthcare ecosystem Β· Nukus


