Skip to content

aidevforge/offshore-hosting

Repository files navigation

Offshore Host

Premium offshore VPS hosting website built with Next.js 15, featuring multiple payment methods and Telegram integration.

Features

  • Modern Design: Clean, professional UI with metallic blue-gray theme
  • Multiple Pages: Home, Services, VPS Info, Pricing, Contact, and Payment pages
  • Authentication: User registration and login with email/password and Google OAuth
  • Payment Integration: Support for Stripe, CoinPayments, and MetaMask
  • Telegram Bot: Automatic notifications for contact forms and payments
  • Responsive: Mobile-first design that works on all devices
  • SEO Optimized: Proper meta tags and semantic HTML

Environment Variables

To run this project, you need to set up the following environment variables:

Telegram Bot (Required for notifications)

TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_here

How to set up Telegram Bot:

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the instructions
  3. Copy the bot token provided
  4. To get your chat ID:
    • Search for @userinfobot on Telegram
    • Start a chat and it will send you your chat ID
    • Or create a group, add your bot, and use @getidsbot to get the group chat ID

Supabase Authentication (Required)

# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key

# Development redirect URL (optional)
NEXT_PUBLIC_DEV_SUPABASE_REDIRECT_URL=http://localhost:3000/auth/callback

How to set up Supabase:

  1. Go to supabase.com and create a new project
  2. Go to Settings > API to get your project URL and anon key
  3. Get your service role key from Settings > API (required for webhooks to bypass RLS)
  4. Enable Google OAuth provider in Authentication > Providers
  5. See `GOOGLE_OAUTH_SETUP.md` for detailed Google OAuth configuration

Important: The service role key bypasses Row Level Security (RLS) and should NEVER be exposed to the client side. It's only used server-side for webhooks and admin operations.

Payment Integrations (Optional - for production)

# Stripe
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret_here

# CoinPayments
COINPAYMENTS_MERCHANT_ID=your_merchant_id
COINPAYMENTS_IPN_SECRET=your_ipn_secret
COINPAYMENTS_PUBLIC_KEY=your_public_key
COINPAYMENTS_PRIVATE_KEY=your_private_key

# MetaMask (Ethereum wallet address)
METAMASK_WALLET_ADDRESS=your_ethereum_wallet_address

Getting Started

  1. Install dependencies:
npm install
  1. Set up environment variables in Vercel or create a .env.local file

  2. Run the development server:

npm run dev
  1. Open http://localhost:3000 in your browser

Project Structure

app/
├── page.tsx              # Homepage
├── services/page.tsx     # Services page
├── vps/page.tsx          # VPS information page
├── pricing/page.tsx      # Pricing plans
├── contact/page.tsx      # Contact form
├── payment/page.tsx      # Payment checkout
├── auth/                 # Authentication pages
│   ├── login/page.tsx    # Login page
│   ├── sign-up/page.tsx  # Registration page
│   ├── callback/route.ts # OAuth callback handler
│   └── auth-code-error/  # OAuth error page
└── api/
    ├── contact/          # Contact form API
    └── payment/          # Payment processing APIs
        ├── stripe/
        ├── coinpayments/
        └── metamask/

components/
├── site-header.tsx       # Navigation header
├── site-footer.tsx       # Footer component
└── google-auth-button.tsx # Google OAuth button

lib/
├── telegram.ts           # Telegram Bot API integration
└── supabase/             # Supabase client configuration
    ├── client.ts
    ├── server.ts
    └── middleware.ts

Telegram Notifications

The application sends notifications to Telegram for:

  • Contact Form Submissions: When users submit the contact form
  • Payment Notifications: When payments are initiated (Stripe, CoinPayments, MetaMask)

Messages include all relevant details and are formatted with HTML for better readability.

Payment Methods

1. Stripe (Credit Cards)

  • Visa, Mastercard, American Express
  • Secure checkout via Stripe

2. CoinPayments (Cryptocurrency)

  • Bitcoin, Ethereum, Litecoin, and 100+ cryptocurrencies
  • Anonymous payments

3. MetaMask (Web3 Wallet)

  • Direct wallet-to-wallet payments
  • Instant transaction verification

Deployment

This project is designed to be deployed on Vercel:

  1. Push your code to GitHub
  2. Import the repository in Vercel
  3. Add environment variables in Vercel project settings
  4. Deploy

TODO for Production

  • Integrate real Stripe API with checkout sessions and webhooks
  • Set up CoinPayments IPN callbacks for payment verification
  • Implement blockchain transaction verification for MetaMask
  • Add database integration for storing orders and customer data
  • Implement VPS deployment automation
  • Set up email service for sending credentials
  • Add user dashboard for managing VPS instances
  • Implement proper error handling and logging
  • Add rate limiting to API routes
  • Set up monitoring and analytics

License

All rights reserved © 2025 Offshore Host

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors