Skip to content

Latest commit

 

History

History
108 lines (85 loc) · 2.51 KB

README.md

File metadata and controls

108 lines (85 loc) · 2.51 KB

Next.js SaaS Starter for African Markets

The all-in-one starter kit for building SaaS applications with local payment integrations for the African market.

Features

  • Secure user management and authentication with Supabase
  • Powerful data access & management tooling on top of PostgreSQL with Supabase
  • Integrated payment processing with Paystack for:
    • Local card payments
    • Bank transfers
    • USSD payments
    • Mobile money (coming soon)
  • Automatic syncing of pricing plans and subscription statuses via webhooks
  • Team management and role-based access control
  • Dark/light mode support
  • Responsive dashboard UI with shadcn/ui

Architecture

The template uses the following technology stack:

Setup

1. Clone and Install

git clone https://github.com/yourusername/your-repo
cd your-repo
pnpm install

2. Configure Supabase

  1. Create a project at Supabase
  2. Run database migrations
  3. Set up auth providers
  4. Copy environment variables

3. Configure Paystack

  1. Create a Paystack account
  2. Get your API keys
  3. Set up webhook endpoint at your-domain.com/api/webhooks
  4. Configure payment methods

4. Environment Variables

Create a .env.local file:

# Supabase
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=

# Paystack
NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY=
PAYSTACK_SECRET_KEY=

# General
NEXT_PUBLIC_SITE_URL=

5. Run Locally

pnpm dev

Payment Flow

The template handles payments through Paystack:

  1. User selects a plan
  2. Redirected to Paystack checkout
  3. Payment processing through:
    • Local credit/debit cards
    • Bank transfers
    • USSD
    • Mobile money (coming soon)
  4. Webhook handles subscription events
  5. Customer portal for subscription management

Webhooks

Paystack webhooks handle:

  • Subscription creation
  • Subscription updates
  • Payment success/failure
  • Subscription cancellation

Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a PR

Support

For questions, features, or support:

License

MIT License