Backend for Codex - novel reading platform.
Codex-Backend is built in GoLang, using Gin for server and AWS-dynamoDB firestore (moving to Heroku Postgres) for database.
It is deployed on Heroku (thats why the code is in api directory).
air config is outdated and not recommended. use [Run](Run guide instead)
run server:
go run api/cmd/web/main.gogo run api/cmd/worker/main.goBoth are needed
3 Groups of endpoints: Client, Manage and User.
- Client is responsible for basic GET requests.
- Manage is responsible for Upload/Modification operations.
- User is responsible for user authentication, authorization and Registration (Delete is not yet implemented).
-
/all- Get all novels -
/:novel- Get a novel by id -
/:novel/:chapter- Get chapter from novel using both ids -
/:novel/all- Get all chapters from novel using id -
/:novel/chapter- Get cursor paginated chapters from novel using idOptions: limit (max 100), cursor (chapter index (integer)) and sort ("asc" || "desc").
Defaults: limit=100, cursor=0, sort="desc"
/upload- Upload novel/:novel- Update novel/:novel/:chapter- Update chapter
/validate- Validate user token/login- Login user/register- Register user/logout- Logout user