A modern, elegant e-commerce web application for selling earrings, clips, and fashion accessories.
- Frontend: React + Vite
- Backend: Node.js + Express
- Database: MongoDB
- Authentication: Google OAuth 2.0
- 🛍️ Beautiful product browsing with filters & sorting
- 🛒 Shopping cart with persistent storage
- 👤 Google OAuth authentication
- 📦 Order management & tracking
- 👑 Admin dashboard for product & order management
elever/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── context/ # React Context providers
│ │ ├── pages/ # Page components
│ │ ├── services/ # API service layer
│ │ └── styles/ # Global CSS
│ └── package.json
│
├── server/ # Express backend
│ ├── config/ # Database & auth config
│ ├── controllers/ # Route handlers
│ ├── middleware/ # Auth middleware
│ ├── models/ # MongoDB models
│ ├── routes/ # API routes
│ ├── utils/ # Helper functions
│ └── package.json
│
└── README.md
- Node.js 18+
- MongoDB (local or Atlas)
- Google Developer Console project
# Install server dependencies
cd elever/server
npm install
# Install client dependencies
cd ../client
npm installCreate .env files from the examples:
Server (server/.env):
PORT=5000
MONGODB_URI=mongodb://localhost:27017/elever
JWT_SECRET=your-super-secret-jwt-key
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
CLIENT_URL=http://localhost:5173
SESSION_SECRET=your-session-secretClient (client/.env):
VITE_API_URL=http://localhost:5000- Go to Google Cloud Console
- Create a new project
- Navigate to APIs & Services > Credentials
- Create OAuth 2.0 Client ID
- Add authorized redirect URI:
http://localhost:5000/auth/google/callback - Copy Client ID and Secret to your
.env
cd server
node utils/seedData.js# Start backend (from server/)
npm run dev
# Start frontend (from client/)
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
GET /auth/google- Initiate Google OAuthGET /auth/me- Get current userPOST /auth/logout- Logout user
GET /api/products- List products (with filters)GET /api/products/:id- Get single productPOST /api/products- Create product (admin)PUT /api/products/:id- Update product (admin)DELETE /api/products/:id- Delete product (admin)
GET /api/orders/my- Get user's ordersPOST /api/orders- Create orderGET /api/orders- Get all orders (admin)PUT /api/orders/:id/status- Update order status (admin)
To access the admin dashboard at /admin:
- Sign in with Google
- Use the seed script which creates an admin user, OR
- Manually update a user's role to "admin" in MongoDB
- Color Palette: Soft neutrals with champagne gold (#D4AF37) accents
- Typography: Playfair Display (headings) + Inter (body)
- Style: Elegant, minimal, and modern
Built with ❤️ for Elever