Smart Agriculture Marketplace — local farmers to customers platform for Libya
# Smart Agriculture Marketplace
**سوق الزراعة الذكية** — marketplace connecting Libyan farmers/gardeners with customers.
Public repo:
github.com
## Status
Phases **0–9** core marketplace is implemented. Verified API journeys:
- Admin login → verify farmer → dashboards/analytics
- Farmer register → profile/farm/crop/product → publish → fulfill order
- Customer register → addresses → cart → checkout (**pickup or delivery**) → review
Locked decisions: `docs/PRODUCT_DECISIONS.md`
## Stack
| Layer | Choice |
| --- | --- |
| Frontend | HTML/CSS/JS (ES modules), GSAP, Arabic-first RTL |
| Backend | ASP.NET Core 10 clean architecture |
| Data | SQL Server + EF Core |
| Auth | Identity + JWT access/refresh tokens |
| Money | LYD `decimal(18,3)` |
## Run locally
### Prerequisites
- .NET 10 SDK
- SQL Server running (`MSSQLSERVER` or LocalDB)
- Python (optional) for static frontend
### Database
Connection (already in `appsettings.json`):
```
Server=localhost;Database=SmartAgriculture;Trusted_Connection=True;TrustServerCertificate=True;MultipleActiveResultSets=true
```
Admin PowerShell if service is stopped: `Start-Service MSSQLSERVER`
### API
```powershell
cd backend
dotnet run --project src/SmartAgriculture.API --launch-profile http
```
- Health:
localhost
- Auth: `POST /api/auth/login`, `POST /api/auth/register`
- Seeded admin: `admin@smartagriculture.local` / `ChangeMe123!`
### Deployed (API + UI together)
```powershell
.\deploy\publish.ps1
.\deploy\run-local.ps1
```
Open **
localhost
Demo users: `demo.customer001@demo.ly` / `demo.farmer001@demo.ly` — password `Demo1234!`
Admin: `admin@smartagriculture.local` / `ChangeMe123!`
Dummy seed (100 customers, 100 farmers, 100 products + orders/reviews) runs when `Seed:DummyData` is `true`.
## Docs
See `/docs` for architecture, API, database, business rules, security, UI, deployment.
## License
MIT