https://github.com/muradisazade777/logharbor
LogHarbor is a lightweight log aggregation service built with Go and Gin. It provides a fast, modular backend for collecting, storing, and querying structured log data via RESTful APIs.
https://github.com/muradisazade777/logharbor
api backend config go golang json library modules server storage testing
Last synced: 4 months ago
JSON representation
LogHarbor is a lightweight log aggregation service built with Go and Gin. It provides a fast, modular backend for collecting, storing, and querying structured log data via RESTful APIs.
- Host: GitHub
- URL: https://github.com/muradisazade777/logharbor
- Owner: MuradIsazade777
- License: other
- Created: 2025-09-26T15:31:19.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-09-26T15:37:51.000Z (4 months ago)
- Last Synced: 2025-09-26T17:38:03.795Z (4 months ago)
- Topics: api, backend, config, go, golang, json, library, modules, server, storage, testing
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LogHarbor 🚢
**LogHarbor** is a lightweight log aggregation service built with Go and Gin. Designed for speed, modularity, and scalability, it enables developers to ingest, store, and query structured log data through clean RESTful endpoints.
---
## 🔧 Features
- Fast and minimalistic Go backend using Gin
- RESTful API for log ingestion (`POST /logs`)
- Log retrieval with structured JSON output (`GET /logs`)
- In-memory storage for rapid prototyping
- Modular architecture ready for MongoDB, PostgreSQL, or Kafka integration
- Clean project structure for scalability and maintainability
---
## 📁 Project Structure
```bash
LogHarbor/
├── main.go # Entry point
├── go.mod # Module definition
├── config/ # Configuration files
├── models/ # Log data structures
├── controllers/ # HTTP handlers
├── services/ # Business logic
├── storage/ # In-memory storage
├── middleware/ # Optional logging/CORS
├── routes/ # Route definitions
├── utils/ # Helper functions
```
🚀 Getting Started
```
1. Clone the repository
bash
git clone https://github.com/yourusername/logharbor.git
cd logharbor
2. Install dependencies
bash
go mod tidy
3. Run the server
bash
go run main.go
```
Server will start on http://localhost:5000
📡 API Endpoints
POST /logs
Submit a log entry.
```
json
{
"level": "INFO",
"message": "User logged in",
"source": "auth-service",
"timestamp": "2025-09-26T19:30:00Z"
}
```
GET /logs
Retrieve all stored logs.
🧱 Built With
Go
Gin
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
✨ Author
Murad — Full-stack developer & system architect GitHub: @MuradIsazade777
🧠 Future Plans
1. MongoDB and Kafka integration
2. JWT authentication
3. Log filtering by level/source/timestamp
4. Swagger documentation
5. Dockerized deployment