Skip to content

Latest commit

 

History

History
183 lines (152 loc) · 5.6 KB

README.md

File metadata and controls

183 lines (152 loc) · 5.6 KB

iKrishak 🌱

License: MIT Next.js Express.js

A platform bridging farmers and consumers for fresh agricultural products. Built with modern web technologies for scalability and security.

Team: SyntaxError

Team Members

Mentor

🛠️ Tech Stack

Frontend

  • Framework: Next.js
  • Styling: Tailwind CSS
  • Component Library: ShadCN/ui

Backend

  • Framework: Express.js
  • Database: MongoDB (Atlas)
  • ORM: Mongoose

Services

  • Authentication: JWT, Google OAuth
  • Payments: Stripe API
  • Email: Nodemailer

🚀 Project Setup

To run the iKrishak project locally, follow these steps for each part of the application: the backend (/server), the admin dashboard (/admin-dashboard), and the client frontend (/client).


✅ 1. Clone the Repository

git clone https://github.com/Learnathon-By-Geeky-Solutions/syntaxerror.git
cd syntaxerror

✅ 2. Backend Setup (/server)

The backend is built using Express.js and connected to MongoDB.

cd server
npm install

📄 Environment Variables

Create a .env file in the /server directory with the following variables:

PORT=
DB_URI=
BYCRYPT_SALT=
JWT_SECRET=
EMAIL_ID=
EMAIL_PASSWORD=
EMAIL_HOST=
EMAIL_PORT=
EMAIL_SECURE=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
FRONTEND_URL=
BACKEND_URL=

▶️ Start the Server

npm run start:dev

✅ 3. Client Frontend Setup (/client)

This is the consumer-facing frontend, built with Next.js, TailwindCSS, and ShadCN UI.

cd client
npm install

📄 Environment Variables

Create a .env file in the /client directory with the following variables:

NEXT_PUBLIC_BASE_URL=
NEXTAUTH_SECRET=
GOOGLE_CLIENT_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_PASSWORD=
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET=

▶️ Start the Server

npm run dev

✅ 4. Admin Dashboard Setup (/admin-dashboard)

The admin panel is built using Next.js, TailwindCSS, and ShadCN UI.

cd admin-dashboard
npm install

📄 Environment Variables

Create a .env file in the /admin-dashboard directory with the following variables:

NEXT_PUBLIC_BASE_URL=
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET=

▶️ Start the Server

npm run dev

👤 User Flow

alt text

🧑‍💼 Admin Dashboard

✅ Admin Login

JWT-based authentication has been implemented, allowing only users with the 'admin' role to log in. alt text

✅ Admin Dashboard

The admin dashboard provides a comprehensive summary including total revenue, total orders, total active users, and stock status. It also features visual representations such as sales overview charts, category-wise performance analytics, and recent activity insights. alt text alt text

✅ Products Management

The admin has the ability to manage products by viewing all available items. They can edit, add, and delete products, as well as filter by categories. Additionally, a real-time search functionality is provided for quick product lookup. Pagination is implemented to efficiently handle product listings when the total exceeds 10 items. alt text alt text alt text

✅ Users Management

The admin has the ability to manage users by viewing all available users. They can edit, add, and delete users, as well as filter by roles. Additionally, a real-time search functionality is provided for quick user lookup. Pagination is implemented to efficiently handle user listings when the total exceeds 10 items. alt text

✅ Categories Management

The admin has the ability to manage categories by viewing all available items. They can edit, add, and delete categories, as well as filter by categories. Additionally, a real-time search functionality is provided for quick category lookup. Pagination is implemented to efficiently handle category listings when the total exceeds 10 items. alt text

✅ Orders Management

The admin can view all orders and filter them based on their status. A real-time search feature is available to quickly locate orders by their order ID. The admin can also access detailed order information and mark orders as "Completed." Pagination is implemented to efficiently manage large order lists. alt text

🌐 Deployment Plan

  • Frontend: Vercel
  • Admin Dashboard: Vercel
  • Backend API: Vercel
  • Database: MongoDB Atlas

📖 Resources