1.1.2 ⢠Published 5 months ago
ecom-launcher v1.1.2
Powered By CodeEase š
ā¬ļø Installation
npx ecom-launcher@1.1.2
š Introduction
ecom-launcher automates setting up frontend and backend folders, installing dependencies, and initializing servers, making development faster and hassle-free.
š Features
- ā Automatic Folder Setup.
- ā Installs Dependencies Automatically.
- ā Fast and Efficient Setup.
- ā Built-in Routing System.
- ā Built-in Tailwind CSS Configuration.
- ā Built-in Redux Toolkit with Store and Slices.
- ā Supports React.js, Node.js, Express.js, Tailwind CSS, MongoDB.
š License: MIT License
This project is licensed under the MIT License.
šÆ Usage
To create a new project, run:
npx ecom-launcher@1.1.2
You will be prompted with:
- You can enter '.' for current dir, '..' to go back one level, or a full path for a custom location
- Enter the directory: ..
- Enter project name: Demo
This will generate:
Demo/
āāā frontend/ (React.js setup)
āāā backend/ (Express/Node.js setup)
š¦ Module Type Selection
Which module type do you prefer? (Enter 'cjs' for CommonJS or 'esm' for ES Module):
esm
šØ Select a Framework
React
š Select a Variant
JavaScript
š Project Structure
Frontend Folder Structure
frontend/
āāā public/ # Static assets (favicon, manifest, images)
āāā src/
ā āāā assets/ # Images, fonts, etc.
ā āāā components/ # Reusable components
ā ā āāā common/ # UI components (Button, Input, Loader)
ā ā āāā layout/ # Layout components (Navbar, Sidebar)
ā ā āāā home/ # Home-related components (ProductCard)
ā āāā features/ # Redux slices (Redux Toolkit)
ā ā āāā authSlice.jsx # Authentication slice
ā āāā hooks/ # Custom hooks
ā āāā pages/ # Page components
ā ā āāā Home.jsx # Home page
ā āāā routes/ # Routing files
ā ā āāā PrivateRoute.jsx
ā ā āāā AppRoute.jsx
ā ā āāā AdminRoute.jsx
ā ā āāā index.jsx
ā āāā store/ # Redux store configuration
ā āāā utils/ # Helper functions
ā āāā App.jsx # Main app component
ā āāā main.jsx # Entry point
ā āāā App.css # Stylesheet
ā āāā index.css # Stylesheet
āāā .env # Environment variables
āāā package.json # Dependencies
āāā README.md # Project info
Backend Folder Structure
backend/
āāā src/
ā āāā config/ # Configuration files (DB, secrets, etc.)
ā ā āāā db.js # MongoDB connection
ā ā āāā config.env # Secret keys
ā āāā controllers/ # Route handlers
ā ā āāā authController.js
ā āāā middlewares/ # Custom middlewares
ā ā āāā authMiddleware.js
ā ā āāā errorHandler.js
ā āāā models/ # Mongoose models
ā ā āāā User.js
ā āāā routes/ # API routes
ā ā āāā authRoutes.js
ā āāā utils/ # Utility functions
ā ā āāā generateToken.js
ā ā āāā catchAsync.js
ā āāā index.js # Server entry point
āāā .env # Environment variables
āāā package.json # Dependencies
āāā README.md # Project info
š Start the Servers
- Before starting the server, configure the
.env
file.
Start the Frontend:
cd Demo/frontend
npm run dev
Start the Backend:
cd Demo/backend
npm run dev
ā MERN eCommerce platform setup completed successfully!!