https://github.com/misbahul-alam/shopping-bag
A scalable full-stack eCommerce app using NestJS, TypeORM, PostgreSQL, and Next.js with authentication, product catalog, cart, orders, and address management.
https://github.com/misbahul-alam/shopping-bag
nestjs nextjs postgresql typeorm typescript
Last synced: 2 months ago
JSON representation
A scalable full-stack eCommerce app using NestJS, TypeORM, PostgreSQL, and Next.js with authentication, product catalog, cart, orders, and address management.
- Host: GitHub
- URL: https://github.com/misbahul-alam/shopping-bag
- Owner: misbahul-alam
- Created: 2025-04-25T11:34:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-02T14:35:22.000Z (about 1 year ago)
- Last Synced: 2025-05-02T15:43:16.613Z (about 1 year ago)
- Topics: nestjs, nextjs, postgresql, typeorm, typescript
- Language: TypeScript
- Homepage:
- Size: 245 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shopping-Bag ๐๏ธ
A modern full-stack e-commerce application built with Next.js and NestJS, offering a seamless shopping experience with a clean, minimalist design philosophy.
## ๐ Overview
Shopping-Bag is an e-commerce platform that focuses on delivering carefully curated products with an emphasis on quality essentials and thoughtful design. The application features a responsive frontend built with Next.js and React, backed by a robust NestJS API.
## โจ Features
- ๐จ Modern, responsive UI with Tailwind CSS and DaisyUI
- ๐ Product browsing with category carousels
- ๐ฑ Mobile-first responsive design
- ๐ User authentication (Login/Register)
- ๐ช Shop and product detail pages
- ๐ฏ Featured products, new arrivals, and best sellers sections
- ๐ฆ Shopping cart functionality
- ๐ญ Clean and intuitive user interface
## ๐ ๏ธ Tech Stack
### Frontend
- **Framework:** Next.js 16 (React 19)
- **Language:** TypeScript
- **Styling:** Tailwind CSS, DaisyUI
- **State Management:** Zustand
- **UI Components:** Custom components with react-icons
- **Carousel:** Embla Carousel React
- **Package Manager:** pnpm
### Backend
- **Framework:** NestJS 11
- **Language:** TypeScript
- **Runtime:** Node.js
- **Package Manager:** pnpm
## ๐ Project Structure
```
shopping-bag/
โโโ frontend/ # Next.js frontend application
โ โโโ src/
โ โ โโโ app/ # Next.js app directory (pages & routes)
โ โ โโโ components/ # Reusable React components
โ โ โโโ store/ # Zustand state management
โ โ โโโ images/ # Static image assets
โ โโโ public/ # Public static files
โโโ backend/ # NestJS backend API
โ โโโ src/
โ โ โโโ app.module.ts
โ โ โโโ app.controller.ts
โ โ โโโ app.service.ts
โ โ โโโ main.ts
โ โโโ test/ # E2E tests
โโโ old-backend/ # Legacy backend (deprecated)
```
## ๐ Getting Started
### Prerequisites
- Node.js (v18 or higher)
- pnpm (recommended) or npm
- Git
### Installation
1. **Clone the repository**
```bash
git clone https://github.com/misbahul-alam/Shopping-Bag.git
cd Shopping-Bag
```
2. **Install frontend dependencies**
```bash
cd frontend
pnpm install
```
3. **Install backend dependencies**
```bash
cd backend
pnpm install
```
### Running the Application
#### Development Mode
1. **Start the backend server**
```bash
cd backend
pnpm run start:dev
```
The backend will run on `http://localhost:3000`
2. **Start the frontend development server**
```bash
cd frontend
pnpm run dev
```
The frontend will run on `http://localhost:3000` (or next available port)
#### Production Mode
1. **Build and start the backend**
```bash
cd backend
pnpm run build
pnpm run start:prod
```
2. **Build and start the frontend**
```bash
cd frontend
pnpm run build
pnpm run start
```
## ๐ Available Scripts
### Frontend Scripts
- `pnpm dev` - Start development server
- `pnpm build` - Build for production
- `pnpm start` - Start production server
- `pnpm lint` - Run ESLint
### Backend Scripts
- `pnpm run start` - Start the application
- `pnpm run start:dev` - Start in watch mode
- `pnpm run start:debug` - Start in debug mode
- `pnpm run start:prod` - Start production build
- `pnpm run build` - Build the application
- `pnpm run test` - Run unit tests
- `pnpm run test:e2e` - Run end-to-end tests
- `pnpm run test:cov` - Run tests with coverage
- `pnpm run lint` - Run ESLint and fix issues
- `pnpm run format` - Format code with Prettier
## ๐จ Key Features in Detail
### Frontend Pages
- **Home Page** - Hero section with featured products, new arrivals, and best sellers
- **Shop Page** - Browse all products with filtering options
- **Product Detail** - Detailed product information and purchase options
- **Login/Register** - User authentication pages
- **Cart** - Shopping cart management
### Component Architecture
- **Layout Components** - Header, Footer, Drawer, MainLayout
- **UI Components** - Button, InputField, SelectField, TextArea
- **Feature Components** - ProductCard, CategoryCarousel
## ๐ง Configuration
### Environment Variables
Create `.env` files in both frontend and backend directories:
**Backend `.env`:**
```env
PORT=3000
# Add your environment variables here
```
**Frontend `.env.local`:**
```env
NEXT_PUBLIC_API_URL=http://localhost:3000
# Add your environment variables here
```
## ๐งช Testing
Run tests in the backend:
```bash
cd backend
pnpm run test # Unit tests
pnpm run test:e2e # E2E tests
pnpm run test:cov # Coverage report
```
## ๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## ๐ License
This project is licensed under the UNLICENSED license.
## ๐ค Author
**Misbahul Alam**
- GitHub: [@misbahul-alam](https://github.com/misbahul-alam)
## ๐ Acknowledgments
- Next.js team for the amazing framework
- NestJS team for the robust backend framework
- The open-source community for the excellent tools and libraries
---
**Note:** This project is currently in active development. Some features may be incomplete or subject to change.