Draft
Conversation
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 Agent can help with this pull request. Just |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.