Skip to content

An open-source creator commerce platform that empowers digital creators to sell their work directly to their audience with 0% platform fees.

Notifications You must be signed in to change notification settings

sharananurag998/opengrove

Repository files navigation

OpenGrove

An open-source creator commerce platform that empowers digital creators to sell their work directly to their audience with 0% platform fees.

πŸš€ Features

Core Platform Features

  • 0% Platform Fees - Keep 100% of your revenue (only pay payment processor fees)
  • Unlimited Customization - Full control over your storefront appearance and functionality
  • True Data Ownership - Export all your data anytime, no lock-in
  • Multiple Product Types - Digital downloads, subscriptions, physical goods, and bundles
  • Built-in Marketing Tools - Affiliate system, discount codes, email automation
  • Developer Friendly - API-first architecture with webhook support

Creator Dashboard

  • Product Management - Create and manage digital products with version control
  • File Upload System - Secure file storage with MinIO integration
  • Analytics Dashboard - Track sales, revenue, and customer insights
  • Customer Management - View and manage your customer base
  • Payout Management - Track earnings and payment history

Customer Experience

  • Modern Storefront - Beautiful, responsive product pages
  • Shopping Cart - Persistent cart with local storage
  • Secure Checkout - Stripe integration with multiple payment methods
  • Digital Delivery - Automatic file delivery with download management
  • Customer Dashboard - Order history and download management

Security & Compliance

  • Secure File Storage - S3-compatible storage with MinIO
  • Download Protection - Time-limited, tracked download links
  • License Key Generation - Automatic license keys for software products
  • PCI Compliance - Secure payment processing through Stripe
  • GDPR Ready - Data export and deletion capabilities

πŸ›  Tech Stack

  • Framework: Next.js 15 with App Router
  • Database: PostgreSQL with Prisma ORM
  • Authentication: NextAuth.js
  • Payments: Stripe (PayPal coming soon)
  • File Storage: MinIO (S3-compatible)
  • Email: Nodemailer with React Email
  • Styling: Tailwind CSS
  • Deployment: Docker & Kubernetes ready

πŸš€ Getting Started

Prerequisites

  • Node.js 20+
  • Docker & Docker Compose
  • npm or yarn
  • Stripe account (for payments)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/opengrove.git
cd opengrove
  1. Install dependencies:
npm install
  1. Copy environment variables:
cp .env.example .env
  1. Configure your environment variables:

    • Add your Stripe API keys
    • Set up database connection
    • Configure MinIO settings
  2. Start the development services:

npm run docker:up
  1. Run database migrations:
npm run db:push
  1. Seed the database (optional):
npm run db:seed
  1. Start the development server:
npm run dev

Visit http://localhost:3000 to see the application.

Default Credentials (Development)

After running the seed script, you can login with:

πŸ“ Project Structure

opengrove/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                  # Next.js app router pages
β”‚   β”‚   β”œβ”€β”€ api/             # API routes
β”‚   β”‚   β”œβ”€β”€ auth/            # Authentication pages
β”‚   β”‚   β”œβ”€β”€ dashboard/       # Dashboard pages (admin, creator, customer)
β”‚   β”‚   β”œβ”€β”€ products/        # Public product pages
β”‚   β”‚   └── checkout/        # Checkout flow
β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”œβ”€β”€ cart/           # Shopping cart components
β”‚   β”‚   β”œβ”€β”€ checkout/       # Checkout components
β”‚   β”‚   β”œβ”€β”€ product/        # Product display components
β”‚   β”‚   └── ui/             # Shared UI components
β”‚   β”œβ”€β”€ contexts/           # React contexts (cart, etc.)
β”‚   β”œβ”€β”€ hooks/              # Custom React hooks
β”‚   β”œβ”€β”€ lib/                # Core libraries
β”‚   β”‚   β”œβ”€β”€ auth/          # Authentication logic
β”‚   β”‚   β”œβ”€β”€ db/            # Database client
β”‚   β”‚   β”œβ”€β”€ email/         # Email services
β”‚   β”‚   β”œβ”€β”€ services/      # External services (Stripe, MinIO)
β”‚   β”‚   └── utils/         # Utility functions
β”‚   β”œβ”€β”€ types/              # TypeScript types
β”‚   └── generated/          # Generated files (Prisma client)
β”œβ”€β”€ prisma/
β”‚   β”œβ”€β”€ schema.prisma       # Database schema
β”‚   └── seed.ts            # Database seeder
β”œβ”€β”€ public/                 # Static assets
β”œβ”€β”€ docs/                   # Documentation
└── docker-compose.yml      # Docker services

πŸ§ͺ Development Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run typecheck - Run TypeScript checks
  • npm run db:studio - Open Prisma Studio
  • npm run db:push - Push schema changes to database
  • npm run db:migrate - Run database migrations
  • npm run db:seed - Seed the database
  • npm run docker:up - Start Docker services
  • npm run docker:down - Stop Docker services

πŸ”§ Configuration

Environment Variables

Key environment variables to configure:

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/opengrove"

# Authentication
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key"

# Stripe
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_PUBLISHABLE_KEY="pk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
STRIPE_CURRENCY="usd"  # or "inr" for Indian accounts

# MinIO
MINIO_ENDPOINT="localhost"
MINIO_PORT="9000"
MINIO_ACCESS_KEY="minioadmin"
MINIO_SECRET_KEY="minioadmin"
MINIO_BUCKET_NAME="opengrove"

# Email
SMTP_HOST="localhost"
SMTP_PORT="1025"
SMTP_USER=""
SMTP_PASSWORD=""
SMTP_FROM="noreply@opengrove.local"

Stripe Configuration

  1. Create a Stripe account at https://stripe.com
  2. Get your API keys from the Stripe dashboard
  3. Set up webhook endpoint: https://yourdomain.com/api/webhooks/stripe
  4. Configure webhook to listen for checkout.session.completed events

For Indian Stripe accounts:

  • Use INR currency
  • Ensure you're registered as a business (not individual)
  • Use international test cards for testing

🚒 Deployment

Using Docker

  1. Build the Docker image:
docker build -t opengrove .
  1. Run with Docker Compose:
docker-compose -f docker-compose.prod.yml up -d

Environment-Specific Notes

  • Production: Use proper SSL certificates and secure environment variables
  • Staging: Enable Stripe test mode
  • Development: Use local MinIO and MailHog for testing

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“œ License

OpenGrove is open source software licensed under the MIT License.

πŸ†˜ Support

🎯 Roadmap

See PROGRESS.md for detailed development progress and upcoming features.

Current Focus

  • Payment gateway integrations (PayPal, Razorpay)
  • Advanced analytics dashboard
  • Multi-language support
  • Mobile app development

Future Plans

  • Marketplace features
  • AI-powered recommendations
  • Blockchain integration for NFTs
  • Advanced creator tools

πŸ™ Acknowledgments

  • Built with ❀️ by the OpenGrove community
  • Powered by amazing open-source projects
  • Special thanks to all contributors

Ready to start selling? Deploy OpenGrove today and join the creator economy revolution! πŸš€

About

An open-source creator commerce platform that empowers digital creators to sell their work directly to their audience with 0% platform fees.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages