init commit

This commit is contained in:
2026-02-17 00:23:25 -05:00
commit 79b6a5e225
25 changed files with 1648 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.12.0"}
http-kit/http-kit {:mvn/version "2.8.0"}
metosin/reitit {:mvn/version "0.7.2"}
ring/ring-core {:mvn/version "1.13.0"}
ajet/chat-shared {:local/root "../shared"}}
:aliases
{:run {:main-opts ["-m" "ajet.chat.api.core"]}
:dev {:extra-paths ["dev"]
:extra-deps {nrepl/nrepl {:mvn/version "1.3.0"}
cider/cider-nrepl {:mvn/version "0.50.2"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}}}}}
+22
View File
@@ -0,0 +1,22 @@
# API Service Plan
## Stack
- http-kit (HTTP server)
- reitit (routing) + Ring middleware
- next.jdbc + HoneySQL (via shared/)
- PostgreSQL everywhere (dev + prod)
## Responsibilities
- Stateless REST API: all reads & writes for messages, channels, users
- Only service (besides Auth GW) with a direct PG connection
- Publishes events to NATS after DB writes
- No live connections — pure request/response
- Sits behind auth gateway (all requests pre-authenticated)
## TODO
- [ ] Define reitit route table
- [ ] http-kit server setup
- [ ] Design message/channel/user API endpoints
- [ ] Ring middleware: error handling, content negotiation, request logging
- [ ] NATS publish on write (message sent, channel created, etc.)
- [ ] Database migrations
+5
View File
@@ -0,0 +1,5 @@
(ns ajet.chat.api.core
"REST API service — http-kit + reitit.")
(defn -main [& _args]
(println "ajet-chat API starting..."))