Skip to content

kmyokoyama/thoughts-clj

Repository files navigation

thoughts-clj CircleCI GitHub GitHub GitHub

Twitter-like API for experimentation with Clojure.

This is a toy project intended to be used as a platform for learning and experimenting with Clojure. It is like a canvas where I can try language features, libraries and tools related to back end web development with Clojure.

I've decided to build an API similar to Twitter because it is quite familiar to me (and most people). I really didn't want to spend much time thinking in business requirements and features. Instead, I wanted to focus on the tech-side (Clojure, web development concepts, back end technologies and so on).

Since the domain this project implements is well-known by many developers, this API also presents itself as an option for front end engineers who want to practice building Single-Page Applications (SPA). Simply run this back end (see Usage below), and you have a working Twitter-like API ready to respond your requests (see API below).

There are many features not implemented yet (followers, content sharing etc). I intend to add these and more features in near future.

If you have any suggestions, feel free to open an issue!

Usage

For development (ironically, its main use case), we don't even need a running instance of Datomic, since the API uses an in-memory Datomic database.

You can start the API by simply running:

$ lein run

To run tests:

$ lein test

Configuration is specified at resources/dev-config.edn.

API

Check out the current API documentation on Apiary.

Features

  • Basic Twitter-like API:
    • Signup;
    • Login;
    • Logout;
    • Post a thought;
    • Re-thought (with or without comment);
    • Like/unlike a tweet;
    • Follow/unfollow another user.
    • Retrieve feed (timeline).
  • HATEOAS makes it easy to follow related resources.
  • JWS authentication and authorization.

License

The MIT License (MIT)

Copyright © 2020 Kazuki Yokoyama

About

Twitter-based API for experimentation with Clojure

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages