1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! HTTP route handlers for the KOReader sync API.
//!
//! This module contains all the route handlers that implement the KOReader
//! synchronization protocol. Routes are organized by functionality and
//! grouped into public (unauthenticated) and protected (authenticated) endpoints.
//!
//! # Route Modules
//!
//! ## Public Routes (No Authentication Required)
//!
//! - **[`register`]** - `POST /users/create`
//! - User registration endpoint
//!
//! - **[`robots`]** - `GET /robots.txt`
//! - Robots exclusion protocol file
//! - Instructs web crawlers not to index the API
//!
//! - **[`fallback`]** - All unmatched routes
//! - Returns 404 Not Found for invalid endpoints
//!
//! ## Protected Routes (Authentication Required)
//!
//! These routes require `x-auth-user` and `x-auth-key` headers for authentication.
//!
//! - **[`users_auth`]** - `GET /users/auth`
//! - User authentication retrieval
//! - Returns user information and last activity timestamp
//!
//! - **[`syncs_progress`]** - Progress synchronization endpoints
//! - `PUT /syncs/progress` - Update reading progress for a document
//! - `GET /syncs/progress/{document}` - Retrieve progress for a specific document
//!
//! - **[`healthcheck`]** - `GET /healthcheck`
//! - Simple health check endpoint for monitoring
//!
//! # KOReader Compatibility
//!
//! These endpoints implement the KOReader sync protocol, ensuring compatibility with the
//! KOReader's synchronization plugin. The API follows REST principles and uses JSON for
//! request/response payloads.