Skip to content

AI-powered eCommerce platform built with SvelteKit + Cloudflare, letting anyone create and manage a custom web store effortlessly.

License

Notifications You must be signed in to change notification settings

starspacegroup/hermes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

366 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hermes eCommerce Platform

Hermes is a modern multi-tenant eCommerce platform built with SvelteKit and TypeScript, deployed on Cloudflare Pages with D1 database and R2 storage. It features a WYSIWYG page builder, responsive design, and comprehensive theme system. It supports role-based authentication and is designed for scalability and maintainability. It includes a robust testing suite and follows strict code quality standards. It is intended to serve as a foundation for building customizable online stores with ease. It has a modular architecture to facilitate future enhancements. It will prioritize security best practices and data integrity. It has a way for site owners to manage products, orders, and customers through an admin dashboard which will include analytics and reporting features. It will also support integrations with third-party services such as payment gateways and shipping providers. It will be optimized for performance and SEO. It has detailed documentation to assist developers in understanding and extending the platform. It has features for AI assistance in content creation and customer support. It will comply with relevant data protection regulations.

🚀 Stack & Features

  • SvelteKit - Modern web framework with TypeScript support
  • Cloudflare Pages - Edge deployment for global performance
  • Cloudflare D1 - Serverless SQL database with multi-tenant support
  • TypeScript - Type-safe development
  • Multi-Tenant Architecture - Support for multiple stores/sites
  • Multi-Provider SSO - OAuth 2.0 authentication with Google, Facebook, GitHub, etc.
  • Responsive Design - Mobile-first and responsive design for all features

📦 Contributing Code / Local Dev Setup

Prerequisites

  • Node.js 18+
  • npm

Quick Setup

# Fork the repository on your local system
git clone https://github.com/starspacegroup/hermes.git

# Change to the project directory
cd hermes

# Install npm packages
npm install

# Create D1 database
wrangler d1 create hermes-db
# Update wrangler.toml with the database_id from output of above command

# Setup database (migrate + seed for local dev)
npm run db:setup:local

# Run local dev server
npm run dev

# Open local instance
open http://localhost:4236/

🛠️ Available Scripts

Development

  • npm run dev - Start development server (auto-migrates and seeds database)
  • npm run preview - Preview production build locally (auto-migrates and seeds)
  • npm test - Run tests with Vitest
  • npm run test:coverage - Run tests with coverage report

Database Management

  • npm run db:setup:local - Migrate and seed local database
  • npm run db:migrate:local - Run migrations on local database
  • npm run db:seed:local - Seed local database with sample data
  • npm run db:setup:preview - Migrate and seed preview database
  • npm run db:migrate - Run migrations on production database

See docs/DATABASE_MANAGEMENT.md for detailed database management guide.

🗄️ Database

The platform uses Cloudflare D1 for data persistence with full multi-tenant support. Database migrations and seeding are automated:

  • Development: Easily reset database: npm run db:reset:local
  • Preview: Auto-migrates and seeds when running npm run preview
  • Production: Auto-migrates when deploying (seeding is blocked for safety)

Database Scripts

# Local development
npm run db:migrate:local    # Run migrations only
npm run db:seed:local       # Seed with sample data
npm run db:setup:local      # Both migrate and seed
npm run db:reset:local      # Dangerously reset and seed

# Production
npm run db:migrate          # Run migrations only (no seed)
npm run deploy              # Deploy and auto-migrate

See docs/DATABASE_MANAGEMENT.md for complete database management guide.

🌐 Deployment

The project is configured for automatic deployment on Cloudflare Pages:

Automatic Deployment: Connect your repository to Cloudflare Pages

Build Configuration

  • Build Command: npm run build
  • Output Directory: .svelte-kit/cloudflare
  • Node.js Version: 18+
  • D1 Database: Configured in wrangler.toml

🔧 Configuration

Cloudflare Adapter

The project uses @sveltejs/adapter-cloudflare configured in svelte.config.js for:

  • Edge-side rendering
  • Static asset optimization
  • Platform proxy support

Wrangler Configuration

See wrangler.toml for Cloudflare Workers configuration.

📈 Next Steps

This foundation includes:

  • ✅ SvelteKit project with TypeScript
  • ✅ Cloudflare Pages adapter configuration
  • ✅ Modern tooling setup (ESLint, Prettier, Vitest)
  • ✅ Basic styling and responsive layout

Database Features

  • ✅ Multi-tenant architecture (site-scoped data)
  • ✅ Products, users, orders, and carts tables
  • ✅ Repository pattern for data access
  • ✅ Migration system
  • ✅ Type-safe database queries

Upcoming Features

  • Payment integration
  • Advanced admin features
  • Inventory management
  • Analytics and reporting

🤖 GitHub Copilot Configuration

This project is configured with comprehensive GitHub Copilot instructions to ensure:

  • Consistent Code Quality: Automatic adherence to project standards
  • Test Coverage: Enforced 80%+ coverage (target: 90%)
  • Type Safety: Strict TypeScript with explicit return types
  • Formatting: Automatic Prettier formatting (2 spaces, single quotes, no trailing commas)
  • TDD Approach: Tests written before implementation

Quality Gates

Before ANY code is considered complete:

npm run prepare  # Runs format, lint, check, and test

All code must pass:

  • npm run format - Prettier formatting
  • npm run lint - ESLint checks
  • npm run check - TypeScript type checking
  • npm run test:coverage - Test coverage ≥80%

For Developers Using Copilot:

See docs/GITHUB_COPILOT_SETUP.md for complete Copilot configuration details.

About

AI-powered eCommerce platform built with SvelteKit + Cloudflare, letting anyone create and manage a custom web store effortlessly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •