> ## Documentation Index
> Fetch the complete documentation index at: https://docs.logfleet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Project Structure

> Understanding LogFleet repositories and components

## Overview

LogFleet consists of **two separate repositories**, each serving a distinct purpose:

| Repository                                                     | Purpose                    | License     |
| -------------------------------------------------------------- | -------------------------- | ----------- |
| [logfleet](https://github.com/sadhiappan/logfleet)             | Edge agent (open source)   | Apache 2.0  |
| [logfleet-cloud](https://github.com/sadhiappan/logfleet-cloud) | Cloud platform + dashboard | Proprietary |

## Architecture Diagram

```
+---------------------------------------------------------------+
|                     YOUR EDGE LOCATIONS                       |
|                                                               |
|   +--------------+   +--------------+   +--------------+      |
|   | Location A   |   | Location B   |   | Location C   |      |
|   |              |   |              |   |              |      |
|   | +----------+ |   | +----------+ |   | +----------+ |      |
|   | |  Edge    | |   | |  Edge    | |   | |  Edge    | |      |
|   | |  Agent   | |   | |  Agent   | |   | |  Agent   | |      |
|   | | (logfleet| |   | | (logfleet| |   | | (logfleet| |      |
|   | |   repo)  | |   | |   repo)  | |   | |   repo)  | |      |
|   | +----+-----+ |   | +----+-----+ |   | +----+-----+ |      |
|   +------+-------+   +------+-------+   +------+-------+      |
|          |                  |                  |              |
+----------|------------------|------------------|---------------+
           |                  |                  |
           |    Metrics + WebSocket (on-demand)  |
           |                  |                  |
           v                  v                  v
+---------------------------------------------------------------+
|                      LOGFLEET CLOUD                           |
|                    (logfleet-cloud repo)                      |
|                                                               |
|   +-------------+   +-------------+   +-------------+         |
|   |   API       |   |  Dashboard  |   |  Database   |         |
|   |   Server    |   |  (Next.js)  |   | (PostgreSQL)|         |
|   |   (Go)      |   |             |   |             |         |
|   |             |   |             |   |             |         |
|   | api.logfleet|   | app.logfleet|   |             |         |
|   | .io         |   | .io         |   |             |         |
|   +-------------+   +-------------+   +-------------+         |
+---------------------------------------------------------------+
```

## Repository Details

### 1. Edge Agent (`logfleet`)

**GitHub**: [github.com/sadhiappan/logfleet](https://github.com/sadhiappan/logfleet)

The open-source edge agent that runs at each edge location. Handles:

* **Log Collection**: Vector-based multi-protocol collection (HTTP, Syslog, file)
* **Local Storage**: Grafana Loki with configurable retention (7-30 days)
* **Metric Extraction**: Convert logs to metrics at the edge (100x bandwidth savings)
* **Cloud Sync**: WebSocket connection to LogFleet cloud for on-demand streaming

```bash theme={null}
# Docker image
ghcr.io/sadhiappan/logfleet-agent:latest

# Key components
agent/
├── cmd/edge-control-plane/  # Main binary
├── internal/
│   ├── cloudws/             # WebSocket client
│   ├── loki/                # Loki query client
│   └── heartbeat/           # Health reporting
├── configs/vector/          # Vector configuration
└── deploy/                  # Docker & Kubernetes
```

### 2. Cloud Platform (`logfleet-cloud`)

**GitHub**: [github.com/sadhiappan/logfleet-cloud](https://github.com/sadhiappan/logfleet-cloud) (private)

The cloud control plane and dashboard:

* **API Server**: Go-based REST API + WebSocket streaming hub
* **Dashboard**: Next.js 16 web application
* **Documentation**: Mintlify-powered docs (what you're reading)

```bash theme={null}
# Docker image
ghcr.io/sadhiappan/logfleet-cloud:latest

# Key components
cloud/
├── cmd/api-server/          # API entry point
├── internal/
│   ├── api/handlers/        # HTTP handlers
│   ├── streaming/           # WebSocket hub
│   └── repository/          # Database access
├── web/                     # Dashboard (Next.js)
├── landing/                 # Marketing site
└── docs/                    # Documentation
```

## Which Repo Do I Need?

| I want to...              | Use this repo                                   |
| ------------------------- | ----------------------------------------------- |
| Deploy an edge agent      | `logfleet` (agent)                              |
| View logs in dashboard    | `logfleet-cloud` (dashboard at app.logfleet.io) |
| Integrate via API         | `logfleet-cloud` (API at api.logfleet.io)       |
| Contribute to open source | `logfleet` (agent)                              |

## Data Flow

Understanding how data flows through the system:

```
1. Your Devices → Edge Agent (logfleet repo)
   - Logs ingested via HTTP/Syslog
   - Stored locally in Loki (7-30 day retention)
   - Metrics extracted and sent to cloud

2. Edge Agent → LogFleet Cloud (logfleet-cloud repo)
   - Heartbeats every 30 seconds
   - Metrics pushed continuously
   - Full logs streamed on-demand via WebSocket

3. Dashboard → You
   - Real-time agent status
   - Request log samples from any agent
   - Configure metric extraction rules
```

## Getting Started

1. **Quick Start**: Use the [production cloud](https://app.logfleet.io) - no repo cloning needed
2. **Self-Hosted**: Clone both repos and run with Docker Compose
3. **Development**: Clone both repos for full local testing

See the [Quickstart Guide](/quickstart) for step-by-step instructions.
