Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

SaltyNote/saltynote-service

Repository files navigation

SaltyNote Service

Maven Report Deploy CodeFactor Codacy Badge FOSSA Status

Website

Please see https://github.com/SaltyNote/saltynote-service-kotlin for further updates!

Overview

This is the backend service for saltynote. It uses JWT for authentication(access token & refresh token). As high-level, this service provides APIs for:

  1. User (signup, login, token refresh, token cleanup, password reset, account delete)
  2. Note (create, update, fetch and delete)

overview

Unit Test Coverage report: https://saltynote.github.io/saltynote-service/jacoco/

Try with Docker

Due to different storage engines, there are TWO docker-compose files, one for mongo and the other for mariadb.

# For mariadb, please run:
docker compose -f docker-compose-mariadb.yml -p saltynote-service-mariadb up

# For mongodb, please run:
docker compose -f docker-compose-mongo.yml -p saltynote-service-mongo up

When it is ready, you can visit http://localhost:8888, it should response with the payload below.

{
   "status": "OK",
   "message": "Welcome to SaltyNote!"
}

Get Started

This is a standard spring boot project with Maven, so you can use generic maven command to run it. While the simplest & quickest way is to run ./start.sh.

Swagger UI will be available at http://localhost:8888/swagger-ui.html (Screenshot for User APIs) swagger-ui

Prerequisite

  1. Java 17 (due to Spring Boot v3)
  2. Docker (docker compose) for setting up development dependencies, e.g. database, redis, etc.
  3. IDE (Eclipse or Intellij)

Configuration

  1. The service relies on database to store user and note information. In development env, you can run docker compose up to start mongo(storage) and redis(cache) locally(add -d if you want start it as “detached” mode).
  2. This service also need smtp service to send email(Note: this is optional now, if not setup, the email payload will be logged(code).).

License

saltynote service is licensed under MIT - LICENSE