Skip to content

About

Example of RealMedium backend written in the userver framework

Topics

Resources

Code of conduct

Contributing

Stars

17 stars

Watchers

6 watching

Forks

Repository files navigation

RealMedium

urealmedium CI urealmedium Docker build

This is project created in summer school Yandex. This codebase was created to demonstrate a fully fledged backend application built with userver framework

Prerequisites

Use a version of userver that provides <userver/crypto/jwt.hpp>. Install userver into the system or clone it from the repository root and install its dependencies:

git clone --branch develop --depth 1 https://github.com/userver-framework/userver.git third_party/userver

The jwt component reads its HS256 secret from REALMEDIUM_JWT_SECRET at startup. It requires at least 32 bytes. Generate a key once for local use:

export REALMEDIUM_JWT_SECRET="$(openssl rand -hex 32)"

Keep the same secret across restarts and replicas. Users with tokens signed with the previous sample key must log in again.

Docker-compose

# Run service
make docker-start-service-release

Local

make service-start-release

Tests

Run unit and functional tests in docker or local.

Docker-compose

make docker-test-release

Local

make test-release

Makefile

  • make build-debug - debug build of the service with all the assertions and sanitizers enabled
  • make build-release - release build of the service with LTO
  • make test-debug - does a make build-debug and runs all the tests on the result
  • make test-release - does a make build-release and runs all the tests on the result
  • make start-debug - builds the service in debug mode and starts it
  • make start-release - builds the service in release mode and starts it
  • make or make all - builds and runs all the tests in release and debug modes
  • make format - autoformat all the C++ and Python sources
  • make clean- - cleans the object files
  • make dist-clean - clean all, including the CMake cached configurations
  • make install - does a make build-release and runs install in directory set in environment PREFIX
  • make install-debug - does a make build-debug and runs install in directory set in environment PREFIX
  • make docker-COMMAND - run make COMMAND in docker environment
  • make docker-build-debug - debug build of the service with all the assertions and sanitizers enabled in docker environment
  • make docker-test-debug - does a make build-debug and runs all the tests on the result in docker environment
  • make docker-build-release - release build of the service with all the assertions and sanitizers enabled in docker environment
  • make docker-test-release - does a make build-release and runs all the tests on the result in docker environment
  • make docker-start-release - does a make install-release and runs service in docker environment
  • make docker-start-debug - does a make install-debug and runs service in docker environment
  • make docker-clean-data - stop docker containers and clean database data

Authors project:

Manager:
Viktoriia Berkholts torina4@yandex.ru

Developers:
rumxcola rumxcola@yandex.ru
Konstantin Artemev rumxcola@yandex.ru
GasikPasik sarbash2004@gmail.com
Anna Volkova anna.mikhaylova09@yandex.ru
Nikita Semenov nikitasemenov0388@gmail.com
Vadim Romanyuk vadprof10@gmail.com
artemiev.kk artemiev.kk@infotek.ru
Elizaveta Rudneva el1zarudneva@yandex.ru

Maintainer:
Alexander Malkov alexiprof@userver.tech

About

Example of RealMedium backend written in the userver framework

Topics

Resources

Code of conduct

Contributing

Stars

17 stars

Watchers

6 watching

Forks

Used by

Contributors

Languages