• Stars
    star
    7,360
  • Rank 4,963 (Top 0.2 %)
  • Language
    C++
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.

Stand With Ukraine


Oat++ Logo

 

oatpp build status Join the chat at https://gitter.im/oatpp-framework/Lobby

Oat++

News

  • ⚠️ Attention! Oat++ main repo is bumping it's version to 1.4.0. While 1.4.0 is IN DEVELOPMENT use 1.3.0-latest tag.

Oat++ is a modern Web Framework for C++. It's fully loaded and contains all necessary components for effective production level development. It's also light and has a small memory footprint.

Start

About

Join Our Community

Quick Overview

Shortcuts:

Build Powerful API And Document It With Swagger-UI

See ApiController for more details.

ENDPOINT_INFO(getUserById) {
  info->summary = "Get one User by userId";

  info->addResponse<Object<UserDto>>(Status::CODE_200, "application/json");
  info->addResponse<Object<StatusDto>>(Status::CODE_404, "application/json");
  info->addResponse<Object<StatusDto>>(Status::CODE_500, "application/json");

  info->pathParams["userId"].description = "User Identifier";
}
ENDPOINT("GET", "users/{userId}", getUserById,
         PATH(Int32, userId))
{
  return createDtoResponse(Status::CODE_200, m_userService.getUserById(userId));
}

Access Databases And Keep Your Data Consistent

See Oat++ ORM for more details.

QUERY(createUser,
      "INSERT INTO users (username, email, role) VALUES (:username, :email, :role);",
      PARAM(oatpp::String, username), 
      PARAM(oatpp::String, email), 
      PARAM(oatpp::Enum<UserRoles>::AsString, role))

Frequently Asked Questions

Q: "Oat++" name?

  • "Oat" is something light, organic, and green. It can be easily cooked and consumed with no effort.
  • "++" gives a hint that it is "something" for C++.

Q: What is the main area of Oat++ application?

Oat++ is used for many different purposes, from building REST APIs that run on embedded devices to building microservices and highly-loaded cloud applications.

But the majority of use cases appears to be in IoT and Robotics.

Q: How portable is Oat++?

Theoretically, Oat++ can be easily ported everywhere where you have threads and network stack. With an additional comparably small effort, it can be ported almost everywhere depending on how much you strip it and what would be the final binary size.

See supported platforms for additional info.

Q: What is the size of a minimal Oat++ application?

About 1Mb, depending on C/C++ std-lib and oatpp version.

Q: Which Oat++ API to choose, Simple or Async?

Always choose Simple API wherever possible. Simple API is more developed and makes the code cleaner.

Async API is designed for small, specific tasks that run at high concurrency levels ex.:

  • Serving file downloads to a large number of concurrent users (1K users and more).
  • Streaming to a large number of clients (1K or more).
  • Websocket Chat servers.

For all other purposes use simple API.

Examples

REST-API

  • REST Service - A complete example of a "CRUD" service (UserService) built with Oat++. REST + Swagger-UI + SQLite.
  • REST Client - Example project of how-to use Retrofit-like client wrapper (ApiClient) and how it works.

WebSocket

  • Can Chat - Feature-complete rooms-based chat for tens of thousands users. Client plus Server.
  • WebSocket - Collection of oatpp WebSocket examples.
  • YUV Websocket Stream - Example project how-to create a YUV image stream from a V4L device (i.E. Webcam) using websockets.

Databases

  • SQLite - A complete example of a "CRUD" service. REST + Swagger-UI + SQLite.
  • PostgreSQL - Example of a production-grade entity service storing information in PostgreSQL. With Swagger-UI and configuration profiles.
  • MongoDB - Example project how to work with MongoDB using oatpp-mongo mondule. Project is a web-service with basic CRUD and Swagger-UI.

IoT

  • Example-IoT-Hue - Example project how-to create an Philips Hue compatible REST-API that is discovered and controllable by Hue compatible Smart-Home devices like Amazon Alexa or Google Echo.

Streaming

  • HTTP Live Streaming Server - Example project on how to build an HLS-streaming server using Oat++ asynchronous API.
  • YUV Websocket Stream - Example project how-to create a YUV image stream from a V4L device (i.E. Webcam) using websockets.

TLS

  • TLS With Libressl - Example project how-to setup secure connection and serve via HTTPS.

Microservices

Asynchronous API

  • Async Service - Example project on how to use asynchronous API to handle a large number of simultaneous connections.

More Repositories

1

oatpp-examples

List of example projects of how to use oat++ framework
C++
180
star
2

benchmark-websocket

Websocket Client and Server for benchmarks with Millions of concurrent connections.
C++
93
star
3

oatpp-swagger

OpenApi 3.0.0 docs + Swagger UI for oatpp services
C++
85
star
4

example-crud

A complete example of a "CRUD" service (UserService) built with Oat++.
C++
85
star
5

oatpp-websocket

oatpp-websocket submodule.
C++
77
star
6

example-hls-media-stream

Example project how-to build HLS-streaming server using oat++ Async-API.
C++
68
star
7

oatpp-starter

Oatpp simple-API starter project
C++
63
star
8

example-websocket

Collection of oatpp WebSocket examples
C++
52
star
9

example-postgresql

A complete example of a "CRUD" service (UserService) built with Oat++ and using oatpp ORM with PostgreSQL.
C++
37
star
10

oatpp-consul

oatpp client for consul
C++
36
star
11

example-api-client

Example project how-to use oatpp ApiClient and how it works
C++
23
star
12

oatpp-starter-async

oatpp Async-API starter project.
C++
20
star
13

oatpp-sqlite

SQLite adapter for oatpp ORM.
C
18
star
14

oatpp-postgresql

PostgreSQL adapter for oatpp ORM.
C++
17
star
15

example-iot-hue-ssdp

Oat++ Example to emulate a Hue bridge using SSDP and HTTP
C++
16
star
16

example-async-api

Example project how-to use oatpp asynchronous API.
C++
15
star
17

example-microservices

Example project how to do microservices using Oat++. Different build configs and monolithization.
C++
15
star
18

helicopter

WebSocket server for multiplayer games
C++
13
star
19

website

oatpp.io public website
C++
13
star
20

oatpp-openssl

OpenSSL adaptor for Oat++ applications
C++
13
star
21

example-yuv-websocket-stream

Oat++ example on how to stream raw YUV images from V4L2 via websockets to an HTML5 canvas
C++
12
star
22

example-libressl

Example project how-to use oatpp-libressl submodule. HTTPS async server.
C++
11
star
23

example-mongodb

Example project how to work with MongoDB
C++
10
star
24

oatpp-curl

RequestExecutor for oatpp's ApiClient based on libcurl. Supports both Sync and Async APIs.
C++
9
star
25

oatpp-mbedtls

Client/Server Secure ConnectionProvider for oatpp applications. Based on MbedTLS.
C++
7
star
26

oatpp-starter-module

starter project for oatpp module
CMake
6
star
27

example-server-stop

Oatpp simple-API starter project (threaded)
C++
6
star
28

oatpp-mongo

Oat++ native BSON + MongoDB driver implementation based on Oat++ object-mapping sub-framework.
C++
6
star
29

example-jwt

A complete example of a CRUD service with API secured with JSON Web Token (JWT)
C++
5
star
30

oatpp-protobuf

Use protobuf messages as regular oatpp DTOs
C++
5
star
31

oatpp-openwrt-feed

Oat++ for OpenWRT
Makefile
4
star
32

oatpp-libressl

oatpp secure ConnectionProvider based on libressl
C++
4
star
33

benchmark

oatpp performance benchmark vs other frameworks
C++
4
star
34

oatpp-zlib

Module oatpp-zlib provides functionality for compressing/decompressing content with deflate and gzip. Supports both "Simple" and "Async" oatpp APIs.
C++
4
star
35

oatpp-kafka

oatpp client for Apache Kafka
C++
3
star
36

example-consul

Example project how-to use oatpp-consul integration module.
C++
3
star
37

oatpp-nixos-feed

Oat++ for NixOS
3
star
38

funnel-proxy

Transparent multiplexing proxy
C++
3
star
39

oatpp-wolfssl

TLS adaptor for wolfSSL
C++
2
star
40

dockerfiles

helper Dockerfiles for oatpp ops-needs
Dockerfile
2
star
41

meta-oatpp

Yocto meta-layer for Oat++
BitBake
2
star
42

oatpp-ssdp

Oat++ extension module to work with SSDP protocol.
C++
2
star
43

oatpp-xcompile

Deeper look into (cross-)compiling the Oat++ library.
1
star
44

oatpp-bob

Object-Mapper for binary serialization/deserialization
C++
1
star
45

oatpp-boringssl

BoringSSL adaptor for Oat++ applications.
1
star
46

oatpp-dtoql

C++
1
star