Skip to content
Atheneum is a very simple REST API written in Go to manage collections of books.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
db refactor Set method Jun 29, 2019
handler rename handlers and models package Jul 10, 2019
model rename handlers and models package Jul 10, 2019
server
.dockerignore add Dockerfile May 8, 2019
.env.example
.gitignore
Dockerfile
LICENSE
README.md update README Jun 24, 2019
go.mod refactor handlers package Jun 27, 2019
go.sum refactor handlers package Jun 27, 2019
main.go rename handlers and models package Jul 10, 2019

README.md

Atheneum

Go Report Card Docker Pulls PRs Welcome

Atheneum is a simple CRUD API written in Go to manage personal collections of books. Easy to use, configure and extend.

Why?

I read a lot. It's one of my favorite things to do. And that's why for me it's important to have a place to organize the books I've already read or I want to read.

At first I tried with existing platforms. But some of them just seemed abandoned or I just didn't like them. Without options, I finally decided to create my own system. Atheneum.

How it works?

Atheneum creates a BoltDB database if it does not exist in which you can add books, authors and sagas that you can manage in a quick and easy way through an API.

ToDo

  • CLI.
  • Web interface.

Installation

Docker:

docker image pull danielkvist/atheneum

Go

go get github.com/danielkvist/atheneum

# Or

go install github.com/danielkvist/atheneum

Configuration

To set up Atheneum and get started you just need to create an .env file with the following fields.

DATABASE=
BOOKS_COLLECTION=
AUTHORS_COLLECTION=
SAGAS_COLLECTION=
LISTEN_ADDRESS=
API_USERNAME=
API_PASSWORD=

For example:

DATABASE=/data/atheneum.db
BOOKS_COLLECTION=books
AUTHORS_COLLECTION=authors
SAGAS_COLLECTION=sagas
LISTEN_ADDRESS=:9090
API_USERNAME=root
API_PASSWORD=toor

Usage

Docker

docker container run --name atheneum --env-file .env -v /data:/data:rw -p 9090:9090 danielkvist/atheneum

Go

atheneum

Models

Books

type Book struct {
	id          string
	Selflink    string   `json:"selflink"`
	Title       string   `json:"title"`
	Authors     []string `json:"authors"`
	Description string   `json:"description"`
	Saga        string   `json:"saga"`
	ISBN13      string   `json:"isbn13"`
	ISBN10      string   `json:"isbn10"`
	Ebook       bool     `json:"ebook"`
	Readed      bool     `json:"readed"`
	Favorite    bool     `json:"favorite"`
}

Authors

type Author struct {
	id        string   
	Selflink  string   `json:"selflink"`
	FirstName string   `json:"firstName"`
	LastName  string   `json:"lastName"`
	Nicknames []string `json:"nicknames"`
	Alive     bool     `json:"alive"`
	Bio       string   `json:"bio"`
	Work      []string `json:"work"`
	Webpage   string   `json:"webpage"`
	Wikipedia string   `json:"wikipedia"`
}

Sagas

type Saga struct {
	id          string   
	Selflink    string   `json:"selflink"`
	Name        string   `json:"name"`
	Authors     []string `json:"authors"`
	Description string   `json:"description"`
	Books       []string `json:"books"`
}
You can’t perform that action at this time.