au cou·rant /ˌō ˈko͝oränt/ | adjective | Aware of what is going on; well informed.
A RESTful API to keep track of and to be up-to-date on github project releases.
returns all repositories' releases info that is stored in the database.
[GET] /repos
returns a repository release info with a specific repo-name
.
[GET] /repos/:repo-name
adds a repository release info to the database.
[POST] /add-repo
Name | In | Type |
---|---|---|
owner |
query |
string |
repo-name |
query |
string |
Removes a repository release info from the database.
[DELETE] /repos/:repo-name/delete
Updates a repository release info in the database.
[PUT] /repos/:repo-name/update
Updates all repository release information in the database and returns all repositories.
[PUT] /refresh-repos
marks a repository seen state with repo-name
as seen.
[PUT] /mark-seen/:repo-name
Adds a user with a given name and password to the database. returns a JWT (JSON Web Token) for authentication.
[POST] /add-user
Name | In | Type |
---|---|---|
name |
query |
string |
password |
query |
string |
Generates the token associated with an existing user. Returns 403 if the user is not found.
[GET] /generate-token
Name | In | Type |
---|---|---|
name |
query |
string |
password |
query |
string |
Make sure leiningen is installed in your device. To run the development server:
lein run
You can also run the interactive REPL:
lein repl
This project was also built with GraalVM native image support. This allows for a tremendous startup speed.
To compile a native image of this project run:
lein native
The database that was used in this project is PostgreSQL. If you're on MacOS, install the PostgreSQL app.
To configure the database check config/db_config.json
.
{
"host": "localhost",
"user": "user",
"password": "",
"dbname": "database_name"
}
- Handle request errors
- More on the authentication, (authenticate on every request)
- Add tests/specs
- Deployment configuration
- Add a migration generator using babashka
- ...