Back to Documentation

Getting Started

Set up your Stratolink system from hardware to dashboard in a few simple steps.

Prerequisites

  • RAK3172 development board or compatible LoRaWAN module
  • PlatformIO CLI or PlatformIO IDE
  • Node.js 18 or higher
  • Supabase account (free tier available)
  • The Things Network account (free tier available)
  • Mapbox account (for map visualization)

Step 1: Hardware Setup

Begin by configuring your RAK3172 hardware. For detailed hardware setup instructions, see the Hardware Setup guide.

  1. Connect your RAK3172 to your computer via USB
  2. Install PlatformIO if you haven't already
  3. Clone the Stratolink repository
  4. Navigate to the firmware directory

Step 2: Configure Firmware

Set up your LoRaWAN credentials in the firmware:

  1. Copy firmware/include/config.h values to firmware/include/secrets.h
  2. Edit firmware/include/secrets.h with your TTN credentials:
    • DEV_EUI
    • APP_EUI
    • APP_KEY
  3. Build firmware: pio run
  4. Upload to device: pio run --target upload

Step 3: Set Up Supabase

  1. Create a new Supabase project at supabase.com
  2. Navigate to the SQL Editor
  3. Run the schema SQL from web/lib/supabase/schema.sql
  4. Enable the PostGIS extension if not already enabled
  5. Copy your project URL and anon key from Settings → API

Step 4: Configure Web Application

  1. Navigate to the web directory
  2. Install dependencies: npm install
  3. Copy .env.local.example to .env.local
  4. Add your credentials to .env.local:
    • NEXT_PUBLIC_SUPABASE_URL - Your Supabase project URL
    • NEXT_PUBLIC_SUPABASE_ANON_KEY - Your Supabase anon key
    • NEXT_PUBLIC_MAPBOX_TOKEN - Your Mapbox access token
  5. Start the development server: npm run dev

Step 5: Configure TTN Webhook

  1. Log into The Things Network Console
  2. Navigate to Applications → Your Application → Integrations → Webhooks
  3. Add a new webhook with format: JSON
  4. Set webhook URL: https://your-vercel-domain.com/api/ttn-webhook
  5. Save the webhook configuration

Step 6: Deploy to Vercel

  1. Push your code to GitHub
  2. Import your repository in Vercel
  3. Add your environment variables in Vercel project settings
  4. Deploy
  5. Update your TTN webhook URL with your Vercel domain

Next Steps

Need Help?

If you run into issues during setup, check our troubleshooting guide or contact support.