npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2024 – Pkg Stats / Ryan Hefner

robo-store

v0.0.3

Published

πŸ›’ Minimal store plugin for Robo.js with backend api & storefront...

Downloads

219

Readme

[!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

| Option | Type | Description | Default Value | Required? | | ----------------- | -------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- | --------- | | mongo_uri | string | MongoDB URI for storing user, product, and order data. | process.env.MONGO_URI | Yes | | owner_id | string | Your Discord user ID to link to the bot and manage store invites. | None | Yes | | store_name | string | Display name of your store. | "Store" | Yes | | domain | string | Domain of your storefront. Used for product links and site navigation. | None | Yes | | slogan | string | A catchy slogan for your store to attract customers. | "Grab The Products Now..." | No | | port | number | Deploy storefront and API to the host with port configuration. | 3000 | No | | hero_image | string | Link to a hero image displayed prominently on your store’s landing page. | None | No | | about_us | string | A paragraph describing your store and its community-driven value. | "Welcome to our exclusive store, where premium products meet a close-knit community..." | No | | invite | string | Discord invite link for users to join your community. | https://discord.com/users/${pluginOptions.owner_id} | No | | introduction | string | Intro message displayed to new customers in the store. | "Exclusive products available only for our private community! Join our Discord to access special..." | No | | client_secret | string | Discord bot client secret for authentication. | None | Yes | | client_id | string | Discord bot client ID. | process.env.DISCORD_CLIENT_ID | No | | currency_symbol | string | Currency symbol for prices. | "$" | No | | imgbb_api_key | string | API key for ImgBB if you want to host images externally. | None | No |

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

| Command | Description | | ----------------------------- | ------------------------------------------------------- | | /store my-order-info | Display a list of all your orders. | | /store product-info | Retrieve detailed information about a specific product. | | /store products | Display a list of all available products. | | /store admin apply-discount | Apply a discount to the selected product. | | /store admin delete | Remove a product from the store permanently. | | /store admin new-product | Add a new product to the store. | | /store admin order-info | Retrieve detailed information about a specific order. | | /store admin order-status | Update the status of an existing order. | | /store admin stockout | Mark a product as out of stock or back in stock. |

πŸš€ Backend API

| Route | Method | Description | Params | Request Type | Use | | ------------------------- | ---------- | ------------------------------------------------------------- | ----------------- | ---------------- | ------------------------------------------------ | | /api | GET | Returns a basic message with the current time and portal data | None | None | To check the API status | | /api/login | GET | Redirects to Discord OAuth login | None | None | To initiate Discord OAuth login | | /api/callback | GET | Handles Discord OAuth callback | code | Query | To handle OAuth response and save tokens | | /api/store | GET | Returns store-related data like categories and settings | None | None | To retrieve store configuration and categories | | /api/store/products | GET | Returns all available products in the store | None | None | To retrieve list of products | | /api/store/categories | GET | Returns all product categories | None | None | To retrieve product categories | | /api/store/products/:id | GET | Returns a specific product by ID | id (Product ID) | None | To retrieve a single product by its ID | | /api/@me | GET | Returns authenticated user's Discord profile data | None | None | To fetch the logged-in user's profile data | | /api/@me/avatar | GET | Redirects to the user's avatar URL | None | None | To retrieve the user's avatar | | /api/@me/logout | GET | Logs out the user by removing tokens | None | None | To log the user out and clear session cookies | | /api/@me/orders | GET | Returns the user's order history | None | None | To fetch the authenticated user's orders | | /api/@me/order | POST | Creates a new order with a cart of products | cart (Array) | Body | To 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