Skip to content

Build shop from farm e-commerce app#1

Draft
rravindran wants to merge 1 commit intomasterfrom
cursor/build-shop-from-farm-e-commerce-app-848d
Draft

Build shop from farm e-commerce app#1
rravindran wants to merge 1 commit intomasterfrom
cursor/build-shop-from-farm-e-commerce-app-848d

Conversation

@rravindran
Copy link
Copy Markdown
Owner

Set up the monorepo structure and initial boilerplate for the Next.js frontend and Node.js/Express backend.

This PR establishes the foundational architecture and provides initial files, configurations, and placeholder UI/API endpoints as per the project requirements for the "Shop from Farm" e-commerce application.


Open in Cursor Open in Web

This commit sets up the basic project structure for the shop-from-farm e-commerce platform. It includes the initialization of the API (Node.js/Express/MongoDB) and the web frontend (Next.js). Key changes include:

- **README.md**: Updated with project overview and local setup instructions.
- **.gitignore**: Added to exclude common development and build artifacts.
- **apps/api**:
    - `package.json`: Added with core dependencies for the API.
    - `src/index.ts`: Basic Express server setup with middleware and routes.
    - `src/middleware/auth.ts`: Authentication middleware for user roles.
    - `src/models/`: Mongoose schemas for Product, User, and Order.
    - `src/routes/`: Express routers for products, users, orders, and cart.
    - `src/scripts/seed.ts`: Script to seed initial product data.
    - `tsconfig.json`: TypeScript configuration for the API.
- **apps/web**:
    - `README.md`: Basic instructions for the web frontend.
    - `app/`: Next.js App Router structure with pages for account, checkout, product, admin, cart, and home.
    - `components/shop/`: Reusable UI components for the shop (CategoriesBar, FeaturedGrid).
    - `lib/utils.ts`: Utility functions (e.g., for Tailwind CSS class merging).
    - `next.config.mjs`: Next.js configuration.
    - `package.json`: Added with core dependencies for the web frontend.
    - `postcss.config.js`: PostCSS configuration.
    - `tailwind.config.ts`: Tailwind CSS configuration.
    - `tsconfig.json`: TypeScript configuration for the web frontend.
- **Root `package.json`**:
    - Configured workspaces for managing both `apps/api` and `apps/web`.
    - Added scripts for `dev`, `build`, `seed`, and `postinstall` using `concurrently`.

This foundational commit enables the development of both the backend API and the frontend user interface.

Co-authored-by: krvravindran <[email protected]>
@cursor
Copy link
Copy Markdown

cursor Bot commented Oct 13, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants