Skip to content

Repository files navigation

Emporio

Emporio is a full-stack digital marketplace for discovering and managing digital products such as e-books, cheatsheets, icons, photos, templates, and code snippets. It combines a customer-facing storefront with community features and an admin dashboard for product, user, announcement, wishlist, and analytics management.

Live Demo Demo Video

Emporio homepage

Features

  • Browse digital products by category
  • Search by product name, description, or category
  • View product details, ratings, and customer reviews
  • Add products to a persistent shopping cart
  • Create and manage a user profile
  • Publish community posts with images, comments, and upvotes
  • Vote for requested products through the community wishlist
  • Authenticate securely with JWT-based HTTP-only cookies
  • Manage products, featured items, users, roles, and announcements as an admin
  • Review product, user, post, announcement, and category analytics

Tech Stack

Layer Technologies
Frontend React 19, Vite, Tailwind CSS 4, Zustand, React Router, Axios
Backend Node.js 20+, Express 5, JWT, bcrypt, cookie-parser
Database MongoDB, Mongoose
Media Cloudinary
UI Framer Motion, Lucide React, React Hot Toast
Deployment Vercel and Render configuration included

Project Structure

Emporio/
|-- backend/
|   |-- controllers/       # API business logic
|   |-- lib/               # MongoDB and Cloudinary configuration
|   |-- middleware/        # Authentication and authorization
|   |-- models/            # Mongoose schemas
|   |-- routes/            # Express API routes
|   `-- server.js          # Express application entry point
|-- frontend/
|   |-- public/            # Images, icons, and animation frames
|   `-- src/
|       |-- components/    # Reusable UI and admin components
|       |-- lib/           # Axios configuration
|       |-- pages/         # Application pages
|       `-- stores/        # Zustand state stores
|-- Emporio Class Diagram.png
|-- SRS document.pdf
|-- package.json
`-- render.yaml

Getting Started

Prerequisites

  • Node.js 20 or newer
  • npm
  • A MongoDB database
  • A Cloudinary account for image uploads

1. Clone the repository

git clone https://github.com/MIhirDas10/Emporio.git
cd Emporio

2. Install dependencies

npm install
npm install --prefix frontend

3. Configure the backend

Create a .env file in the project root:

PORT=5000
NODE_ENV=development
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_long_random_secret
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
CLIENT_URL=http://localhost:5173

4. Configure the frontend

The Vite development server proxies /api requests to http://localhost:5000. No frontend environment file is required for local development.

For a separately deployed API, create frontend/.env:

VITE_API_URL=https://your-api-domain.example/api

5. Run the application

Start the backend from the project root:

npm run dev

In a second terminal, start the frontend:

cd frontend
npm run dev

Open http://localhost:5173.

Available Scripts

From the project root:

Command Description
npm run dev Start the Express API with Nodemon
npm start Start the Express API with Node.js
npm run build Install frontend dependencies and create a production build

From frontend/:

Command Description
npm run dev Start the Vite development server
npm run build Build the frontend for production
npm run lint Run ESLint
npm run preview Preview the production build locally

API Overview

The backend exposes REST endpoints under /api:

Route Purpose
/api/auth Sign up, log in, log out, and session profile
/api/products Products, categories, recommendations, and reviews
/api/cart Authenticated cart operations
/api/search Product search
/api/posts Community feed and posts
/api/user Profiles and admin user management
/api/announcements Public announcements and admin management
/api/votes Wishlist voting and leaderboard
/api/analytics Admin analytics

Health checks are available at /health.

Documentation

License

This project is licensed under the MIT License.

About

Full-stack digital marketplace for creators. MERN stack, admin dashboard, analytics, cart & reviews. Live on Vercel.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

Contributors

Languages