An AI-Driven Framework for Plant Pathology, Pharmacognosy, and Cosmetology Discovery.
Transforming agricultural loss into pharmaceutical and cosmetological revenue.
About • Features • Architecture • Quick Start • Roadmap
Every year, farmers experience devastating financial losses due to unidentified crop diseases. Simultaneously, the pharmaceutical and cosmetic industries spend billions searching for novel natural compounds.
AgriCosmo-Vision is a robust, full-stack platform designed to bridge this gap. By utilizing a decoupled API architecture and predictive cheminformatics, the platform identifies plant diseases and immediately maps the biological stress-response (Systemic Acquired Resistance) to high-value secondary metabolites.
Instead of burning diseased crops, farmers can now classify their bio-waste into profitable categories such as Alkaloids (pain management), Flavonoids (anti-inflammatory), and Lycopene (cosmetics).
- 📸 Instant Pathology Diagnostics: Rapid visual diagnosis via a sleek, drag-and-drop React interface.
- ⚕️ Treatment Generation: Step-by-step agricultural remediation guides tailored to the specific pathogen.
- 🧬 Pharmacognosy Engine: Predictive drug classification (identifying Alkaloids, Terpenoids, etc.) based on the plant's metabolic stress response.
- 💄 Cosmetology Insights: Discovery of valuable aesthetic compounds for the beauty industry.
- 📊 Global Dashboard: A responsive, data-rich history tracker powered by TanStack Query and PostgreSQL JSONB indexing.
Built on a modern Modular Monolith architecture utilizing pnpm workspaces. This guarantees end-to-end type safety between the client and server without relying on heavy build steps or external compilers.
| Layer | Technology | Justification |
|---|---|---|
| Frontend | React 19, Vite, Wouter | Ultra-fast rendering, minimal bundle size (wouter), and instantaneous HMR (Vite). |
| UI Design | TailwindCSS, Shadcn UI | Accessible, unstyled primitives allowing 100% design ownership without library bloat. |
| State Mgt | TanStack React Query | Eliminates Redux boilerplate; manages server-state caching and loading UI automatically. |
| Backend | Node.js, Express 5.0 | High-concurrency API Gateway optimized for asynchronous I/O routing. |
| Validation | Zod | Strictly enforces boundary payloads, shared directly from a monorepo workspace package. |
| Database | PostgreSQL, Drizzle ORM | High-performance SQL building combined with JSONB for unstructured Pharmacognosy arrays. |
To ensure synchronous development across UI, Database, and API teams, the AI inference engine is currently implemented as a stochastic architectural mock. This strategic Decoupled Architecture finalized the API contract first. In production, this mock is cleanly swapped for an external gRPC/HTTP call to a dedicated Python GPU microservice running a CNN (e.g., ResNet50), requiring zero rewrites to the core TypeScript gateway.
Follow these steps to get the project running locally.
- Node.js (v18+)
- PNPM (
npm install -g pnpm) - PostgreSQL database
-
Clone the repository:
git clone https://github.com/your-username/AgriCosmo-Vision.git cd AgriCosmo-Vision -
Install Workspace Dependencies:
pnpm install
-
Configure Environment Variables: Create a
.envfile inartifacts/api-server/with your database credentials:DATABASE_URL=postgres://user:password@localhost:5432/agricosmo_db
-
Initialize Database:
# Push Drizzle schema to your PostgreSQL database cd artifacts/api-server pnpm run db:push
-
Start Development Servers:
# From the root workspace, starts both Vite and Express concurrently pnpm run dev
- Phase 1: Core Monorepo Setup & End-to-End Type Safety (
Zod). - Phase 2: Database Design (
PostgreSQLJSONB architecture). - Phase 3: MVP API Integration & AI Mock implementation.
- Phase 4: Cloud Migration: Direct-to-S3 Pre-signed URLs to protect the Node event loop.
- Phase 5: Security: JWT Authentication integration via Supabase/Clerk.
- Phase 6: Python GPU Worker: Integration of real CNN inference model.