1.1.2 • Published 5 months ago

ecom-launcher v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

Powered By CodeEase šŸš€

NPM Version License Downloads


ā¬‡ļø 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!!

1.1.2

5 months ago

1.1.1

5 months ago

1.1.0

5 months ago