Modern web platform for monitoring and managing a network of bazaars across Uzbekistan with interactive maps, statistics, and analytics.
- Features
- Technology Stack
- Quick Start
- Installation
- Usage
- API Documentation
- Project Structure
- Contributing
- License
- โ Real-time monitoring - track status of all bazaars online/offline
- โ Interactive map - visualize bazaars on Uzbekistan map with regional boundaries
- โ Detailed statistics - analytics on cameras, ROI (regions of interest), statuses
- โ Automatic logging - complete history of status changes and events
- ๐ General statistics - bazaars, cameras, availability
- ๐ Regional statistics - data breakdown by regions of Uzbekistan
- ๐ Excel export - detailed reports with data for each bazaar
- ๐ฅ Camera information - count, status (online/offline), ROI
- โ Add bazaars - simple interface for adding new services
- โ๏ธ Edit - modify bazaar data (contacts, coordinates, ports)
- ๐๏ธ Delete - manage bazaar list
- ๐ Contact information - store Click and SCC contacts
- ๐ Dark/light theme - toggle between themes
- ๐ Multi-language - support for Russian, Uzbek, and English
- ๐ฑ Responsive design - works on all devices
- โก Fast performance - optimized performance
- Python 3.11 - main programming language
- Flask - web framework
- SQLAlchemy - ORM for database operations
- Flask-Migrate - database migration management
- Flask-RESTX - REST API with Swagger documentation
- SQLite - database
- HTML5/CSS3 - markup and styling
- JavaScript (ES6+) - interactivity
- Leaflet.js - interactive maps
- Chart.js - charts and diagrams
- SheetJS (XLSX) - Excel export
- Docker - containerization
- Docker Compose - container orchestration
- Nginx - web server for frontend
- Docker and Docker Compose
- Or Python 3.11+ for local installation
# Clone the repository
git clone https://github.com/FROWNINGdev/bazarmonitoring.git
cd bazarmonitoring
# Run the application
docker-compose up --build
# Application will be available at:
# Frontend: http://localhost:80
# Backend API: http://localhost:5000
# API Docs: http://localhost:5000/docs/# 1. Clone the repository
git clone https://github.com/FROWNINGdev/bazarmonitoring.git
cd bazarmonitoring
# 2. Install backend dependencies
cd backend
pip install -r requirements.txt
# 3. Initialize database
python reset_migrations.py
# 4. Run backend
python app.py
# 5. In another terminal, run frontend
cd frontend
python -m http.server 8080-
Clone repository
git clone https://github.com/FROWNINGdev/bazarmonitoring.git cd bazarmonitoring -
Configure environment variables (optional)
# Create .env file in backend/ SQLALCHEMY_DATABASE_URI=sqlite:///instance/bazar_monitoring.db FLASK_ENV=development -
Build and run Docker containers
docker-compose up --build -d
-
Verify installation
# Check API curl http://localhost:5000/api/health # Check frontend curl http://localhost/
- Open browser and navigate to
http://localhost:80 - Use filters to search for bazaars
- Click on a bazaar on the map to view detailed information
- Use menu to access:
- General statistics
- System logs
- Administrative panel
# Get list of all bazaars
curl http://localhost:5000/api/bazars
# Get statistics
curl http://localhost:5000/api/statistics
# Get logs
curl http://localhost:5000/api/logs?limit=50
# Add new bazaar
curl -X POST http://localhost:5000/api/services \
-H "Content-Type: application/json" \
-d '{
"name": "Bazaar Name",
"city": "City",
"ip": "192.168.1.100",
"port": 80,
"backend_port": 8200,
"pg_port": 5400
}'Full API documentation is available through Swagger UI:
- URL:
http://localhost:5000/docs/ - Interactive API endpoint testing
- Description of all parameters and responses
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/bazars |
Get list of all bazaars |
| GET | /api/status |
Get status from database |
| GET | /api/statistics |
General statistics |
| GET | /api/cameras/statistics |
Camera statistics |
| GET | /api/logs |
Get logs |
| POST | /api/services |
Add new service |
| PUT | /api/services/<id> |
Update service |
| DELETE | /api/services/<id> |
Delete service |
The project automatically publishes packages to GitHub Packages:
- ๐ณ Docker Images - ready-to-use backend and frontend containers
- ๐ฆ npm Package - frontend components for npm
- ๐ Python Package - backend API for pip
Detailed usage instructions: PACKAGES.md
# Backend
docker pull ghcr.io/frowningdev/bazarmonitoring-backend:latest
# Frontend
docker pull ghcr.io/frowningdev/bazarmonitoring-frontend:latestbazarmonitoring/
โโโ backend/ # Backend application
โ โโโ app.py # Main Flask application file
โ โโโ init_db.py # Database initialization
โ โโโ migrate.py # Migration script
โ โโโ reset_migrations.py # Migration reset
โ โโโ docker-entrypoint.sh # Docker entrypoint
โ โโโ requirements.txt # Python dependencies
โ โโโ Dockerfile # Docker image for backend
โ โโโ instance/ # SQLite database
โ
โโโ frontend/ # Frontend application
โ โโโ index.html # Main page
โ โโโ script.js # JavaScript logic
โ โโโ styles.css # Styles
โ โโโ nginx.conf # Nginx configuration
โ โโโ Dockerfile # Docker image for frontend
โ โโโ Uzb/ # GeoJSON data for map
โ
โโโ docker-compose.yml # Docker Compose configuration
โโโ README.md # This file
โโโ LICENSE # MIT License
โโโ CONTRIBUTING.md # Contributor guide
We welcome any contributions to the project! Please read CONTRIBUTING.md for details.
See also PAIR_EXTRAORDINAIRE.md for information about collaborative development.
- Fork the repository
- Create a branch for your feature (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Python: follow PEP 8
- JavaScript: use ESLint configuration
- Commits: use clear messages in English
See also the list of contributors who participated in this project.
This project is licensed under the MIT License. See the LICENSE file for details.
- Leaflet.js for excellent mapping library
- Flask for simple and powerful framework
- Open source community for inspiration and support
- Email: support@bazar-monitoring.uz
- Issues: GitHub Issues
- Discussions: GitHub Discussions
โญ If this project was helpful, please give it a star on GitHub!