A modern, full-stack e-commerce management platform built with Vue.js, Node.js, Express, and MySQL. This application provides management tools for products, orders, users, categories, and analytics with role-based access control.
πΌοΈ Want a quick preview? Check out the Screenshots section below to see the application in action without needing to clone or install anything!
- Role-based Access Control: Admin, Manager, and User roles
- Authentication: JWT-based authentication system
- User Registration & Login: Secure user authentication
- Profile Management: Update user information and preferences
- Dark Mode: Toggle between light and dark themes
- Product CRUD Operations: Create, read, update, and delete products
- Category Management: Organize products into categories
- Inventory Tracking: Real-time stock management
- Product Status: Active, inactive, and out-of-stock states
- Order Processing: Complete order lifecycle management
- Order Status Tracking: Pending, processing, shipped, delivered, cancelled
- Order History: View all orders with detailed information
- Customer Orders: Customers can view their order history
- Revenue Analytics: Track sales performance over time
- Category Performance: Analyze product category sales
- Order Statistics: Monitor order trends and patterns
- Interactive Charts: Visual data representation using Chart.js
- Responsive Design: Mobile-first responsive interface
- Tailwind CSS: Modern and clean design system
- Sidebar Navigation: Intuitive navigation with role-based menu items
- Toast Notifications: User-friendly feedback system
- Form Validation: Client-side and server-side validation
- Vue.js 3: Modern JavaScript framework with Composition API
- TypeScript: Type-safe development
- Vite: Fast build tool and development server
- Vue Router: Client-side routing
- Pinia: State management
- Tailwind CSS: Utility-first CSS framework
- Headless UI: Unstyled, accessible UI components
- Chart.js: Data visualization library
- Axios: HTTP client for API requests
- Node.js: JavaScript runtime
- Express.js: Web application framework
- Prisma: Database ORM
- MySQL: Relational database
- JWT: JSON Web Tokens for authentication
- bcrypt.js: Password hashing
- Joi: Data validation
- Helmet: Security middleware
- CORS: Cross-origin resource sharing
- ESLint: Code linting
- Prettier: Code formatting
- Cypress: End-to-end testing
- Nodemon: Development server auto-restart
Before running this application, make sure you have the following installed:
- Node.js (version 18.0.0 or higher)
- npm (version 9.0.0 or higher)
- MySQL (version 5.7 or higher)
- Git
git clone https://github.com/FilipWjk/fullstack-vue-app.git
cd fullstack-vue-app# Install all dependencies (client + server)
npm run install:all
# Or install separately
npm run install:client
npm run install:serverCreate a .env file in the server directory:
# Database
DATABASE_URL="mysql://username:password@localhost:3306/ecommerce_db"
# JWT
JWT_SECRET="your-super-secret-jwt-key"
JWT_EXPIRE="7d"
# Server
PORT=3001
NODE_ENV="development"
Create a .env file in the client directory:
VITE_API_URL="http://localhost:3001/api"# Generate Prisma client
npm run db:setup
# Or run commands separately
cd server
npx prisma generate
npx prisma migrate dev
npx prisma db seed# Start both client and server
npm run dev
# Or start separately
npm run dev:client # Frontend (http://localhost:5173)
npm run dev:server # Backend (http://localhost:3001)After seeding the database, you can use these credentials:
- Email:
admin@example.com - Password:
admin123
- Email:
manager@example.com - Password:
manager123
- Email:
user@example.com - Password:
user123
npm run install:all # Install all dependencies
npm run dev # Start both client and server in development
npm run build # Build both client and server
npm run start # Start both client and server in production
npm run test # Run Cypress e2e tests
npm run lint # Lint both client and server
npm run format # Format both client and server
npm run db:setup # Setup database with migrations and seed data
npm run clean # Clean all node_modules and build filesnpm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run test:e2e # Run Cypress e2e tests
npm run test:e2e:dev # Open Cypress in development mode
npm run lint # Run ESLint
npm run format # Format with Prettiernpm run dev # Start development server with nodemon
npm start # Start production server
npm run db:migrate # Run database migrations
npm run db:seed # Seed database with sample data
npm run db:studio # Open Prisma Studio
npm run lint # Run ESLint
npm run format # Format with Prettierfullstack-vue-app/
βββ client/ # Vue.js frontend application
β βββ src/
β β βββ components/ # Reusable Vue components
β β βββ views/ # Page components
β β βββ stores/ # Pinia stores for state management
β β βββ composables/ # Vue composables
β β βββ utils/ # Utility functions
β β βββ types/ # TypeScript type definitions
β β βββ router/ # Vue Router configuration
β βββ cypress/ # E2E tests
β βββ public/ # Static assets
βββ server/ # Node.js backend application
β βββ src/
β β βββ controllers/ # Route controllers
β β βββ routes/ # API routes
β β βββ services/ # Business logic
β β βββ middleware/ # Express middleware
β β βββ utils/ # Utility functions
β β βββ constants/ # Application constants
β βββ prisma/ # Database schema and migrations
βββ screenshots/ # Application screenshots
π Analytics Dashboard
Main analytics overview with revenue charts
Analytics view with additional metrics
π¦ Products Management
Main products listing page with search and filters
Second view of products listing with different sorting/filtering
π Orders Management
Main orders listing page with all customer orders and status filters
Detailed view of a specific order with items, customer info, and status
π₯ Users Management
Main users listing page with all registered users and their roles
User editing modal for updating user information and permissions
π€ Profile Management
Main profile page with user information and settings
π Customer Orders
Customer orders listing page showing personal order history
This application uses Cypress for end-to-end testing to ensure all features work correctly across different user scenarios.
# Run tests in headless mode
npm run test:e2e
# Open Cypress Test Runner for development
npm run test:e2e:dev- User authentication (login, logout, registration)
- Product management (CRUD operations)
- Order processing and management
- User management and role-based access
- Analytics dashboard functionality
- UI component responsiveness
- JWT Authentication: Secure token-based authentication
- Password Hashing: bcrypt.js for secure password storage
- Rate Limiting: Prevent API abuse
- CORS Configuration: Cross-origin request management
- Input Validation: Server-side validation with Joi
- SQL Injection Prevention: Prisma ORM protection
- Security Headers: Helmet.js middleware
POST /api/auth/login- User loginPOST /api/auth/register- User registrationPOST /api/auth/logout- User logout
GET /api/products- Get all productsPOST /api/products- Create new productPUT /api/products/:id- Update productDELETE /api/products/:id- Delete product
GET /api/orders- Get all ordersPOST /api/orders- Create new orderPUT /api/orders/:id- Update order statusGET /api/orders/user/:userId- Get user orders
GET /api/users- Get all users (Admin only)POST /api/users- Create new userPUT /api/users/:id- Update userDELETE /api/users/:id- Delete user
GET /api/analytics/revenue- Revenue analyticsGET /api/analytics/categories- Category performanceGET /api/analytics/orders- Order statistics
Thank you for reading this far!
















