Skip to content

GST Invoice & Shipping Manager - A comprehensive Shopify app for Indian merchants to generate GST-compliant invoices and manage shipping labels

Notifications You must be signed in to change notification settings

r2w34/ShopifyGST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงพ GST Invoice & Shipping Manager for Shopify

Shopify App Remix React TypeScript Polaris

A comprehensive GST-compliant invoicing and shipping management solution for Indian Shopify merchants. Built from scratch following Shopify's latest development guidelines and best practices.

๐ŸŽฏ Features

โœ… Core Features

๐Ÿงพ GST Invoice Management

  • GST-Compliant Invoices: Automatic CGST/SGST/IGST calculations based on place of supply
  • HSN/SAC Code Support: Product classification for tax compliance
  • Invoice Templates: Professional PDF generation with company branding
  • Sequential Numbering: Configurable invoice numbering system
  • Multi-State Support: Handles inter-state and intra-state transactions
  • Reverse Charge: Support for reverse charge mechanism

๐Ÿ‘ฅ Customer Management

  • Customer Database: Complete customer information with GSTIN validation
  • Address Management: Multiple addresses per customer
  • Business Information: B2B and B2C customer classification
  • Shopify Integration: Automatic customer sync from orders

๐Ÿ“ฆ Shipping Label System

  • Label Generation: Professional shipping labels with tracking
  • Barcode/QR Codes: Integrated tracking codes
  • Multi-Courier Support: Support for various courier services
  • Package Management: Weight, dimensions, and package type tracking

โš™๏ธ Settings & Configuration

  • Company Setup: GSTIN, address, and business information
  • Tax Configuration: Default GST rates and tax settings
  • Invoice Customization: Prefixes, numbering, and templates
  • Compliance Settings: GST compliance parameters

๐Ÿ›  Technology Stack

  • Frontend: React 18 + Remix Framework + TypeScript
  • UI Framework: Shopify Polaris (Official Design System)
  • Backend: Node.js with Remix Server
  • Database: SQLite (Development) / PostgreSQL (Production)
  • ORM: Prisma
  • Authentication: Shopify App Bridge + OAuth
  • API: Shopify GraphQL Admin API
  • Deployment: Vercel / Railway / Heroku

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Shopify Partner Account
  • Shopify CLI

Installation

  1. Clone the repository

    git clone <repository-url>
    cd gst-invoice-shipping-manager
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env
    # Edit .env with your Shopify app credentials
  4. Set up database

    npx prisma generate
    npx prisma db push
  5. Start development server

    npm run dev

Environment Variables

# Shopify App Configuration
SHOPIFY_API_KEY=your_api_key
SHOPIFY_API_SECRET=your_api_secret
SCOPES=write_orders,read_orders,write_customers,read_customers,write_products,read_products
SHOPIFY_APP_URL=https://your-app-domain.com

# Database
DATABASE_URL=file:./dev.db

# Session Storage
SESSION_SECRET=your_session_secret

# GST Configuration
DEFAULT_GST_RATE=18
COMPANY_GSTIN=your_company_gstin
COMPANY_NAME=Your Company Name

๐Ÿ“Š Database Schema

The app uses a comprehensive database schema with the following models:

  • Session: Shopify authentication and session management
  • Invoice: GST-compliant invoice data with tax calculations
  • Customer: Customer information with GSTIN support
  • ShippingLabel: Shipping label and tracking information
  • AppSettings: App configuration and company settings
  • Subscription: Billing and subscription management
  • WebhookLog: Webhook processing and debugging

๐Ÿ— Project Structure

app/
โ”œโ”€โ”€ components/           # Reusable React components
โ”œโ”€โ”€ models/              # Database models and queries
โ”œโ”€โ”€ routes/              # Remix routes (pages and API)
โ”‚   โ”œโ”€โ”€ app._index.tsx   # Dashboard
โ”‚   โ”œโ”€โ”€ app.invoices/    # Invoice management
โ”‚   โ”œโ”€โ”€ app.customers/   # Customer management
โ”‚   โ”œโ”€โ”€ app.settings.tsx # App configuration
โ”‚   โ””โ”€โ”€ webhooks/        # Shopify webhook handlers
โ”œโ”€โ”€ services/            # Business logic services
โ”œโ”€โ”€ utils/               # Utility functions
โ”‚   โ””โ”€โ”€ gst.server.ts    # GST calculation utilities
โ””โ”€โ”€ shopify.server.ts    # Shopify app configuration

๐Ÿ‡ฎ๐Ÿ‡ณ GST Compliance Features

Tax Calculations

  • CGST + SGST: For intra-state transactions (same state)
  • IGST: For inter-state transactions (different states)
  • Place of Supply: Automatic determination based on delivery address
  • Tax Rates: Support for 0%, 5%, 12%, 18%, and 28% GST rates

Invoice Requirements

  • Sequential Numbering: Continuous invoice numbering
  • GSTIN Validation: 15-digit GSTIN format validation
  • HSN/SAC Codes: Product classification codes
  • Reverse Charge: Support for reverse charge mechanism
  • Currency Format: Indian Rupee formatting with words

Compliance Reports

  • Tax Summary: CGST, SGST, IGST breakdowns
  • Customer Reports: B2B and B2C transaction summaries
  • Period Reports: Monthly and quarterly tax reports

๐Ÿ”ง Development

Available 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 test             # Run tests
npm run setup        # Setup database

Adding New Features

  1. Database Changes: Update prisma/schema.prisma
  2. Routes: Add new routes in app/routes/
  3. Components: Create reusable components in app/components/
  4. Utilities: Add helper functions in app/utils/

๐Ÿ“ฑ Shopify Integration

App Surfaces

  • Admin Dashboard: Embedded app pages in Shopify Admin
  • Navigation: Custom navigation menu in Shopify Admin
  • Settings: Configuration pages for app setup

Webhooks

  • Orders Created: Automatic customer and invoice data sync
  • Orders Updated: Real-time order status updates
  • Customers Created/Updated: Customer information sync
  • App Uninstalled: Cleanup on app uninstallation

GraphQL Integration

  • Orders API: Fetch order details and line items
  • Customers API: Customer information and addresses
  • Products API: Product details and HSN codes

๐Ÿ” Security & Privacy

Data Protection

  • Shopify OAuth: Official authentication flow
  • Session Management: Secure session storage with Prisma
  • Data Encryption: Sensitive data protection
  • GDPR Compliance: Privacy regulation compliance

API Security

  • Rate Limiting: API request rate limiting
  • Input Validation: All user inputs validated
  • SQL Injection Protection: Prisma ORM protection
  • XSS Prevention: React built-in XSS protection

๐Ÿ“ˆ Performance

Optimization

  • Code Splitting: Automatic code splitting with Remix
  • Lazy Loading: Component lazy loading
  • Database Indexing: Optimized database queries
  • Caching: Response caching for better performance

Monitoring

  • Error Tracking: Comprehensive error handling
  • Performance Metrics: App performance monitoring
  • Webhook Logging: Webhook processing logs

๐Ÿš€ Deployment

Production Deployment

  1. Build the app

    npm run build
  2. Set up production database

    DATABASE_URL=postgresql://... npx prisma db push
  3. Deploy to platform

    # Vercel
    vercel --prod
    
    # Railway
    railway up
    
    # Heroku
    git push heroku main

Environment Setup

  • Database: PostgreSQL for production
  • File Storage: Cloud storage for invoice PDFs
  • Email Service: SMTP or SendGrid for notifications
  • Monitoring: Error tracking and performance monitoring

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ†˜ Support

๐ŸŽฏ Roadmap

Phase 1 (Current) โœ…

  • Core app structure and authentication
  • Basic invoice management
  • Customer management
  • GST calculations
  • Settings configuration

Phase 2 (Next)

  • PDF invoice generation
  • Shipping label creation
  • Email notifications
  • Bulk operations
  • Advanced reporting

Phase 3 (Future)

  • WhatsApp integration
  • Multi-user support
  • API access
  • Mobile app
  • Advanced analytics

๐Ÿ† Features

  • โœ… Modern Architecture: Built with latest Shopify development standards
  • โœ… GST Compliance: 100% compliant with Indian GST regulations
  • โœ… Professional UI: Shopify Polaris design system
  • โœ… Real-time Sync: Webhook-based data synchronization
  • โœ… Scalable: Built for high-volume operations
  • โœ… Secure: Enterprise-level security measures

Made with โค๏ธ for Indian Shopify merchants

Simplifying GST compliance and shipping management, one invoice at a time.

About

GST Invoice & Shipping Manager - A comprehensive Shopify app for Indian merchants to generate GST-compliant invoices and manage shipping labels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •