Skip to content

AgOpenGPS-Official/AgOpenNtripCaster

Repository files navigation

πŸ—ΊοΈ AgOpen Ntripcaster

A modern, high-performance NTRIP (Networked Transport of RTCM via Internet Protocol) server for real-time RTK GNSS correction distribution.

Built with ASP.NET 9 Core, React, TypeScript, and PostgreSQL. Designed for precision agriculture and professional surveying applications.

Status License Version


What is AgOpen Ntripcaster?

AgOpen Ntripcaster is a comprehensive real-time correction streaming server that:

  • Receives RTCM correction data from GNSS base stations
  • Distributes corrections to multiple RTK clients in real-time
  • Manages users, groups, mount points, and permissions
  • Visualizes client locations and stream status on interactive maps
  • Monitors system health with real-time dashboards

Key Features

  • βœ… Low-latency streaming (5-105ms total system latency)
  • βœ… High concurrency (1000+ concurrent clients)
  • βœ… Real-time visualization with WebSocket-based client tracking
  • βœ… Role-based access control with multi-user/group permissions
  • βœ… Email notifications for source online/offline events
  • βœ… Production-ready Docker deployment with automated migrations
  • βœ… Modern admin dashboard with dark mode support
  • βœ… Comprehensive monitoring and logging

Tech Stack

Backend

  • ASP.NET 9 Core β€’ C# 13 β€’ PostgreSQL 16 β€’ Entity Framework Core 9
  • SignalR (real-time WebSocket) β€’ JWT Authentication β€’ Serilog Logging
  • Swagger/OpenAPI Documentation

Frontend

  • React 18 β€’ TypeScript β€’ Vite β€’ Leaflet.js (mapping)
  • Axios (HTTP) β€’ React Router β€’ CSS Modules + Design System

Infrastructure

  • Docker & Docker Compose β€’ Nginx β€’ PostgreSQL
  • GitHub Actions (CI/CD ready)

Quick Start

πŸ“¦ Development Setup

# Clone
git clone https://github.com/AgOpenGPS-Official/ntripcasterByBKG.git
cd ntripcasterByBKG

# Backend (new terminal)
cd AgOpenNtripCaster.Server
dotnet restore && dotnet ef database update && dotnet run

# Frontend (new terminal)
cd AgOpenNtripCaster.Client
npm install && npm run dev

Access:

πŸš€ Production Deployment

Option 1: Automated Setup (Recommended)

Use our interactive setup script to configure everything automatically:

Linux/Mac:

cd deploy
chmod +x setup.sh
./setup.sh

Windows (PowerShell as Administrator):

cd deploy
.\setup.ps1

The setup script will:

  • Prompt for your domain, ports, database credentials
  • Validate all inputs (domains, emails, ports)
  • Auto-generate JWT secrets and passwords
  • Create .env configuration file
  • Generate nginx configuration
  • Provide next steps

Option 2: Manual Setup

cd deploy
cp .env.example .env
nano .env  # Configure manually

chmod +x deploy.sh
./deploy.sh

See SETUP_GUIDE.md for setup script documentation and DEPLOYMENT.md for complete deployment instructions.


πŸ“š Documentation

All detailed documentation is in the /docs and /deploy folders:

Document Purpose
SETUP_GUIDE.md Interactive setup scripts for Linux and Windows
DEPLOYMENT.md Production setup, Docker, scaling, monitoring
LOCAL_DEV.md Development setup, debugging, testing
ARCHITECTURE_PLAN_ASPNET9.md System design, database schema, authentication
DARK_MODE.md CSS variables, theme system, styling guidelines
UI_ENHANCEMENTS.md Real-time status indicators, component design
PROGRESS.md Development history, completed phases, roadmap

NTRIP Protocol

Source Connection (GNSS Base Station)

1. Connect TCP to hostname:2101
2. Send: "SOURCE STATION_A:sourcePassword123\r\n"
3. Stream RTCM correction data continuously

Client Connection (RTK Rover)

1. Connect TCP to hostname:2101
2. Send NTRIP HTTP request with credentials
3. Receive RTCM correction stream
4. Send position updates every ~10 seconds

Sourcetable Request

GET http://hostname:2101/ HTTP/1.1
Returns HTML table of available mount points

Project Structure

ntripcasterByBKG/
β”œβ”€β”€ AgOpenNtripCaster.Server/    # C# ASP.NET 9 backend
β”‚   β”œβ”€β”€ Controllers/              # REST API endpoints
β”‚   β”œβ”€β”€ Services/                 # Business logic & NTRIP server
β”‚   β”œβ”€β”€ Models/                   # Entity & DTO classes
β”‚   β”œβ”€β”€ Data/                     # Database context & migrations
β”‚   └── Hubs/                     # SignalR real-time communication
β”œβ”€β”€ AgOpenNtripCaster.Client/    # React + TypeScript frontend
β”‚   β”œβ”€β”€ src/components/           # React components & pages
β”‚   β”œβ”€β”€ src/services/             # API clients & hooks
β”‚   β”œβ”€β”€ src/styles/               # Global CSS design system
β”‚   └── public/                   # Static assets
β”œβ”€β”€ deploy/                       # Docker & production setup
β”‚   β”œβ”€β”€ docker-compose.yml        # Service orchestration
β”‚   β”œβ”€β”€ deploy.sh                 # Deployment script
β”‚   β”œβ”€β”€ update.sh                 # Update script
β”‚   └── README.md                 # Deployment docs
β”œβ”€β”€ docs/                         # Detailed documentation
└── NtripCaster.sln              # Visual Studio solution

Security

  • βœ… Two-Tier Authentication (mount point credentials + source password)
  • βœ… JWT Token Authentication (stateless API access)
  • βœ… Role-Based Access Control (RBAC) (Admin, User, Source roles)
  • βœ… Password Hashing (BCrypt with salting)
  • βœ… CORS Protection (configurable origins)
  • βœ… HTTPS/TLS Ready (SSL termination via Nginx)

Performance

Metric Value
System Latency 1-5ms (excluding network)
Network Latency 1-100ms (typical ISP)
Total Latency 5-105ms (RTK acceptable)
Concurrent Clients 1000+ supported
Data Throughput 100+ Mbps per instance

License

MIT License - See LICENSE file for details.

You are free to use, modify, and distribute commercially.


Support


πŸš€ Quick Commands

# Development
cd AgOpenNtripCaster.Server && dotnet run
cd AgOpenNtripCaster.Client && npm run dev

# Production
cd deploy && ./deploy.sh

# Update
cd deploy && ./update.sh

# Logs
docker-compose logs -f backend

Ready to stream RTK corrections?

Start with LOCAL_DEV.md for development or DEPLOYMENT.md for production.

Questions? Check the /docs folder or open an issue.


Built for AgOpen GPS precision agriculture ecosystem Last Updated: November 2024 | Status: Production Ready ✨

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •