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

# Introduction

> Rust backend server for Zeus Finance

## Overview

The Zeus server is a high-performance Rust backend built with Axum. It provides REST APIs for the mobile app to synchronize data.

## Features

<CardGroup cols={2}>
  <Card title="High Performance" icon="bolt">
    Rust and Axum for maximum throughput
  </Card>

  <Card title="Type Safe" icon="shield-check">
    Compile-time guarantees for API contracts
  </Card>

  <Card title="PostgreSQL" icon="database">
    Reliable, ACID-compliant data storage
  </Card>

  <Card title="Docker Ready" icon="docker">
    Easy deployment with Docker Compose
  </Card>
</CardGroup>

## Tech Stack

| Component     | Technology        | Purpose                  |
| ------------- | ----------------- | ------------------------ |
| Framework     | Axum              | Web framework            |
| Database      | PostgreSQL + SQLx | Type-safe SQL            |
| Auth          | JWT               | Stateless authentication |
| Validation    | Validator         | Input validation         |
| Serialization | Serde             | JSON handling            |

## Project Structure

```
server/
├── src/
│   ├── main.rs           # Entry point
│   ├── lib.rs            # Library exports
│   ├── config/           # Configuration
│   ├── controllers/      # HTTP handlers
│   ├── db/               # Database setup
│   ├── errors/           # Error types
│   ├── middleware/       # Auth, rate limiting
│   ├── models/           # Data structures
│   ├── repositories/     # Database access
│   └── services/         # Business logic
├── migrations/           # Database migrations
├── Cargo.toml            # Dependencies
└── Dockerfile            # Container image
```

## API Design

### RESTful Resources

```
GET    /wallets           # List wallets
POST   /wallets           # Create wallet
GET    /wallets/:id       # Get wallet
PUT    /wallets/:id       # Update wallet
DELETE /wallets/:id       # Delete wallet

GET    /categories        # List categories
POST   /categories        # Create category
...

GET    /transactions      # List transactions
POST   /transactions      # Create transaction
...
```

### Response Format

Success:

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Cash",
  "currency": "USD",
  "balance": 100.00,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}
```

Error:

```json theme={null}
{
  "error": "Validation failed",
  "message": "Email is required"
}
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/server/installation">
    Set up your development environment
  </Card>

  <Card title="API Reference" icon="code" href="/server/api/authentication">
    Explore the API endpoints
  </Card>
</CardGroup>
