NityMulya is a comprehensive market transparency and commerce platform designed to bridge the gap between wholesalers, retailers, and customers in Bangladesh. The platform ensures fair pricing, transparent supply chains, and effective market oversight through a multi-stakeholder approach.
To create a transparent, efficient, and fair marketplace that connects wholesale suppliers with retail shops and end customers, while providing regulatory oversight through DNCRP (Directorate of National Consumer Rights Protection) integration.
lib/
├── main.dart # App entry point with routing
├── config/
│ ├── api_config.dart # API configuration management
│ └── web_config.dart # Web-specific configurations
├── providers/
│ └── auth_provider.dart # Authentication state management
├── screens/
│ ├── auth/ # Login, signup, authentication
│ ├── customers/ # Customer-specific screens
│ ├── shop_owner/ # Shop owner dashboard and tools
│ ├── wholesaler/ # Wholesaler management interface
│ └── dncrp/ # DNCRP admin dashboard
├── services/
│ ├── customer_api.dart # Customer API integration
│ ├── shop_owner_api.dart # Shop owner API services
│ ├── wholesaler_api.dart # Wholesaler API services
│ └── message_api_service.dart # Messaging system
└── network/
└── network_helper.dart # HTTP client with authentication
Backend/
├── src/
│ ├── index.ts # Server entry point and routing
│ ├── controller/
│ │ ├── authController.ts # Authentication logic
│ │ ├── apiController.ts # Core API endpoints
│ │ ├── customerController.ts # Customer operations
│ │ ├── shopOwnerController.ts # Shop owner operations
│ │ └── wholesalerController.ts # Wholesaler operations
│ ├── utils/
│ │ ├── jwt.ts # JWT authentication middleware
│ │ └── database.ts # PostgreSQL connection
│ └── types/
│ └── auth.ts # TypeScript type definitions
├── package.json
└── .env # Environment configuration
Clone the repository
git clone <repository-url>
cd NityMulya
Install Flutter dependencies
flutter pub get
Configure environment variables
Create .env.local file in the root directory:
API_BASE_URL=http://localhost:5000
ENABLE_LOGGING=true
Run the application
# For Android
flutter run
# For iOS
flutter run -d ios
# For Web
flutter run -d web-server --web-port 3000
Navigate to backend directory
cd Backend
Install dependencies
bun install
Configure environment variables
Create .env file:
# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=nitymulya_db
DB_USER=your_username
DB_PASSWORD=your_password
# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key-here
JWT_EXPIRES_IN=7d
# Server Configuration
PORT=5000
NODE_ENV=development
# CORS Configuration
ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
Set up PostgreSQL database
CREATE DATABASE nitymulya_db;
-- Run migration scripts to create tables
Start the development server
bun run dev
The server will start on http://localhost:5000
Create PostgreSQL database
CREATE DATABASE nitymulya_db;
\c nitymulya_db;
Run table creation scripts Execute the SQL schema files in order:
Seed initial data (optional)
# Run API endpoint to initialize sample data
curl -X POST http://localhost:5000/initialize_sample_data
POST /login_customer # Customer login
POST /login_shop_owner # Shop owner login
POST /login_wholesaler # Wholesaler login
POST /signup_customer # Customer registration
POST /signup_shop_owner # Shop owner registration
POST /signup_wholesaler # Wholesaler registration
GET /customer/orders # Get customer orders
POST /customer/orders # Create new order
GET /customer/orders/:id # Get specific order
POST /customer/orders/cancel # Cancel order
POST /customer/complaints # Submit complaint
GET /shop-owner/dashboard # Dashboard data
GET /shop-owner/inventory # Inventory management
GET /shop-owner/customer-orders # Customer orders
PUT /shop-owner/customer-orders/status # Update order status
GET /shop-owner/low-stock # Low stock alerts
GET /wholesaler/dashboard # Wholesaler dashboard
GET /wholesaler/inventory # Manage wholesale inventory
GET /wholesaler/orders # Downstream orders
POST /wholesaler/offers # Create offers
GET /get_shops # Get all shops
GET /get_categories # Product categories
GET /get_price_history/:product # Price history
POST /api/complaints/public # Public complaint submission
.env.local# Run unit tests
flutter test
# Run integration tests
flutter test integration_test/
# Run API tests
bun test
# Test specific endpoints
curl -X POST http://localhost:5000/test
test_customer_order_flow_complete.dart: End-to-end order testingtest_auth_debug.dart: Authentication flow validationtest_order_auth.dart: Order authentication testinggit checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Built with ❤️ for transparent and fair markets in Bangladesh
Dart
54.2%
TeX
21.4%
TypeScript
10.1%
Python
6.8%
JavaScript
2.5%
BibTeX Style
1.9%
NityMulya is a comprehensive market transparency and commerce platform designed to bridge the gap between wholesalers, retailers, and customers in Bangladesh. The platform ensures fair pricing, transparent supply chains, and effective market oversight through a multi-stakeholder approach.
To create a transparent, efficient, and fair marketplace that connects wholesale suppliers with retail shops and end customers, while providing regulatory oversight through DNCRP (Directorate of National Consumer Rights Protection) integration.
lib/
├── main.dart # App entry point with routing
├── config/
│ ├── api_config.dart # API configuration management
│ └── web_config.dart # Web-specific configurations
├── providers/
│ └── auth_provider.dart # Authentication state management
├── screens/
│ ├── auth/ # Login, signup, authentication
│ ├── customers/ # Customer-specific screens
│ ├── shop_owner/ # Shop owner dashboard and tools
│ ├── wholesaler/ # Wholesaler management interface
│ └── dncrp/ # DNCRP admin dashboard
├── services/
│ ├── customer_api.dart # Customer API integration
│ ├── shop_owner_api.dart # Shop owner API services
│ ├── wholesaler_api.dart # Wholesaler API services
│ └── message_api_service.dart # Messaging system
└── network/
└── network_helper.dart # HTTP client with authentication
Backend/
├── src/
│ ├── index.ts # Server entry point and routing
│ ├── controller/
│ │ ├── authController.ts # Authentication logic
│ │ ├── apiController.ts # Core API endpoints
│ │ ├── customerController.ts # Customer operations
│ │ ├── shopOwnerController.ts # Shop owner operations
│ │ └── wholesalerController.ts # Wholesaler operations
│ ├── utils/
│ │ ├── jwt.ts # JWT authentication middleware
│ │ └── database.ts # PostgreSQL connection
│ └── types/
│ └── auth.ts # TypeScript type definitions
├── package.json
└── .env # Environment configuration
Clone the repository
git clone <repository-url>
cd NityMulya
Install Flutter dependencies
flutter pub get
Configure environment variables
Create .env.local file in the root directory:
API_BASE_URL=http://localhost:5000
ENABLE_LOGGING=true
Run the application
# For Android
flutter run
# For iOS
flutter run -d ios
# For Web
flutter run -d web-server --web-port 3000
Navigate to backend directory
cd Backend
Install dependencies
bun install
Configure environment variables
Create .env file:
# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=nitymulya_db
DB_USER=your_username
DB_PASSWORD=your_password
# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key-here
JWT_EXPIRES_IN=7d
# Server Configuration
PORT=5000
NODE_ENV=development
# CORS Configuration
ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
Set up PostgreSQL database
CREATE DATABASE nitymulya_db;
-- Run migration scripts to create tables
Start the development server
bun run dev
The server will start on http://localhost:5000
Create PostgreSQL database
CREATE DATABASE nitymulya_db;
\c nitymulya_db;
Run table creation scripts Execute the SQL schema files in order:
Seed initial data (optional)
# Run API endpoint to initialize sample data
curl -X POST http://localhost:5000/initialize_sample_data
POST /login_customer # Customer login
POST /login_shop_owner # Shop owner login
POST /login_wholesaler # Wholesaler login
POST /signup_customer # Customer registration
POST /signup_shop_owner # Shop owner registration
POST /signup_wholesaler # Wholesaler registration
GET /customer/orders # Get customer orders
POST /customer/orders # Create new order
GET /customer/orders/:id # Get specific order
POST /customer/orders/cancel # Cancel order
POST /customer/complaints # Submit complaint
GET /shop-owner/dashboard # Dashboard data
GET /shop-owner/inventory # Inventory management
GET /shop-owner/customer-orders # Customer orders
PUT /shop-owner/customer-orders/status # Update order status
GET /shop-owner/low-stock # Low stock alerts
GET /wholesaler/dashboard # Wholesaler dashboard
GET /wholesaler/inventory # Manage wholesale inventory
GET /wholesaler/orders # Downstream orders
POST /wholesaler/offers # Create offers
GET /get_shops # Get all shops
GET /get_categories # Product categories
GET /get_price_history/:product # Price history
POST /api/complaints/public # Public complaint submission
.env.local# Run unit tests
flutter test
# Run integration tests
flutter test integration_test/
# Run API tests
bun test
# Test specific endpoints
curl -X POST http://localhost:5000/test
test_customer_order_flow_complete.dart: End-to-end order testingtest_auth_debug.dart: Authentication flow validationtest_order_auth.dart: Order authentication testinggit checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Built with ❤️ for transparent and fair markets in Bangladesh
Dart
54.2%
TeX
21.4%
TypeScript
10.1%
Python
6.8%
JavaScript
2.5%
BibTeX Style
1.9%