Coder Social home page Coder Social logo

nittei's Introduction

Nittei

MIT licensed Release

Overview

Nittei is a self-hosted calendar and scheduler server built upon Nettu scheduler.

It supports authentication through api keys for server - server communication and JSON Web Tokens for browser - server communication.

Features

  • Booking: Create a Service and register Users on it to make them bookable.
  • Calendar Events: Supports recurrence rules, flexible querying and reminders.
  • Calendars: For grouping Calendar Events.
  • Freebusy: Find out when Users are free and when they are busy.
  • Integrations: Connect your Nettu, Google and Outlook calendars
  • Multi-tenancy: All resources are grouped by Accounts.
  • Metadata queries: Add key-value metadata to your resources and then query on that metadata
  • Webhooks: Notifying your server about Calendar Event reminders.

Quick start

Prerequisites

As this application is written in Rust, you first need to have it installed. The easiest is to use Rustup and the instructions can be found on the official website. The command is the following:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

This project uses Just as a task manager. To install it, you can use Homebrew (MacOS & Linux)

brew install just

Once Rust and Just are installed, a few more utility tools can be installed by running

just install_tools

This will compile and install

  • sqlx-cli: CLI used for applying the SQL migrations & for generating the offline files for SQLx

Initial setup

You can launch the Postgres container required for local development and execute the migration by running

just setup

Launching the server

Now we are ready to start the nittei server

just dev

There are a few environment variables that can be used to control the server.

  • DATABASE_URL allows to specify the database the server should use
  • PORT allows to specify the port to be used by the server
  • ACCOUNT_API_KEY is going to create an Account (if it does not already exist) during server startup with the given key. Accounts act as tenants in the server, and it is possible to create multiple Accounts by using the CREATE_ACCOUNT_SECRET_CODE which you can provide as an environment variable.

Quick example of how to create and query a user

export SECRET_API_KEY="REPLACE ME WITH YOUR API KEY"

# Create a user with metadata
curl -X POST -H "Content-Type: application/json" -H "x-api-key: $SECRET_API_KEY" -d '{"metadata": { "groupId": "123" }}' http://localhost:5000/api/v1/user

# Get users by metadata
curl -H "x-api-key: $SECRET_API_KEY" "http://localhost:5000/api/v1/user/meta?key=groupId&value=123"

Please see below for links to more examples.

Additional tools

You can install additional tools by running

just install_all_tools

This will install

  • cargo-outdated: CLI used to list the dependencies that are outdated
  • cargo-udeps: CLI used to list the dependencies that are unused

Examples

Contributing

Contributions are welcome and are greatly appreciated!

License

MIT

Special thanks

  • fmeringdal for the initial project. This repository is a fork adapted to our needs.

nittei's People

Contributors

fmeringdal avatar omid avatar guillaumedecmeetsmore avatar dependabot[bot] avatar adyavanapalli avatar buggambit avatar m0rfes avatar

Stargazers

Cola Chen avatar

Watchers

Lucian avatar Fumiya Karasawa avatar Hiroki Shirayanagi avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.