Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
40c44d1
clean up code,add category chips, fix header UI
Mishra-coder Apr 3, 2026
87a2696
restore web UI with sidebar
Mishra-coder Apr 3, 2026
35e7842
scroll to top on product click
Mishra-coder Apr 3, 2026
f9dbb5f
fix:add mobile UI overlay to Preview
Mishra-coder Apr 3, 2026
a2c290f
feat: Add premium splash screens, fix expo development build, and cle…
Mishra-coder Apr 4, 2026
787e3e6
feat: Add PWA support, QR sharing, and brand splash fixes
Mishra-coder Apr 4, 2026
c5bb9e5
chore: Remove QR sharing section from preview
Mishra-coder Apr 4, 2026
3abf344
Final project-wide cleanup: removed comments, decommissioned /preview…
Mishra-coder Apr 4, 2026
9b0456a
Final cleanup: de-commissioned /preview, restored original UI, and fi…
Mishra-coder Apr 4, 2026
39ac8d6
refactor: Restore Nike data and clean up unused assets
Mishra-coder Apr 5, 2026
7a08c0e
feat: category filters,
Mishra-coder Apr 5, 2026
822083d
fix:splash screen,login UI update
Mishra-coder Apr 5, 2026
2ca4d84
fix: convert assets from JPEG to proper PNG format for Android build
Mishra-coder Apr 5, 2026
dff7301
fix: navigate to Home after login instead of goBack
Mishra-coder Apr 5, 2026
7117916
fix: auto navigate to Home
Mishra-coder Apr 5, 2026
4a56f84
fix: add placeholderTextColor to checkout address inputs
Mishra-coder Apr 5, 2026
85962a9
feat: enable OTA updates via expo-updates
Mishra-coder Apr 5, 2026
83a7ec5
fix: remove unused logo1.png, fix category string check
Mishra-coder Apr 5, 2026
3d42f59
feat: integrate Razorpay payment gateway for web and mobile
Mishra-coder Apr 5, 2026
e9ca0b4
fix: remove dotenv in production, update mobile API URL
Mishra-coder Apr 6, 2026
46df30e
docs: update README with Razorpay integration, payment testing, env vars
Mishra-coder Apr 6, 2026
8237d8a
Update README.md
Mishra-coder Apr 6, 2026
2ed85d0
feat: add unit tests, integration tests, ESLint, Dependabot config, i…
Mishra-coder Apr 6, 2026
9eb5c95
fix: load dotenv before all requires
Mishra-coder Apr 6, 2026
e6d398e
feat: add Cypress E2E tests for shop flow
Mishra-coder Apr 6, 2026
fbc9353
Bump eslint from 9.39.4 to 10.2.0 in /frontend
dependabot[bot] Apr 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: npm
directory: /backend
schedule:
interval: weekly

- package-ecosystem: npm
directory: /frontend
schedule:
interval: weekly

- package-ecosystem: npm
directory: /mobile
schedule:
interval: weekly

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
41 changes: 31 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,50 @@ on:
branches: [main]

jobs:
build:
backend:
runs-on: ubuntu-latest

defaults:
run:
working-directory: backend

steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache: npm
cache-dependency-path: backend/package-lock.json

- name: Install dependencies
run: npm ci

- name: Syntax Check
run: node --check server.js
- name: Lint
run: npm run lint

- name: Run tests
run: npm test

- name: Build Docker image
run: docker build -t zappify-backend .
run: docker build -t zappify-backend .

frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
48 changes: 37 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Built with a modern MERN stack on the backend and React + React Native on the fr
## Live Demo

- **Website:** [zappify-sepia.vercel.app](https://zappify-sepia.vercel.app)
- **Phone Preview:** [zappify-sepia.vercel.app/preview](https://zappify-sepia.vercel.app/preview)
- **Download APK:** https://expo.dev/accounts/devendra.mi/projects/zappify/builds/24237286-1ff7-4219-ac7a-6c103ff28d00

---

Expand Down Expand Up @@ -37,6 +37,7 @@ Built with a modern MERN stack on the backend and React + React Native on the fr
![Bcrypt](https://img.shields.io/badge/Bcrypt.js-003A70?style=for-the-badge&logo=letsencrypt&logoColor=white)
![Helmet](https://img.shields.io/badge/Helmet-FF6B35?style=for-the-badge&logo=helmet&logoColor=white)
![Morgan](https://img.shields.io/badge/Morgan-000000?style=for-the-badge&logo=npm&logoColor=white)
![Razorpay](https://img.shields.io/badge/Razorpay-02042B?style=for-the-badge&logo=razorpay&logoColor=3395FF)

### Infrastructure
![Vercel](https://img.shields.io/badge/Vercel-000000?style=for-the-badge&logo=vercel&logoColor=white)
Expand All @@ -50,12 +51,12 @@ Built with a modern MERN stack on the backend and React + React Native on the fr
```
+-------------------------------------------------------------------+
| |
| +-------------+ +-------------+ +-------------+ |
| | Front-end | | Back-end | | Database | |
| | ReactJS |<---->| NodeJS |<---->| MongoDB | |
| |UI Components| | ExpressJS | | Collections | |
| | API calls | |API endpoints| | Documents | |
| +-------------+ +-------------+ +-------------+ |
| +-------------+ +-------------+ +-------------+ |
| | Front-end | | Back-end | | Database | |
| | ReactJS |<---->| NodeJS |<---->| MongoDB | |
| |UI Components| | ExpressJS | | Collections | |
| | API calls | |API endpoints| | Documents | |
| +-------------+ +-------------+ +-------------+ |
| |
+-------------------------------------------------------------------+
```
Expand Down Expand Up @@ -101,6 +102,17 @@ Orders {

---

## Payment Testing

Razorpay is integrated in test mode. Use these credentials to test payments:

| Method | Details |
|---|---|
| Card | 5267 3181 8797 5449 / Expiry: 08/26 / CVV: 123 / OTP: 1234 |
| UPI | success@razorpay |

---

## What This Project Does

Zappify is built as a real-world e-commerce application that covers the complete shopping journey:
Expand All @@ -112,7 +124,6 @@ Zappify is built as a real-world e-commerce application that covers the complete
- Goes through a 3-step checkout (Bag → Address → Payment)
- Tracks their order with a live timeline
- Can cancel an order with a reason
- All of this works on both web and Android mobile app

---

Expand All @@ -127,13 +138,15 @@ Zappify is built as a real-world e-commerce application that covers the complete
- Add to cart with size validation
- Wishlist toggle on product cards and detail page
- 3-step checkout - Bag to Address to Payment (COD / UPI / Card)
- Razorpay payment gateway integration (UPI, Card, Netbanking, Wallet)
- Payment signature verification on backend
- Order history with tracking timeline
- Order cancellation with reason selection form
- Google OAuth 2.0 login
- Normal email/password sign up and sign in
- User-specific order history per account
- Persistent login via localStorage / AsyncStorage
- Full Android mobile app via Expo + EAS Build
- Persistent login via localStorage
- Progressive Web App (PWA) ready

### For Admins
- Secure JWT-protected API routes
Expand Down Expand Up @@ -168,6 +181,8 @@ PORT=5001
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_secret_key
NODE_ENV=development
RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_key_secret
```

```bash
Expand Down Expand Up @@ -203,7 +218,6 @@ Zappify/
│ ├── components/
│ ├── data/products.js
│ ├── App.jsx
│ ├── Preview.jsx
│ ├── main.jsx
│ └── index.css
├── mobile/
Expand Down Expand Up @@ -234,6 +248,18 @@ Zappify/
| GET | /api/products | Get all products | No |
| GET | /api/products/:id | Get product by ID | No |
| POST | /api/products | Create product | Admin |
| POST | /api/payment/create-order | Create Razorpay order | No |
| POST | /api/payment/verify | Verify payment signature | No |

---

## Frontend Environment Variables

Create `frontend/.env`:
```env
VITE_API_URL=http://localhost:5001
VITE_RAZORPAY_KEY_ID=your_razorpay_key_id
```

---

Expand Down
2 changes: 2 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ PORT=5001
MONGO_URI=your_mongodb_atlas_uri_here
JWT_SECRET=your_super_secret_key_here
NODE_ENV=development
RAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxxxxx
RAZORPAY_KEY_SECRET=your_key_secret_here
7 changes: 2 additions & 5 deletions backend/config/db.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
const mongoose = require('mongoose');
const dotenv = require('dotenv');

dotenv.config();

const connectDB = async () => {
try {
const conn = await mongoose.connect(process.env.MONGO_URI);
console.log(`Connection established with MongoDB: ${conn.connection.host}`);
console.log(`Connected to MongoDB: ${conn.connection.host}`);
} catch (error) {
console.error(`Something went wrong: ${error.message}`);
console.error(`DB Error: ${error.message}`);
process.exit(1);
}
};
Expand Down
3 changes: 2 additions & 1 deletion backend/controllers/userController.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const jwt = require('jsonwebtoken');
const User = require('../models/User');
const { validateEmail } = require('../utils/validate');

const generateToken = (id) => {
return jwt.sign({ id }, process.env.JWT_SECRET, {
Expand Down Expand Up @@ -28,7 +29,7 @@ const authUser = async (req, res) => {
const registerUser = async (req, res) => {
const { name, email, password } = req.body;

if (!email.includes('@') || !email.includes('.')) {
if (!validateEmail(email)) {
return res.status(400).json({ message: 'Please enter a valid email' });
}

Expand Down
11 changes: 11 additions & 0 deletions backend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const js = require('@eslint/js');

module.exports = [
js.configs.recommended,
{
rules: {
'no-unused-vars': 'warn',
'no-console': 'off',
},
},
];
1 change: 0 additions & 1 deletion backend/middlewares/authMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const protect = async (req, res, next) => {
req.user = await User.findById(decoded.id).select('-password');
next();
} catch (error) {
console.error(error);
res.status(401).json({ message: 'Token failed, not authorized' });
}
}
Expand Down
Loading
Loading