Skip to content

Repository files navigation

Agridom Project

Agridom is a modern agricultural web application designed to provide users with useful agricultural information and data-driven insights. The project is built with React, TypeScript, Vite, Tailwind CSS, and Supabase.

🚀 Features

  • 🌱 Agricultural information and resources
  • 🌾 Crop-related data and recommendations
  • 📊 Agricultural data visualization
  • 🌧️ Rainfall and temperature datasets
  • 🧪 Pesticide-related agricultural data
  • 📈 Crop yield information
  • 🔐 Supabase integration
  • 🎨 Responsive user interface
  • ⚡ Fast development and production builds using Vite

🛠️ Technologies Used

Frontend

  • React
  • TypeScript
  • Vite
  • React Router
  • Tailwind CSS
  • Radix UI
  • React Hook Form
  • Zod
  • Recharts
  • Lucide React

Backend / Services

  • Supabase

Data

The project includes agricultural datasets in the backend_agridom directory, including:

  • Crop_recommendation.csv
  • pesticides.csv
  • rainfall.csv
  • temp.csv
  • yield.csv
  • yield_df.csv

📁 Project Structure

agridom-project/
├── backend_agridom/
│   ├── Crop_recommendation.csv
│   ├── pesticides.csv
│   ├── rainfall.csv
│   ├── temp.csv
│   ├── yield.csv
│   └── yield_df.csv
├── public/
├── src/
├── supabase/
├── .env
├── .gitignore
├── Index.tsx
├── package.json
├── package-lock.json
├── tailwind.config.ts
├── vite.config.ts
├── tsconfig.json
└── README.md

📋 Prerequisites

Before running the project, make sure you have the following installed:

  • Node.js 18 or later
  • npm
  • Git

You can verify your installations with:

node --version
npm --version
git --version

⚙️ Installation

1. Clone the repository

git clone https://github.com/JohnDakin/agridom-project.git

2. Navigate into the project

cd agridom-project

3. Install dependencies

npm install

4. Configure environment variables

Create a .env file in the project root.

Add the environment variables required by the application, for example:

VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key

Replace the placeholder values with your actual Supabase project credentials.

Important: Never commit your .env file or expose private credentials in your GitHub repository.

▶️ Running the Development Server

Start the application with:

npm run dev

Vite will start the development server. Open the URL displayed in your terminal, typically:

http://localhost:5173

🏗️ Building for Production

Create a production build with:

npm run build

For a development-mode build:

npm run build:dev

🔍 Linting

Run ESLint with:

npm run lint

👀 Preview the Production Build

After creating a production build, run:

npm run preview

🔐 Environment Variables

Environment variables are required for services such as Supabase.

The following files should never be committed:

.env
.env.local
.env.development
.env.production
.env.test

Create your own local .env file when setting up the project.

📦 Dependencies

The project's JavaScript and TypeScript dependencies are managed through package.json and package-lock.json.

Install them with:

npm install

Do not use pip install -r requirements.txt for the React frontend.

🧪 Development Workflow

A typical development workflow is:

git clone https://github.com/JohnDakin/agridom-project.git
cd agridom-project
npm install
# Create and configure .env
npm run dev

🤝 Contributing

Contributions are welcome.

  1. Fork the repository.
  2. Create a feature branch.
git checkout -b feature/your-feature
  1. Make your changes.
  2. Run the linter.
npm run lint
  1. Build the project.
npm run build
  1. Commit your changes.
git add .
git commit -m "Add your feature"
  1. Push your branch.
git push origin feature/your-feature
  1. Open a pull request.

⚠️ Security

Never commit passwords, API keys, Supabase credentials, private tokens, or other secrets to Git.

Environment files such as .env should remain local and be excluded using .gitignore.

If an .env file containing real credentials has already been committed, removing it from .gitignore is not enough. The file must also be removed from Git tracking and any exposed credentials should be rotated.

📄 License

Add the project's license information here if a license is added to the repository.

👨‍💻 Author

John Dakin

GitHub: JohnDakin

🔗 Repository

https://github.com/JohnDakin/agridom-project

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages