0.0.3 β€’ Published 7 months ago

robo-store v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

!NOTE

Welcome to robo-store, a minimalist yet powerful eCommerce plugin for Robo.js! This plugin integrates a dynamic storefront, Discord slash commands, and an API-powered backend to provide a comprehensive shopping experience. Perfect for exclusive communities, robo-store lets you create a member-only shopping platform with seamless Discord integration, beautiful Astro-powered storefronts, and easy management through customizable options.

🌟 Features

robo-store brings a minimal eCommerce solution right into your Discord server and online presence:

  • Discord Slash Commands – Manage your store directly from Discord with commands for adding products, listing items, placing orders, and more.
  • Backend Server API – A fully functional API for handling store data, from product information to customer orders.
  • Agnostic Storefront Support – A fast, customizable, and responsive web interface that can be integrated with any frontend framework or technology, making it perfect for showcasing products flexibly.
  • Customizable Options – Set your store name, branding, introduction, and more with a flexible configuration system.
  • Seamless Discord Integration – Supports Discord login for easy customer access, with seamless order management.

πŸ›  Installation

You can add robo-store with one command via Robo CLI:

terminal
# Using Robo CLI
npx robo add robo-store
# Or if using pnpm, yarn, or bun:
pnpm robo add robo-store
yarn robo add robo-store
bun robo add robo-store

πŸ“‚ Configuration

To configure your robo-store plugin, configure your plugin config with the following options:

/config/plugins/robo-store.ts
export default {
	mongo_uri: 'your-mongodb-uri',
	owner_id: 'discord-user-id',
	store_name: 'Your Store Name',
	domain: 'https://yourstore.com',
	slogan: 'Your Store Slogan',
	hero_image: 'link-to-hero-image',
	about_us: 'Description of your store',
	invite: 'Discord invite link',
	introduction: 'Brief intro for new customers',
	client_secret: 'discord-client-secret',
	client_id: 'discord-client-id',
	currency_symbol: '$',
	imgbb_api_key: 'optional-imgbb-api-key-for-image-hosting',
	port: 6969
};

!TIP Most fields have default values if not provided, to streamline your setup!

πŸ“ Plugin Options Reference

OptionTypeDescriptionDefault ValueRequired?
mongo_uristringMongoDB URI for storing user, product, and order data.process.env.MONGO_URIYes
owner_idstringYour Discord user ID to link to the bot and manage store invites.NoneYes
store_namestringDisplay name of your store."Store"Yes
domainstringDomain of your storefront. Used for product links and site navigation.NoneYes
sloganstringA catchy slogan for your store to attract customers."Grab The Products Now..."No
portnumberDeploy storefront and API to the host with port configuration.3000No
hero_imagestringLink to a hero image displayed prominently on your store’s landing page.NoneNo
about_usstringA paragraph describing your store and its community-driven value."Welcome to our exclusive store, where premium products meet a close-knit community..."No
invitestringDiscord invite link for users to join your community.https://discord.com/users/${pluginOptions.owner_id}No
introductionstringIntro message displayed to new customers in the store."Exclusive products available only for our private community! Join our Discord to access special..."No
client_secretstringDiscord bot client secret for authentication.NoneYes
client_idstringDiscord bot client ID.process.env.DISCORD_CLIENT_IDNo
currency_symbolstringCurrency symbol for prices."$"No
imgbb_api_keystringAPI key for ImgBB if you want to host images externally.NoneNo

Check out the example configuration file for more details.

πŸš€ Quick Start

  1. Install the Plugin: Quickly set up the plugin with just a few commands.
  2. Customize Your Store: Use provided options like store_name, slogan, and about_us to make it yours.
  3. Run Your Bot: Start the Discord bot, and let your customers explore your store through slash commands!
  4. Manage Products & Orders: Use the backend API to add, update, and track products and orders.

🧩 Slash Commands

CommandDescription
/store my-order-infoDisplay a list of all your orders.
/store product-infoRetrieve detailed information about a specific product.
/store productsDisplay a list of all available products.
/store admin apply-discountApply a discount to the selected product.
/store admin deleteRemove a product from the store permanently.
/store admin new-productAdd a new product to the store.
/store admin order-infoRetrieve detailed information about a specific order.
/store admin order-statusUpdate the status of an existing order.
/store admin stockoutMark a product as out of stock or back in stock.

πŸš€ Backend API

RouteMethodDescriptionParamsRequest TypeUse
/apiGETReturns a basic message with the current time and portal dataNoneNoneTo check the API status
/api/loginGETRedirects to Discord OAuth loginNoneNoneTo initiate Discord OAuth login
/api/callbackGETHandles Discord OAuth callbackcodeQueryTo handle OAuth response and save tokens
/api/storeGETReturns store-related data like categories and settingsNoneNoneTo retrieve store configuration and categories
/api/store/productsGETReturns all available products in the storeNoneNoneTo retrieve list of products
/api/store/categoriesGETReturns all product categoriesNoneNoneTo retrieve product categories
/api/store/products/:idGETReturns a specific product by IDid (Product ID)NoneTo retrieve a single product by its ID
/api/@meGETReturns authenticated user's Discord profile dataNoneNoneTo fetch the logged-in user's profile data
/api/@me/avatarGETRedirects to the user's avatar URLNoneNoneTo retrieve the user's avatar
/api/@me/logoutGETLogs out the user by removing tokensNoneNoneTo log the user out and clear session cookies
/api/@me/ordersGETReturns the user's order historyNoneNoneTo fetch the authenticated user's orders
/api/@me/orderPOSTCreates a new order with a cart of productscart (Array)BodyTo create a new order for the authenticated user

This table lists all the main backend API routes, the HTTP method, their descriptions, required parameters, and the request type for each route.


πŸŽ₯ Demo

robo-store-screenshots/robo-store.mp4

https://github.com/user-attachments/assets/2332de81-c31b-4415-b5fe-a887dd9c4f6f

πŸ“· Screenshots

Here's a collection of screenshots showing various features and pages of the Robo Store.

Hero Section
Hero Section
Shop Products Page
Shop Products Page
Product Page
Product Page
Out of Stock Product Page
Out of Stock Product Page
Cart Preview
Cart Preview
Store My Order Info
Store My Order Info
New Order Received Notification (admin pov)
New Order Received Notification
User Account on Storefront
User Account on Storefront
Store Admin Apply Discount
Store Admin Apply Discount
Store Admin New Product
Store Admin New Product
Store Admin Order Status
Store Admin Order Status
Store Admin Stockout
Store Admin Stockout
Website
Website

πŸ’» Contributing

!TIP
We welcome contributions to improve robo-store! If you have suggestions, bug fixes, or new feature ideas, follow these steps:

  1. Fork the Repository
    Click the Fork button at the top-right of the repo page.

  2. Clone Your Fork
    Clone the repo locally:

    git clone https://github.com/ArnavK-09/robo-store.git
  3. Create a Branch
    Create a new branch for your changes:

    git checkout -b your-feature-branch
  4. Make Changes
    Implement your changes (bug fixes, features, etc.).

  5. Commit and Push
    Commit your changes and push the branch:

    git commit -m "Description of changes"
    git push origin your-feature-branch
  6. Open a Pull Request
    Open a PR with a detailed description of your changes.

  7. Collaborate and Merge
    The maintainers will review your PR, request changes if needed, and merge it once approved.

πŸ™‹β€β™‚οΈ Issues

Found a bug or need help? Please create an issue on the GitHub repository with a detailed description.

πŸ‘€ Author

πŸ—Ί Roadmap



0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago