A comprehensive e-commerce for pharmacy and management system built with Node.js, Express, MongoDB, and Socket.IO. This application provides both client-facing features and admin management capabilities.
For a comprehensive list of all features, see FEATURES.md
Client Features:
- User Authentication & Registration
- Product Browsing & Search
- Cart System
- Order Management
- Real-time Chat System
Admin Features:
- Dashboard & Analytics
- Product Management
- User Management
- System Settings
- Order Processing
- Backend: Node.js, Express.js
- Database: MongoDB with Mongoose ODM
- Template Engine: Pug
- Real-time Communication: Socket.IO
- File Upload: Multer, Cloudinary
- Email Service: Nodemailer
- Rich Text Editor: TinyMCE
- Styling: Bootstrap, CSS
- Deployment: Docker, Vercel
- Node.js (v14 or higher)
- MongoDB
- npm or yarn
-
Clone the repository
git clone <repository-url> cd ProductManagement
-
Install dependencies
npm install
-
Environment Setup Create a
.envfile in the root directory with the following variables:PORT=3000 MONGODB_URI=your_mongodb_connection_string CLOUDINARY_CLOUD_NAME=your_cloudinary_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret -
Start the application
npm start
-
Access the application
- Client:
http://localhost:3000 - Admin:
http://localhost:3000/admin
- Client:
For detailed database schema and relationships, see DATABASE_DESIGN.md
ProductManagement/
├── config/ # Configuration files
├── controllers/ # Business logic
├── helpers/ # Utility functions
├── middlewares/ # Express middlewares
├── models/ # Database models
├── public/ # Static assets
├── routes/ # Route definitions
│ ├── admin/ # Admin routes
│ └── client/ # Client routes
├── sockets/ # Socket.IO handlers
├── validates/ # Validation logic
├── views/ # Pug templates
├── index.js # Application entry point
└── package.json # Dependencies and scripts
npm start- Start the development server with nodemonnpm test- Run tests (currently not configured)
The application includes Docker support for containerized deployment:
# Build and run with Docker Compose
docker-compose up --buildThe application provides RESTful APIs for:
- Product management
- User authentication
- Order processing
- Real-time chat functionality
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the ISC License.
Huy Dang - Full Stack Developer