Giter Site home page Giter Site logo

spread0x / nettu-scheduler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fmeringdal/nettu-scheduler

0.0 2.0 0.0 1.7 MB

A self-hosted calendar and scheduler server.

License: MIT License

Dockerfile 0.09% Shell 0.56% Rust 95.26% JavaScript 0.01% TypeScript 4.07%

nettu-scheduler's Introduction

logo

Nettu scheduler

MIT licensed Build status codecov

Overview

Nettu scheduler is a self-hosted calendar and scheduler server that aims to provide the building blocks for building calendar / booking apps with ease. It has a simple REST API and also a JavaScript SDK and Rust SDK.

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.
  • Metadata queries: Add key-value metadata to your resources and then query on that metadata
  • Webhooks: Notifying your server about Calendar Event reminders.

Application flow

Table of contents

Quick start

First of all we will need a running instance of the server. The quickest way to start one is with docker:

docker run -p 5000:5000 fmeringdal/nettu-scheduler:latest

or if you want to build it yourself with cargo:

cd scheduler
cargo run inmemory

Both of these methods will start the server with an inmemory data store which should never be used in production, but is good enough while just playing around. For information about setting up this server for deployment, read here.

Now when we have the server running we will need an Account. To create an Account we will need the CREATE_ACCOUNT_SECRET_CODE which you will find in the server logs during startup (it can also be set as an environment variable).

curl -X POST -H "Content-Type: application/json" -d '{"code": "REPLACE_ME"}' -v http://localhost:5000/api/v1/account

The previous command will create an Account and the associated secretApiKey which is all you need when your application is going to communicate with the Nettu Scheduler server.

Quick example of how to create and query a user

export SECRET_API_KEY="REPLACE_ME"

# 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.

Examples

Contributing

Contributions are welcome and are greatly appreciated!

License

MIT

Special thanks

  • Lemmy for inspiration on how to use cargo workspace to organize a web app in rust.
  • The author of this blog post for an excellent introduction on how to do telemetry in rust.

nettu-scheduler's People

Contributors

adyavanapalli avatar buggambit avatar fmeringdal avatar

Watchers

 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.