Giter Site home page Giter Site logo

grumble-core's Introduction

Grumble backend service

About

Grumble is a chat service that is being worked on to gain a better hands-on understanding of complexities that arise during the development of backend services. Idea is to make a simple chat app with acceptable UX that would allow scaling the userbase to a real-world volumes without many issues or downtime.

Current progress

  • Authentification service
    • Storing user authentification info
    • Issuing signed JWTs and refresh tokens on login
    • Verification of previously issued JWTs to authorize users
    • Refresh token rotation
    • Refresh token revoke on logout request
    • Refresh token family revoke on reuse
  • Messaging service
    • Storing chat and message data
    • Instant updates with WebSockets
  • Document API
  • Split into smaller services
  • Initialization rework
  • Live configuration reload

API

API is currently unstable and will be documented at a later stage of the project.

Development setup

Running this project requires diesel CLI util with postgres feature.

$ cargo install diesel_cli --no-default-features --features postgres

To run this project you also have to have postgres service running in the background. Consult postgres documentation for your system on how to do that.

Authentification service needs a dedicated key pair for signing and verifying user authentification tokens. Currently only ed25519 keys are supported (subject to change, more keys will be supported after initialization process rework).

Note: Following step is also a subject to change, as a dedicated configuration file is likely to be introduced.

Once everything is set up and running, copy .env.example file to .env in the project root directory.

$ cp .env.example .env

And update it's contents according to your setup.

Variables:

  • DATABASE_URL - URL to connect to your running Postgres instance;
  • BIND_ADDRESS - An IP address and port that running service will use;
  • PHASH_SECRET_KEY - Extra secret key used during password hashing, can be left empty for dev setup;
  • AUTH_PRIVATE_KEY_PATH - Path to private key used for signing auth tokens;
  • AUTH_PUBLIC_KEY_PATH - Path to public key used for verifying auth tokens;
  • RUST_LOG - Rust log level, for more info on allowed values see env_logger crate documentation.

After updating .env file you can test and run the project with cargo.

$ cargo test
$ cargo run

grumble-core's People

Contributors

anfid avatar

Watchers

 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.