A full-stack mobile e-commerce app built with React Native (Expo) and Node.js/Express.
- Sign up / Sign in with Clerk
- Browse products with filters & search
- Add to cart & wishlist
- Checkout with Cash or Stripe
- Track orders
- Manage addresses & profile
- Dashboard with stats
- Manage products (add/edit/delete)
- Manage orders (update status)
| Client | Server |
|---|---|
| React Native 0.81 | Node.js + Express 5 |
| Expo SDK 54 | TypeScript |
| Expo Router 6 | MongoDB + Mongoose |
| NativeWind (Tailwind) | Clerk Auth |
| Clerk | Cloudinary |
- Node.js v18+
- Expo Go app (for mobile testing)
- MongoDB Atlas account
- Clerk account
- Cloudinary account
# Clone
git clone https://github.com/mufeed-dev/ExpoMart.git
cd ExpoMart
# Install server
cd server && npm install
# Install client
cd ../client && npm install
### Environment Variables
**Server (`server/.env`)**
```env
MONGODB_URI=your_mongodb_url
CLERK_SECRET_KEY=sk_test_...
ADMIN_EMAIL=your-admin@email.com
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
```
**Client (`client/.env`)**
```env
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
EXPO_PUBLIC_API_URL=http://localhost:3000/api
```
### Run Locally
```bash
# Terminal 1 - Server
cd server
npm run server
# Terminal 2 - Client
cd client
npm run start
```
---
## API Endpoints
### Public
- `GET /api/products` - Get all products
- `GET /api/products/:id` - Get single product
### Protected (requires login)
- `GET /api/cart` - Get cart
- `POST /api/cart/add` - Add to cart
- `GET /api/orders` - Get orders
- `POST /api/orders` - Create order
- `GET /api/address` - Get addresses
- `POST /api/address` - Add address
- `GET /api/wishlist` - Get wishlist
- `POST /api/wishlist` - Toggle wishlist
### Admin only
- `GET /api/admin/stats` - Dashboard stats
- `POST /api/products` - Create product
- `PUT /api/products/:id` - Update product
- `DELETE /api/products/:id` - Delete product
- `GET /api/orders/admin/all` - All orders
- `PUT /api/orders/:id/status` - Update order status
---
## Project Structure
```
ExpoMart/
βββ client/ # React Native app
β βββ app/ # Screens (auth, tabs, admin)
β βββ components/ # Reusable UI
β βββ context/ # Cart & Wishlist contexts
β βββ constants/ # Types & config
β
βββ server/ # Express API
βββ controllers/ # Route handlers
βββ models/ # Database schemas
βββ routes/ # API routes
βββ middleware/ # Auth & upload
βββ config/ # DB & Cloudinary setup
```