Skip to content

abelidze/planner-server

Repository files navigation

Planner-Server

Build Status

Planner-Server is an API-server for calendar / planner apps built on top of Spring Boot Framework.

It follows iCalendar (RFC 5545) specification with some assumptions (some stuff depends on a user of the API).

API-reference [ru | en | swagger]

All about recurrence: recurrence-overview.md

Installation

Latest

Download project as '.zip' archive and extract it to whatever you like directory or use git:

$ git clone https://github.com/abelidze/planner-server.git

Release

Visit releases page and check it for the latest release.

Requirements

  • JDK 1.8

Database

API-server comes with two JDBC dependencies: SQLite for development and PostgreSQL for production.

Assuming that it provides two different profiles:

  • development: application.properties [default]
  • production: application-prod.properties

To choose one of that profiles you can use standart Spring's command-line argument setting, e.g.:

java -jar -Dspring.profiles.active=prod server.jar`

Configuration

Before running you must do some work with configs.

Planner-Server uses Firebase for authentication and you have to configure it on your own.

You can find more information here.

  1. Create new Firebase project. More information here.
  2. Retrieve .json service account key, rename it to service_account.json and place to one of locations:
    • environment variable GOOGLE_APPLICATION_CREDENTIALS, e.g. export GOOGLE_APPLICATION_CREDENTIALS=<path_to_json>
    • {project_path}/{src}/main/resources and {project_path}/{src}/test/resources
    • near compiled server-{VERSION}.jar binary in the same directory
  3. After that you can add your applications to Firebase. More information here.

Running

Gradle / Gradle Wrapper

# Assuming you are in repo root directory
cd app && gradlew bootRun

Production

# Assuming you are in repo root directory
cd app && gradlew clean bootJar
java -jar -Dspring.profiles.active=prod ./build/libs/server-{VERSION}.jar` # replace {VERSION} with builded version

Docker-Compose

# Development
docker-compose up -d --force-recreate --remove-orphans --build

# Production
docker-compose -f docker-compose.production.yml up -d --force-recreate --remove-orphans --build

# Shutdown
docker-compose down --remove-orphans

Documentation / Swagger

Basic PROTOCOL description and information about authorization can be found there: [ ru | en ]

When server is running it provides autogenerated API-documentation with Swagger-UI.

For local development it can be accessed with:

http://localhost:8080/swagger-ui.html
# or
http://localhost/swagger-ui.html

Contact

Developers on Telegram:

https://t.me/Abelidze

License

Planner-Server is open-sourced software licensed under the MIT License.

Disclaimer

This program is provided "AS IS" without warranty of any kind.