Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 1.67 KB

README.md

File metadata and controls

63 lines (44 loc) · 1.67 KB

Overview

Yet another todo manager inspired by todo.txt. Pet project developed for two reasons:

The functionality is very simple - you can add, edit, delete a todo and list all todos.

Usage

CLI

lein bin
target/todo action [task_number] [task_description]

actions:
    add "task to be done"
    update 1 "task to be updated"
    delete 2
    list

REST

lein ring server

http POST :3000/todos task="do something"
http GET :3000/todos
http GET :3000/todos/1
http PUT :3000/todos/1 task="maybe tomorrow"
http DELETE :3000/todos/1

Configuration

todo.txt file location can be configured as the environment variable TODO_FILE or Java system property todo.file.

Structure

Production code

  • core - namespace todo.core
  • delivery mechanism
    • CLI - namespaces under todo.infrastructure.cli
    • REST - namespaces under todo.infrastructure.rest
  • file repository adapter - namespaces under todo.infrastructure.file

Tests

  • unit tests of core
  • integration tests of file repository adapter
  • system tests - roundtrip tests via CLI and REST. Using mainly front door (public API). Back door only for cleaning the todo file

To run all tests: lein midje or at REPL startup: lein repl

External libraries