MESSIA is a full-stack e-commerce platform designed for gifting premium products. It features a modern, responsive frontend built with Next.js and a robust backend powered by Node.js, Express, and PostgreSQL.
- Framework: Next.js 16 (App Router)
- Library: React 19
- Styling: Tailwind CSS 4
- Icons: Lucide React
- State Management: Context API (Auth, Cart)
- Notifications: React Hot Toast
- Runtime: Node.js
- Framework: Express.js
- Database: PostgreSQL
- ORM: Prisma
- Authentication: JWT (JSON Web Tokens) & Bcrypt
.
├── README.md
├── apps
│ ├── backend # Express.js Backend
│ │ ├── config # Database & CORS config
│ │ ├── controllers # Route controllers (Auth, Product, Cart, etc.)
│ │ ├── middlewares # Auth & Admin middlewares
│ │ ├── models # Prisma models
│ │ ├── prisma # Prisma schema & migrations
│ │ ├── routes # API routes
│ │ └── utils # Helper functions
│ └── frontend # Next.js Frontend
│ ├── app # App Router
│ │ ├── (pages) # Application pages
│ │ ├── components # Reusable UI components
│ │ ├── context # React Context (Auth, Cart)
│ │ ├── globals.css # Global styles & Tailwind
│ │ └── layout.js # Root layout
│ └── public # Static assets
└── package.json
- Node.js (v18 or higher)
- npm or yarn
- PostgreSQL database
git clone https://github.com/MAYANKSHARMA01010/MESSIA.git
cd messiaNavigate to the backend directory and install dependencies:
cd apps/backend
npm installCreate a .env file in apps/backend with the following variables:
PORT=5001
DATABASE_URL="postgresql://user:password@localhost:5432/messia_db?schema=public"
JWT_SECRET="your_super_secret_key"Run database migrations:
npx prisma migrate dev --name initStart the backend server:
npm run devThe backend will run on http://localhost:5001.
Navigate to the frontend directory and install dependencies:
cd ..apps/frontend
npm installCreate a .env file in apps/frontend (optional, if needed for API URL):
NEXT_PUBLIC_API_URL="http://localhost:5001/api"Start the frontend development server:
npm run devThe frontend will run on http://localhost:3000.
- User Authentication: Sign up, Login, and Profile management.
- Product Management: Admin dashboard to add, edit, and delete products.
- Shopping Cart: Add items, adjust quantities, and view cart summary.
- Address Book: Manage shipping addresses with a premium UI.
- Responsive Design: Fully optimized for mobile and desktop devices.
- Dark Mode: Built-in dark mode support.
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userGET /api/auth/profile- Get user profile
GET /api/products- List all productsGET /api/products/:id- Get single productPOST /api/products- Create product (Admin only)PUT /api/products/:id- Update product (Admin only)DELETE /api/products/:id- Delete product (Admin only)
GET /api/cart- Get user cartPOST /api/cart/add- Add item to cartPUT /api/cart/update- Update item quantityDELETE /api/cart/remove/:productId- Remove item from cart
GET /api/address- List addressesPOST /api/address- Add new addressPUT /api/address/:id- Update addressDELETE /api/address/:id- Delete address