diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index aaeb9f5..46a4f78 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,13 +2,13 @@ blank_issues_enabled: false contact_links: - name: Discussions - Ideas - url: https://github.com/lev2p1/lightlib/discussions/categories/ideas + url: https://github.com/lev2p1/brazier/discussions/categories/ideas about: Share and discuss new feature ideas - name: Documentation - url: https://github.com/lev2p1/lightlib/wiki + url: https://github.com/lev2p1/brazier/wiki about: Read the official documentation - name: Security Issues - url: https://github.com/lev2p1/lightlib/security/advisories + url: https://github.com/lev2p1/brazier/security/advisories about: Report security vulnerabilities privately \ No newline at end of file diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 4e8fa9e..0439ff0 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -64,7 +64,7 @@ jobs: -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} -DBUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake - -S Light + -S brazier - name: Build run: cmake --build build --config ${{ matrix.build_type }} @@ -72,14 +72,14 @@ jobs: - name: Create config_test.json working-directory: build run: | - echo '{"app_name": "LightlibApp"}' > config_test.json + echo '{"app_name": "brazierApp"}' > config_test.json mkdir -p ${{ matrix.build_type }} cp config_test.json ${{ matrix.build_type }}/ shell: bash - name: Run tests working-directory: build - run: ./lightlib_tests + run: ./brazier_tests shell: bash windows: @@ -117,7 +117,7 @@ jobs: -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} -DBUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake - -S Light + -S brazier - name: Build run: cmake --build build --config ${{ matrix.build_type }} @@ -136,14 +136,14 @@ jobs: - name: Create config_test.json working-directory: build run: | - echo '{"app_name": "LightlibApp"}' > config_test.json + echo '{"app_name": "brazierApp"}' > config_test.json mkdir -p ${{ matrix.build_type }} cp config_test.json ${{ matrix.build_type }}/ shell: bash - name: Run tests working-directory: build - run: ./${{ matrix.build_type }}/lightlib_tests.exe + run: ./${{ matrix.build_type }}/brazier_tests.exe shell: bash macos: @@ -184,7 +184,7 @@ jobs: -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} -DBUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake - -S Light + -S brazier - name: Build run: cmake --build build --config ${{ matrix.build_type }} @@ -192,12 +192,12 @@ jobs: - name: Create config_test.json working-directory: build run: | - echo '{"app_name": "LightlibApp"}' > config_test.json + echo '{"app_name": "brazierApp"}' > config_test.json mkdir -p ${{ matrix.build_type }} cp config_test.json ${{ matrix.build_type }}/ shell: bash - name: Run tests working-directory: build - run: ./lightlib_tests --gtest_filter=-RoutingTest.* + run: ./brazier_tests --gtest_filter=-RoutingTest.* shell: bash \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 0ad28f1..bf17db4 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,7 +2,7 @@ ## Our Pledge -We as members, contributors, and leaders of the **lightlib** project pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. +We as members, contributors, and leaders of the **brazier** project pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. @@ -36,7 +36,7 @@ This Code of Conduct applies within all community spaces, and also applies when ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at **hello@lightlib.org**. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at **hello@brazier.org**. All complaints will be reviewed and investigated promptly and fairly. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df8c821..5c61b5c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,13 +1,13 @@ -# Contributing to lightlib +# Contributing to brazier - First off, thank you for considering contributing to lightlib. It's people - like you that make lightlib a great tool. + First off, thank you for considering contributing to brazier. It's people + like you that make brazier a great tool. ## Code of Conduct - This project and everyone participating in it is governed by the lightlib + This project and everyone participating in it is governed by the brazier Code of Conduct. By participating, you are expected to uphold this code. - Please report unacceptable behavior to **hello@lightlib.org**. + Please report unacceptable behavior to **hello@brazier.org**. ## How Can I Contribute? @@ -24,7 +24,7 @@ - Include code snippets or links to repositories that demonstrate the issue **Please do not report security vulnerabilities in public issues!** - Instead, report by email to **hello@lightlib.org** with `[SECURITY]` in the + Instead, report by email to **hello@brazier.org** with `[SECURITY]` in the subject line. ### Suggesting Enhancements @@ -53,11 +53,11 @@ ## Getting Started 1. Fork the repository on GitHub: - `https://github.com/lev2p1/lightlib` + `https://github.com/lev2p1/brazier` 2. Clone your fork: ```bash - git clone https:github.ru/your-username/lightlib.git - cd lightlib + git clone https:github.ru/your-username/brazier.git + cd brazier ``` 3. Build the project using CMake and vcpkg: ```bash @@ -73,7 +73,7 @@ ### C++ Style Guide - Based on the existing lightlib code style (see `Model.hpp` for reference): + Based on the existing brazier code style (see `Model.hpp` for reference): - Use 4 spaces for indentation (not tabs) - Use `snake_case` for functions and variables @@ -86,7 +86,7 @@ 1. Corresponding header for the .cpp file 2. C++ standard library headers (``, ``, ``, etc.) 3. Third-party library headers (``) - 4. lightlib internal headers (`Database.hpp`, `Logger.hpp`, etc.) + 4. brazier internal headers (`Database.hpp`, `Logger.hpp`, etc.) ### Required License Header @@ -97,20 +97,20 @@ * Copyright (c) 2025 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ ``` @@ -132,7 +132,7 @@ Following the pattern from `Model.hpp`: ```cpp - namespace lightlib { + namespace brazier { template class Model { @@ -156,7 +156,7 @@ std::map attributes; }; - } namespace lightlib + } namespace brazier ``` ## Sign Your Commits @@ -170,7 +170,7 @@ The sign-off line should look like: ``` - Signed-off-by: Kirill Sergeev + Signed-off-by: Kirill Sergeev ``` By signing off, you agree to the @@ -218,9 +218,9 @@ ## License - By contributing to lightlib, you agree that your contributions will be + By contributing to brazier, you agree that your contributions will be licensed under LGPL-3.0-or-later. ---------------------------------------------------------------------------- - Thank you for contributing to lightlib! + Thank you for contributing to brazier! ----------------------------------------------------------------------------*/*/ \ No newline at end of file diff --git a/Light/app/Main.cpp b/Light/app/Main.cpp deleted file mode 100644 index 5b5d14f..0000000 --- a/Light/app/Main.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov - * SPDX-License-Identifier: LGPL-3.0-or-later - * - * This file is part of lightlib. - * - * lightlib is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * lightlib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . - */ - -#include "../include/lightlib/Core" -#include "../include/lightlib/DB" -#include "../include/lightlib/Http" -#include "../include/lightlib/Engine.hpp" - -int main() { - try { - lightlib::ConfigManager::initGlobal("config_test.json"); - lightlib::global_config->setAutoSave(false); - - std::string server_host = lightlib::global_config->get("server.host", "0.0.0.0"); - int server_port = lightlib::global_config->get("server.port", 3502); - - lightlib::Logger::log("server updated host: " + server_host, "INFO"); - lightlib::Logger::log("server new host: " + std::to_string(server_port), "INFO"); - - lightlib::Server server(server_host, server_port); - server.run(); - return 0; - } - catch (const std::exception& e) { - std::cerr << "Fatal error: " << e.what() << std::endl; - lightlib::Logger::log(std::string(e.what()), "ERROR"); - return 1; - } -} \ No newline at end of file diff --git a/Light/src/Filesystem/Filesystem.cpp b/Light/src/Filesystem/Filesystem.cpp deleted file mode 100644 index 91c1768..0000000 --- a/Light/src/Filesystem/Filesystem.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov - * SPDX-License-Identifier: LGPL-3.0-or-later - * - * This file is part of lightlib. - * - * lightlib is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * lightlib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . - */ - -#include "../../include/lightlib/Filesystem/Filesystem.hpp" - -lightlib::Filesystem::Filesystem() - : driver_(StorageManager::getInstance().getDefaultDriver()) - , driverName_("default") -{ - if (!driver_) { - throw std::runtime_error("No default driver registered"); - } -} - -lightlib::Filesystem::Filesystem(const std::string& name) - : driver_(StorageManager::getInstance().getDriver(name)) - , driverName_(name) -{ - if (!driver_) { - throw std::runtime_error("Driver not found: " + name); - } -} - -lightlib::Filesystem::Filesystem(std::shared_ptr driver) - : driver_(driver) - , driverName_("custom") -{ - if (!driver_) { - throw std::runtime_error("Driver is null"); - } -} - -lightlib::Filesystem lightlib::Filesystem::driver(const std::string& name) { - return lightlib::Filesystem(name); -} - -bool lightlib::Filesystem::hasDriver(const std::string& name) { - return lightlib::StorageManager::getInstance().hasDriver(name); -} - -std::string lightlib::Filesystem::getDriverName() const { - return driverName_; -} - -std::string lightlib::Filesystem::getDriverType() const { - return driver_->getDriverType(); -} - -void lightlib::Filesystem::put(const std::string& path, const std::string& content) { - driver_->put(path, content); -} - -std::string lightlib::Filesystem::get(const std::string& path) { - return driver_->get(path); -} - -bool lightlib::Filesystem::exists(const std::string& path) const { - return driver_->exists(path); -} - -void lightlib::Filesystem::deleteFile(const std::string& path) { - driver_->deleteFile(path); -} - -void lightlib::Filesystem::copy(const std::string& source, const std::string& destination) { - driver_->copy(source, destination); -} - -void lightlib::Filesystem::move(const std::string& source, const std::string& destination) { - driver_->move(source, destination); -} - -boost::asio::awaitable lightlib::Filesystem::putAsync(const std::string& path, const std::string& content) { - co_await driver_->putAsync(path, content); -} - -boost::asio::awaitable lightlib::Filesystem::getAsync(const std::string& path) { - co_return co_await driver_->getAsync(path); -} - -boost::asio::awaitable lightlib::Filesystem::existsAsync(const std::string& path) const { - co_return co_await driver_->existsAsync(path); -} - -boost::asio::awaitable lightlib::Filesystem::deleteFileAsync(const std::string& path) { - co_await driver_->deleteFileAsync(path); -} - -boost::asio::awaitable lightlib::Filesystem::copyAsync(const std::string& source, const std::string& destination) { - co_await driver_->copyAsync(source, destination); -} - -boost::asio::awaitable lightlib::Filesystem::moveAsync(const std::string& source, const std::string& destination) { - co_await driver_->moveAsync(source, destination); -} - -std::shared_ptr lightlib::Filesystem::getDriver() const { - return driver_; -} \ No newline at end of file diff --git a/Light/tests/unit/configuration/config_test.cpp b/Light/tests/unit/configuration/config_test.cpp deleted file mode 100644 index cd2481a..0000000 --- a/Light/tests/unit/configuration/config_test.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov - * SPDX-License-Identifier: LGPL-3.0-or-later - * - * This file is part of lightlib. - * - * lightlib is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * lightlib is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . - */ - -#include -#include -#include "../../../include/lightlib/Core" - -TEST(ConfigTest, LoadConfig) { - lightlib::ConfigManager::initGlobal(); - bool is_nullptr = lightlib::global_config == nullptr; - - EXPECT_FALSE(is_nullptr); -} - -TEST(ConfigTest, GetConfigValue) { - lightlib::ConfigManager::initGlobal("config_test.json"); - std::string value = lightlib::global_config->get("app_name", "default_app"); - EXPECT_EQ(value, "LightlibApp"); -} - -TEST(ConfigTest, SetConfigValue) { - lightlib::ConfigManager::initGlobal("config_test.json"); - lightlib::global_config->set("app_name", "NewLightApp"); - - std::string value = lightlib::global_config->get("app_name", "default_app"); - - EXPECT_EQ(value, "NewLightApp"); -} - -TEST(ConfigTest, RemoveConfigValue) { - lightlib::ConfigManager::initGlobal("config_test.json"); - lightlib::global_config->remove("app_name"); - std::string value = lightlib::global_config->get("app_name", "default_app"); - - EXPECT_EQ(value, "default_app"); -} - -TEST(ConfigTest, HasConfigValue) { - lightlib::ConfigManager::initGlobal("config_test.json"); - lightlib::global_config->remove("app_name"); - bool has_value = lightlib::global_config->has("app_name"); - - EXPECT_FALSE(has_value); -} - -TEST(ConfigTest, GetKeysWithPrefix) { - lightlib::ConfigManager::initGlobal("config_test.json"); - lightlib::global_config->set("server.host", "0.0.0.0"); - lightlib::global_config->set("server.port", 3502); - nlohmann::json keys = lightlib::global_config->getNestedJson("server"); - - EXPECT_EQ(keys["host"], "0.0.0.0"); - EXPECT_EQ(keys["port"], 3502); -} - -TEST(ConfigTest, ClearConfig) { - lightlib::ConfigManager::initGlobal("config_test.json"); - lightlib::global_config->clear(); - std::string value = lightlib::global_config->get("app_name", "default_app"); - - EXPECT_EQ(value, "default_app"); -} - -TEST(ConfigTest, ReloadConfig) { - lightlib::ConfigManager::initGlobal("config_test.json"); - lightlib::global_config->set("app_name", "TempApp"); - lightlib::global_config->reload(); - std::string value = lightlib::global_config->get("app_name", "default_app"); - - EXPECT_EQ(value, "LightlibApp"); -} \ No newline at end of file diff --git a/README.md b/README.md index ce75b06..2f15346 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# lightlib Framework +# brazier Framework -lightlib is a modern C++ MVC framework designed for creating high-performance asynchronous APIs. +brazier is a modern C++ MVC framework designed for creating high-performance asynchronous APIs. The framework combines the power of Boost.Asio with modern C++20/23 features. ## Features @@ -22,7 +22,7 @@ The framework combines the power of Boost.Asio with modern C++20/23 features. - **vcpkg** (C++ dependency manager) - **C++ compiler** with C++20 support (GCC 10+, Clang 10+, MSVC 2019 16.8+) - **.env file** with environment configuration -- **lightlib libraries** (pre-built) +- **brazier libraries** (pre-built) ### **Supported platforms:** @@ -40,7 +40,7 @@ your_project/ ├── your_project/ │ └── Proj.cpp # Main application file ├── libs/ -│ └── lightlib/ +│ └── brazier/ │ ├── x64-windows/ # Windows libraries │ └── x64-linux/ # Linux libraries └── include/ # Header files @@ -81,33 +81,33 @@ find_package(OpenSSL REQUIRED) # Add all the other packages you need here if(WIN32) - set(lightlib_DIR "${CMAKE_SOURCE_DIR}/libs/lightlib/x64-windows") + set(brazier_DIR "${CMAKE_SOURCE_DIR}/libs/brazier/x64-windows") elseif(UNIX) - set(lightlib_DIR "${CMAKE_SOURCE_DIR}/libs/lightlib/x64-linux") + set(brazier_DIR "${CMAKE_SOURCE_DIR}/libs/brazier/x64-linux") endif() -add_library(lightlib SHARED IMPORTED) +add_library(brazier SHARED IMPORTED) if(WIN32) - set_target_properties(lightlib PROPERTIES - IMPORTED_IMPLIB "${lightlib_DIR}/lib/lightlib.lib" - IMPORTED_LOCATION "${lightlib_DIR}/bin/lightlib.dll" - INTERFACE_INCLUDE_DIRECTORIES "${lightlib_DIR}/include" + set_target_properties(brazier PROPERTIES + IMPORTED_IMPLIB "${brazier_DIR}/lib/brazier.lib" + IMPORTED_LOCATION "${brazier_DIR}/bin/brazier.dll" + INTERFACE_INCLUDE_DIRECTORIES "${brazier_DIR}/include" ) elseif(UNIX) - set_target_properties(lightlib PROPERTIES - IMPORTED_IMPLIB "${lightlib_DIR}/lib/liblightlib.a" - IMPORTED_LOCATION "${lightlib_DIR}/bin/liblightlib.dylib" - INTERFACE_INCLUDE_DIRECTORIES "${lightlib_DIR}/include" + set_target_properties(brazier PROPERTIES + IMPORTED_IMPLIB "${brazier_DIR}/lib/libbrazier.a" + IMPORTED_LOCATION "${brazier_DIR}/bin/libbrazier.dylib" + INTERFACE_INCLUDE_DIRECTORIES "${brazier_DIR}/include" ) endif() -target_include_directories(lightlib INTERFACE - "${lightlib_DIR}" - "${lightlib_DIR}/include" +target_include_directories(brazier INTERFACE + "${brazier_DIR}" + "${brazier_DIR}/include" ) -target_link_libraries(lightlib INTERFACE +target_link_libraries(brazier INTERFACE Boost::beast Boost::asio Boost::filesystem @@ -131,7 +131,7 @@ target_link_libraries(lightlib INTERFACE ) add_executable(${PROJECT_NAME} ${PROJECT_NAME}/${PROJECT_NAME}.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE lightlib) +target_link_libraries(${PROJECT_NAME} PRIVATE brazier) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/include @@ -145,18 +145,18 @@ if(WIN32) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - "${lightlib_DIR}/bin/lightlib.dll" + "${brazier_DIR}/bin/brazier.dll" $ - COMMENT "Copying lightlib.dll to output directory" + COMMENT "Copying brazier.dll to output directory" ) elseif(UNIX) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy - "${lightlib_DIR}/bin/liblightlib.dylib" + "${brazier_DIR}/bin/libbrazier.dylib" $ - COMMENT "Copying liblightlib.dylib to output directory" + COMMENT "Copying libbrazier.dylib to output directory" ) endif() ``` @@ -200,11 +200,11 @@ Add all the other packages you need to the end of the list sh build.sh ``` -## lightlib configuration +## brazier configuration ### Overview -`ConfigManager` is a flexible configuration management system in lightlib that provides: +`ConfigManager` is a flexible configuration management system in brazier that provides: - Loading configuration from JSON files - Working with nested parameters using dot notation - Automatic saving of changes @@ -254,7 +254,7 @@ sh build.sh To initialize the global configuration manager, you need to run `ConfigManager::initGlobal()` at the beginning of program execution. ```cpp -#include +#include int main() { ConfigManager::initGlobal(); @@ -262,7 +262,7 @@ int main() { std::string host = global_config->get("server.host", "127.0.0.1"); int port = global_config->get("server.port", 3501); - lightlib::Server server(host, port); + brazier::Server server(host, port); server.initialize(); server.run(); @@ -288,9 +288,9 @@ config.setAutoSave(true); // Auto-save on changes config.setAutoSave(false); // Manual save only config.clear(); // Clear all values ``` -## lightlib Logging System +## brazier Logging System -lightlib provides a high-performance logging system with colored output, log rotation, and signal handling. +brazier provides a high-performance logging system with colored output, log rotation, and signal handling. Logging is done both to file and console with color coding. @@ -366,11 +366,11 @@ Logger::log("Security audit", "AUDIT"); 2024-01-15 14:30:27 [ERROR] Connection timeout ``` -The lightlib logging system is ready for use in production environments and provides all necessary functions for effective application monitoring and debugging. +The brazier logging system is ready for use in production environments and provides all necessary functions for effective application monitoring and debugging. -## lightlib Routing System +## brazier Routing System -lightlib provides a powerful routing system with support for asynchronous handlers, parameterized paths, and CORS. +brazier provides a powerful routing system with support for asynchronous handlers, parameterized paths, and CORS. The system is built on Boost.Beast and Boost.Asio coroutines. ### 1. Router @@ -472,9 +472,9 @@ boost::asio::awaitable createUser(const Request& req, Response& res, const } ``` -## lightlib WebSocket Routing System +## brazier WebSocket Routing System -lightlib provides a complete WebSocket routing system with support for parameterized paths, multiple message types, and global handlers. The system integrates seamlessly with the existing HTTP router. +brazier provides a complete WebSocket routing system with support for parameterized paths, multiple message types, and global handlers. The system integrates seamlessly with the existing HTTP router. ### WebSocket Router @@ -690,19 +690,19 @@ Find matching route Close and Error: route + global both called ``` -## Controllers in lightlib Framework +## Controllers in brazier Framework -Controllers in lightlib are central components that handle HTTP requests and return responses. +Controllers in brazier are central components that handle HTTP requests and return responses. They implement application business logic, work with data models, and form HTTP responses. ### Base structure ```cpp -#include -#include -#include +#include +#include +#include -class UserController : public lightlib::Controller { +class UserController : public brazier::Controller { public: using Request = http::request; using Response = http::response; @@ -739,7 +739,7 @@ You can override the REST methods. #### Overriding REST methods: ```cpp -class UserController : public lightlib::Controller { +class UserController : public brazier::Controller { public: // GET /users/:id - Get single user boost::asio::awaitable show(const Request& req, Response& res, const Params& params) override { @@ -798,7 +798,7 @@ public: You can add any number of custom methods beyond the base REST methods: ```cpp -class UserController : public lightlib::Controller { +class UserController : public brazier::Controller { public: // Custom method - not in base Controller boost::asio::awaitable login(const Request& req, Response& res, const Params& params) { @@ -865,7 +865,7 @@ void Controller::setCorsHeaders(const Request& req, Response& res) { #### Overriding CORS for specific controllers ```cpp -class ApiController : public lightlib::Controller { +class ApiController : public brazier::Controller { public: void setCors(const Request& req, Response& res) override { // Restrict to specific origin @@ -877,7 +877,7 @@ public: } }; -class PublicController : public lightlib::Controller { +class PublicController : public brazier::Controller { public: void setCors(const Request& req, Response& res) override { // Allow any origin (public API) @@ -1085,9 +1085,9 @@ res.set("X-RateLimit-Limit", "100"); res.set("X-RateLimit-Remaining", "95"); ``` -## Helpers in lightlib Framework +## Helpers in brazier Framework -lightlib provides a comprehensive set of utility classes (helpers) for common tasks: +brazier provides a comprehensive set of utility classes (helpers) for common tasks: - working with cookies; - code generation; - data validation; @@ -1113,7 +1113,7 @@ Generate random codes for various purposes: verification codes, one-time passwor Single code generation ```cpp -#include +#include // Alphanumeric code (letters + digits) std::string verificationCode = Code::generateRandomCode(16); @@ -1185,7 +1185,7 @@ Simplified HTTP cookie handling: parsing cookies from requests and setting cooki **Parsing cookies from request** ```cpp -#include +#include boost::asio::awaitable show(const Request& req, Response& res, const Params& params) { // Get cookie header from request @@ -1233,7 +1233,7 @@ boost::asio::awaitable login(const Request& req, Response& res, const Para **Complete authentication example** ```cpp -class AuthController : public lightlib::Controller { +class AuthController : public brazier::Controller { public: boost::asio::awaitable login(const Request& req, Response& res, const Params& params) { auto body = nlohmann::json::parse(req.body()); @@ -1299,7 +1299,7 @@ Validate user input data: passwords, email addresses, and other common data type **Basic validation** ```cpp -#include +#include // Password validation if (Validator::password("MySecure123!")) { @@ -1400,7 +1400,7 @@ if (!error.empty()) { Include the header: ```cpp - #include + #include ``` All request calls must be performed inside a coroutine launched via `net::co_spawn` or similar. @@ -1408,11 +1408,11 @@ if (!error.empty()) { #### Basic GET Request ```cpp - #include + #include #include #include - using namespace lightlib; + using namespace brazier; net::awaitable fetch_users() { HttpClient client; @@ -1556,7 +1556,7 @@ The SmtpClient uses environment variables for configuration: **Basic email sending** ```cpp -#include +#include boost::asio::awaitable sendEmail(const Request& req, Response& res, const Params& params) { SmtpClient smtp; @@ -1629,7 +1629,7 @@ boost::asio::awaitable sendVerificationEmail(const std::string& email, con **Complete registration with email** ```cpp -class AuthController : public lightlib::Controller { +class AuthController : public brazier::Controller { public: boost::asio::awaitable register(const Request& req, Response& res, const Params& params) { auto body = nlohmann::json::parse(req.body()); diff --git a/SECURITY.md b/SECURITY.md index 2003ebf..9f438bd 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -11,7 +11,7 @@ **Please do not report security vulnerabilities through public issues.** -Instead, report them by email to: **hello@lightlib.org** +Instead, report them by email to: **hello@brazier.org** ### What to Include @@ -54,7 +54,7 @@ We follow coordinated disclosure: ### In Scope -- Vulnerabilities in lightlib source code +- Vulnerabilities in brazier source code - Security issues in build configuration - Dependency vulnerabilities (reported to us, we will update) @@ -78,8 +78,8 @@ Credit can be anonymous if requested. ## License -lightlib is licensed under LGPL-3.0-or-later. +brazier is licensed under LGPL-3.0-or-later. --- -Thank you for helping keep lightlib and its users safe. \ No newline at end of file +Thank you for helping keep brazier and its users safe. \ No newline at end of file diff --git a/Light/.env.example b/brazier/.env.example similarity index 100% rename from Light/.env.example rename to brazier/.env.example diff --git a/Light/.gitignore b/brazier/.gitignore similarity index 100% rename from Light/.gitignore rename to brazier/.gitignore diff --git a/Light/CMakeLists.txt b/brazier/CMakeLists.txt similarity index 59% rename from Light/CMakeLists.txt rename to brazier/CMakeLists.txt index 471f861..d0391f3 100644 --- a/Light/CMakeLists.txt +++ b/brazier/CMakeLists.txt @@ -1,6 +1,6 @@ # SPDX-License-Identifier: LGPL-3.0-or-later cmake_minimum_required(VERSION 3.14) -project(lightlib VERSION 0.1.5 LANGUAGES CXX) +project(brazier VERSION 0.1.5 LANGUAGES CXX) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_CXX_STANDARD 20) @@ -56,11 +56,11 @@ file(GLOB_RECURSE PROJECT_SOURCES ) list(FILTER PROJECT_SOURCES EXCLUDE REGEX "app/Main\\.cpp$") -add_library(lightlib_objects OBJECT ${PROJECT_SOURCES}) +add_library(brazier_objects OBJECT ${PROJECT_SOURCES}) -target_link_libraries(lightlib_objects PUBLIC Boost::boost) +target_link_libraries(brazier_objects PUBLIC Boost::boost) -target_include_directories(lightlib_objects PRIVATE +target_include_directories(brazier_objects PRIVATE ${fmt_INCLUDE_DIRS} ${nlohmann_json_INCLUDE_DIRS} ${hiredis_INCLUDE_DIRS} @@ -70,12 +70,12 @@ target_include_directories(lightlib_objects PRIVATE ${GTEST_INCLUDE_DIRS} ) -target_include_directories(lightlib_objects PUBLIC +target_include_directories(brazier_objects PUBLIC $ $ ) -target_include_directories(lightlib_objects PRIVATE +target_include_directories(brazier_objects PRIVATE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/vendor ${CMAKE_SOURCE_DIR}/Database @@ -83,49 +83,49 @@ target_include_directories(lightlib_objects PRIVATE ${CMAKE_SOURCE_DIR}/App ${CMAKE_SOURCE_DIR}/Storage ) -target_compile_features(lightlib_objects PUBLIC cxx_std_20) -target_compile_definitions(lightlib_objects PUBLIC +target_compile_features(brazier_objects PUBLIC cxx_std_20) +target_compile_definitions(brazier_objects PUBLIC BOOST_ASIO_HAS_CO_AWAIT BOOST_ASIO_HAS_STD_COROUTINE ) -target_compile_features(lightlib_objects PUBLIC cxx_std_20) -target_compile_definitions(lightlib_objects PUBLIC +target_compile_features(brazier_objects PUBLIC cxx_std_20) +target_compile_definitions(brazier_objects PUBLIC BOOST_ASIO_HAS_CO_AWAIT BOOST_ASIO_HAS_STD_COROUTINE ) -set_target_properties(lightlib_objects PROPERTIES +set_target_properties(brazier_objects PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 8 ) -add_library(lightlib_static STATIC $) -add_library(lightlib_shared SHARED $) +add_library(brazier_static STATIC $) +add_library(brazier_shared SHARED $) if(MSVC) - set_target_properties(lightlib_shared PROPERTIES + set_target_properties(brazier_shared PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON ) endif() -target_compile_definitions(lightlib_shared PRIVATE LIGHTLIB_EXPORTS) -target_compile_definitions(lightlib_shared PUBLIC LIGHTLIB_SHARED) -target_compile_definitions(lightlib_static PUBLIC) +target_compile_definitions(brazier_shared PRIVATE brazier_EXPORTS) +target_compile_definitions(brazier_shared PUBLIC brazier_SHARED) +target_compile_definitions(brazier_static PUBLIC) -set_target_properties(lightlib_shared PROPERTIES POSITION_INDEPENDENT_CODE ON) +set_target_properties(brazier_shared PROPERTIES POSITION_INDEPENDENT_CODE ON) -target_link_libraries(lightlib_static PUBLIC ${LIBRARIES}) -target_link_libraries(lightlib_shared PUBLIC ${LIBRARIES}) +target_link_libraries(brazier_static PUBLIC ${LIBRARIES}) +target_link_libraries(brazier_shared PUBLIC ${LIBRARIES}) -export(TARGETS lightlib_static lightlib_shared - NAMESPACE lightlib:: - FILE "${CMAKE_CURRENT_BINARY_DIR}/lightlibTargets.cmake" +export(TARGETS brazier_static brazier_shared + NAMESPACE brazier:: + FILE "${CMAKE_CURRENT_BINARY_DIR}/brazierTargets.cmake" ) -add_executable(lightlib_app app/Main.cpp) +add_executable(brazier_app app/Main.cpp) -target_include_directories(lightlib_app PRIVATE +target_include_directories(brazier_app PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/vendor @@ -135,51 +135,51 @@ target_include_directories(lightlib_app PRIVATE ${CMAKE_SOURCE_DIR}/Storage ) -target_compile_features(lightlib_app PRIVATE cxx_std_20) +target_compile_features(brazier_app PRIVATE cxx_std_20) -target_compile_definitions(lightlib_app PRIVATE +target_compile_definitions(brazier_app PRIVATE BOOST_ASIO_HAS_CO_AWAIT BOOST_ASIO_HAS_STD_COROUTINE ) -target_link_libraries(lightlib_app PRIVATE - lightlib_static +target_link_libraries(brazier_app PRIVATE + brazier_static ${LIBRARIES} ) -add_library(lightlib INTERFACE) -target_link_libraries(lightlib INTERFACE - lightlib_static - lightlib_shared +add_library(brazier INTERFACE) +target_link_libraries(brazier INTERFACE + brazier_static + brazier_shared ) -install(TARGETS lightlib_static - EXPORT lightlibTargets +install(TARGETS brazier_static + EXPORT brazierTargets ARCHIVE DESTINATION lib ) -install(TARGETS lightlib_shared - EXPORT lightlibTargets +install(TARGETS brazier_shared + EXPORT brazierTargets LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib ) -install(TARGETS lightlib - EXPORT lightlibTargets +install(TARGETS brazier + EXPORT brazierTargets ) install(DIRECTORY include/ DESTINATION include) -install(EXPORT lightlibTargets - NAMESPACE lightlib:: - DESTINATION share/lightlib - FILE lightlibTargets.cmake +install(EXPORT brazierTargets + NAMESPACE brazier:: + DESTINATION share/brazier + FILE brazierTargets.cmake ) install( - FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmake/lightlibConfig.cmake" - DESTINATION share/lightlib + FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmake/brazierConfig.cmake" + DESTINATION share/brazier ) option(BUILD_TESTS "Build tests" ON) @@ -193,9 +193,9 @@ if(BUILD_TESTS) file(GLOB_RECURSE TEST_SOURCES "tests/*.cpp") - add_executable(lightlib_tests ${TEST_SOURCES}) + add_executable(brazier_tests ${TEST_SOURCES}) - target_include_directories(lightlib_tests PRIVATE + target_include_directories(brazier_tests PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests @@ -208,15 +208,15 @@ if(BUILD_TESTS) ${GTEST_INCLUDE_DIRS} ) - target_compile_definitions(lightlib_tests PRIVATE + target_compile_definitions(brazier_tests PRIVATE BOOST_ASIO_HAS_CO_AWAIT BOOST_ASIO_HAS_STD_COROUTINE ) - target_compile_features(lightlib_tests PRIVATE cxx_std_20) + target_compile_features(brazier_tests PRIVATE cxx_std_20) - target_link_libraries(lightlib_tests PRIVATE - lightlib_static + target_link_libraries(brazier_tests PRIVATE + brazier_static GTest::gtest GTest::gtest_main GTest::gmock @@ -225,13 +225,13 @@ if(BUILD_TESTS) ) # include(GoogleTest) - # gtest_discover_tests(lightlib_tests) + # gtest_discover_tests(brazier_tests) - # add_test(NAME lightlib_tests COMMAND lightlib_tests) + # add_test(NAME brazier_tests COMMAND brazier_tests) add_custom_target(check - COMMAND $ - DEPENDS lightlib_tests + COMMAND $ + DEPENDS brazier_tests COMMENT "Running tests..." ) diff --git a/Light/CMakePresets.json b/brazier/CMakePresets.json similarity index 80% rename from Light/CMakePresets.json rename to brazier/CMakePresets.json index f486dcb..581a2bb 100644 --- a/Light/CMakePresets.json +++ b/brazier/CMakePresets.json @@ -2,8 +2,8 @@ "version": 3, "configurePresets": [ { - "name": "lightlib", - "displayName": "lightlib", + "name": "brazier", + "displayName": "brazier", "generator": "Visual Studio 18 2026", "binaryDir": "${sourceDir}/build", "cacheVariables": { diff --git a/brazier/app/Main.cpp b/brazier/app/Main.cpp new file mode 100644 index 0000000..169ec35 --- /dev/null +++ b/brazier/app/Main.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov + * SPDX-License-Identifier: LGPL-3.0-or-later + * + * This file is part of brazier. + * + * brazier is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * brazier is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with brazier; if not, see . + */ + +#include "../include/brazier/Core" +#include "../include/brazier/DB" +#include "../include/brazier/Http" +#include "../include/brazier/Engine.hpp" + +int main() { + try { + brazier::ConfigManager::initGlobal("config_test.json"); + brazier::global_config->setAutoSave(false); + + std::string server_host = brazier::global_config->get("server.host", "0.0.0.0"); + int server_port = brazier::global_config->get("server.port", 3502); + + brazier::Logger::log("server updated host: " + server_host, "INFO"); + brazier::Logger::log("server new host: " + std::to_string(server_port), "INFO"); + + brazier::Server server(server_host, server_port); + server.run(); + return 0; + } + catch (const std::exception& e) { + std::cerr << "Fatal error: " << e.what() << std::endl; + brazier::Logger::log(std::string(e.what()), "ERROR"); + return 1; + } +} \ No newline at end of file diff --git a/Light/build.bat b/brazier/build.bat similarity index 86% rename from Light/build.bat rename to brazier/build.bat index c9cd05a..330ac09 100644 --- a/Light/build.bat +++ b/brazier/build.bat @@ -3,7 +3,7 @@ chcp 65001 >nul setlocal enabledelayedexpansion -set PROJECT_NAME=lightlib +set PROJECT_NAME=brazier set BUILD_DIR=build set SOURCE_DIR=%~dp0 set CONFIG=Release @@ -23,7 +23,7 @@ if exist "%PROJECT_NAME%.exe" ( ren "%PROJECT_NAME%.exe" "%PROJECT_NAME%_OLD.exe" ) -cmake --preset lightlib -A x64 -DBUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE="%VCPKG_TOOLCHAIN%" %SOURCE_DIR% +cmake --preset brazier -A x64 -DBUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE="%VCPKG_TOOLCHAIN%" %SOURCE_DIR% cmake --build . --config %CONFIG% if %errorlevel% neq 0 ( echo CMake build failed. diff --git a/Light/build.sh b/brazier/build.sh similarity index 97% rename from Light/build.sh rename to brazier/build.sh index 6995ccd..70be4e6 100644 --- a/Light/build.sh +++ b/brazier/build.sh @@ -1,7 +1,7 @@ # SPDX-License-Identifier: LGPL-3.0-or-later set -e -PROJECT_NAME="lightlib" +PROJECT_NAME="brazier" BUILD_DIR="build" CONFIG="Release" SOURCE_DIR="$(pwd)" diff --git a/Light/cmake/lightlibConfig.cmake b/brazier/cmake/lightlibConfig.cmake similarity index 71% rename from Light/cmake/lightlibConfig.cmake rename to brazier/cmake/lightlibConfig.cmake index d139319..1f4f6ff 100644 --- a/Light/cmake/lightlibConfig.cmake +++ b/brazier/cmake/lightlibConfig.cmake @@ -8,8 +8,8 @@ find_dependency(ZLIB REQUIRED) find_dependency(PostgreSQL REQUIRED) find_dependency(OpenSSL REQUIRED) -include("${CMAKE_CURRENT_LIST_DIR}/lightlibTargets.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/brazierTargets.cmake") -if(NOT TARGET lightlib::lightlib) - add_library(lightlib::lightlib ALIAS lightlib) +if(NOT TARGET brazier::brazier) + add_library(brazier::brazier ALIAS brazier) endif() \ No newline at end of file diff --git a/Light/config_test.json b/brazier/config_test.json similarity index 88% rename from Light/config_test.json rename to brazier/config_test.json index b6e311f..0554a2c 100644 --- a/Light/config_test.json +++ b/brazier/config_test.json @@ -3,7 +3,7 @@ "host": "0.0.0.0", "port": 3502 }, - "app_name": "LightlibApp", + "app_name": "brazierApp", "filesystem": { "drivers": { "local": { diff --git a/Light/include/lightlib/App/Http/Controllers/Controller.hpp b/brazier/include/brazier/App/Http/Controllers/Controller.hpp similarity index 86% rename from Light/include/lightlib/App/Http/Controllers/Controller.hpp rename to brazier/include/brazier/App/Http/Controllers/Controller.hpp index cd7364d..d65d11b 100644 --- a/Light/include/lightlib/App/Http/Controllers/Controller.hpp +++ b/brazier/include/brazier/App/Http/Controllers/Controller.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -30,7 +30,7 @@ namespace http = beast::http; using Params = std::unordered_map; -namespace lightlib { +namespace brazier { class Controller { public: diff --git a/Light/include/lightlib/App/Http/Helpers/Code.hpp b/brazier/include/brazier/App/Http/Helpers/Code.hpp similarity index 81% rename from Light/include/lightlib/App/Http/Helpers/Code.hpp rename to brazier/include/brazier/App/Http/Helpers/Code.hpp index 8f51229..e22e6c8 100644 --- a/Light/include/lightlib/App/Http/Helpers/Code.hpp +++ b/brazier/include/brazier/App/Http/Helpers/Code.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -26,7 +26,7 @@ #include #include -namespace lightlib { +namespace brazier { class Code { public: diff --git a/Light/include/lightlib/App/Http/Helpers/Cookie.hpp b/brazier/include/brazier/App/Http/Helpers/Cookie.hpp similarity index 81% rename from Light/include/lightlib/App/Http/Helpers/Cookie.hpp rename to brazier/include/brazier/App/Http/Helpers/Cookie.hpp index 0505b43..7b36191 100644 --- a/Light/include/lightlib/App/Http/Helpers/Cookie.hpp +++ b/brazier/include/brazier/App/Http/Helpers/Cookie.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -24,7 +24,7 @@ #include #include -namespace lightlib { +namespace brazier { namespace beast = boost::beast; namespace http = beast::http; diff --git a/Light/include/lightlib/App/Http/Helpers/HttpClient.hpp b/brazier/include/brazier/App/Http/Helpers/HttpClient.hpp similarity index 92% rename from Light/include/lightlib/App/Http/Helpers/HttpClient.hpp rename to brazier/include/brazier/App/Http/Helpers/HttpClient.hpp index 70e6de0..5b0b9f1 100644 --- a/Light/include/lightlib/App/Http/Helpers/HttpClient.hpp +++ b/brazier/include/brazier/App/Http/Helpers/HttpClient.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -39,7 +39,7 @@ #include #include -namespace lightlib { +namespace brazier { namespace beast = boost::beast; namespace http = beast::http; diff --git a/Light/include/lightlib/App/Http/Helpers/SmtpClient.hpp b/brazier/include/brazier/App/Http/Helpers/SmtpClient.hpp similarity index 87% rename from Light/include/lightlib/App/Http/Helpers/SmtpClient.hpp rename to brazier/include/brazier/App/Http/Helpers/SmtpClient.hpp index dc19287..24ebf24 100644 --- a/Light/include/lightlib/App/Http/Helpers/SmtpClient.hpp +++ b/brazier/include/brazier/App/Http/Helpers/SmtpClient.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -30,7 +30,7 @@ #include "../../../vendor/Debug/Logger.hpp" #include "../../../Engine.hpp" -namespace lightlib +namespace brazier { namespace beast = boost::beast; namespace net = boost::asio; diff --git a/Light/include/lightlib/App/Http/Helpers/Validator.hpp b/brazier/include/brazier/App/Http/Helpers/Validator.hpp similarity index 77% rename from Light/include/lightlib/App/Http/Helpers/Validator.hpp rename to brazier/include/brazier/App/Http/Helpers/Validator.hpp index 066e6df..6a66565 100644 --- a/Light/include/lightlib/App/Http/Helpers/Validator.hpp +++ b/brazier/include/brazier/App/Http/Helpers/Validator.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -24,7 +24,7 @@ #include #include -namespace lightlib { +namespace brazier { class Validator { public: diff --git a/Light/include/lightlib/App/Http/Middlewares/AuthMiddleware.hpp b/brazier/include/brazier/App/Http/Middlewares/AuthMiddleware.hpp similarity index 79% rename from Light/include/lightlib/App/Http/Middlewares/AuthMiddleware.hpp rename to brazier/include/brazier/App/Http/Middlewares/AuthMiddleware.hpp index 20d6f36..869e3a1 100644 --- a/Light/include/lightlib/App/Http/Middlewares/AuthMiddleware.hpp +++ b/brazier/include/brazier/App/Http/Middlewares/AuthMiddleware.hpp @@ -2,27 +2,27 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once #include "Middleware.hpp" #include "../Services/AuthService.hpp" -namespace lightlib { +namespace brazier { class CorsMiddleware : public Middleware { diff --git a/Light/include/lightlib/App/Http/Middlewares/CorsMiddleware.hpp b/brazier/include/brazier/App/Http/Middlewares/CorsMiddleware.hpp similarity index 85% rename from Light/include/lightlib/App/Http/Middlewares/CorsMiddleware.hpp rename to brazier/include/brazier/App/Http/Middlewares/CorsMiddleware.hpp index c4720b8..8b23390 100644 --- a/Light/include/lightlib/App/Http/Middlewares/CorsMiddleware.hpp +++ b/brazier/include/brazier/App/Http/Middlewares/CorsMiddleware.hpp @@ -2,26 +2,26 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once #include "Middleware.hpp" -namespace lightlib { +namespace brazier { class CorsMiddleware : public Middleware { diff --git a/Light/include/lightlib/App/Http/Middlewares/Middleware.hpp b/brazier/include/brazier/App/Http/Middlewares/Middleware.hpp similarity index 80% rename from Light/include/lightlib/App/Http/Middlewares/Middleware.hpp rename to brazier/include/brazier/App/Http/Middlewares/Middleware.hpp index 295ca19..16fc4ba 100644 --- a/Light/include/lightlib/App/Http/Middlewares/Middleware.hpp +++ b/brazier/include/brazier/App/Http/Middlewares/Middleware.hpp @@ -2,26 +2,26 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once #include -namespace lightlib { +namespace brazier { namespace beast = boost::beast; namespace http = beast::http; diff --git a/Light/include/lightlib/App/Http/Middlewares/MiddlewarePipeline.hpp b/brazier/include/brazier/App/Http/Middlewares/MiddlewarePipeline.hpp similarity index 82% rename from Light/include/lightlib/App/Http/Middlewares/MiddlewarePipeline.hpp rename to brazier/include/brazier/App/Http/Middlewares/MiddlewarePipeline.hpp index 0f0bd3e..d36a44b 100644 --- a/Light/include/lightlib/App/Http/Middlewares/MiddlewarePipeline.hpp +++ b/brazier/include/brazier/App/Http/Middlewares/MiddlewarePipeline.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -23,7 +23,7 @@ #include #include -namespace lightlib { +namespace brazier { namespace beast = boost::beast; namespace http = beast::http; diff --git a/Light/include/lightlib/App/Http/Services/Service.hpp b/brazier/include/brazier/App/Http/Services/Service.hpp similarity index 74% rename from Light/include/lightlib/App/Http/Services/Service.hpp rename to brazier/include/brazier/App/Http/Services/Service.hpp index 2bbabd6..10f88d1 100644 --- a/Light/include/lightlib/App/Http/Services/Service.hpp +++ b/brazier/include/brazier/App/Http/Services/Service.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once diff --git a/Light/include/lightlib/Core b/brazier/include/brazier/Core similarity index 100% rename from Light/include/lightlib/Core rename to brazier/include/brazier/Core diff --git a/Light/include/lightlib/Crypto b/brazier/include/brazier/Crypto similarity index 100% rename from Light/include/lightlib/Crypto rename to brazier/include/brazier/Crypto diff --git a/Light/include/lightlib/DB b/brazier/include/brazier/DB similarity index 100% rename from Light/include/lightlib/DB rename to brazier/include/brazier/DB diff --git a/Light/include/lightlib/Database/Cache.hpp b/brazier/include/brazier/Database/Cache.hpp similarity index 85% rename from Light/include/lightlib/Database/Cache.hpp rename to brazier/include/brazier/Database/Cache.hpp index 47562e8..3c8c9b5 100644 --- a/Light/include/lightlib/Database/Cache.hpp +++ b/brazier/include/brazier/Database/Cache.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -27,7 +27,7 @@ #include #include "../vendor/Debug/Logger.hpp" -namespace lightlib { +namespace brazier { class Cache { public: diff --git a/Light/include/lightlib/Database/Collection.hpp b/brazier/include/brazier/Database/Collection.hpp similarity index 92% rename from Light/include/lightlib/Database/Collection.hpp rename to brazier/include/brazier/Database/Collection.hpp index 1ccc80c..9f319a7 100644 --- a/Light/include/lightlib/Database/Collection.hpp +++ b/brazier/include/brazier/Database/Collection.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -25,7 +25,7 @@ #include #include -namespace lightlib { +namespace brazier { using json = nlohmann::json; diff --git a/Light/include/lightlib/Database/Database.hpp b/brazier/include/brazier/Database/Database.hpp similarity index 86% rename from Light/include/lightlib/Database/Database.hpp rename to brazier/include/brazier/Database/Database.hpp index 582a32a..21e8971 100644 --- a/Light/include/lightlib/Database/Database.hpp +++ b/brazier/include/brazier/Database/Database.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -32,7 +32,7 @@ #include "../vendor/Debug/Logger.hpp" #include "../Engine.hpp" -namespace lightlib { +namespace brazier { class Database { public: diff --git a/Light/include/lightlib/Database/Migrations/BaseMigration.hpp b/brazier/include/brazier/Database/Migrations/BaseMigration.hpp similarity index 78% rename from Light/include/lightlib/Database/Migrations/BaseMigration.hpp rename to brazier/include/brazier/Database/Migrations/BaseMigration.hpp index 5965dd6..a897f45 100644 --- a/Light/include/lightlib/Database/Migrations/BaseMigration.hpp +++ b/brazier/include/brazier/Database/Migrations/BaseMigration.hpp @@ -2,27 +2,27 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once #include #include "../SQLSchemaBuilder.hpp" -namespace lightlib { +namespace brazier { template class BaseMigration { diff --git a/Light/include/lightlib/Database/Migrations/MigrationManager.hpp b/brazier/include/brazier/Database/Migrations/MigrationManager.hpp similarity index 94% rename from Light/include/lightlib/Database/Migrations/MigrationManager.hpp rename to brazier/include/brazier/Database/Migrations/MigrationManager.hpp index 7f38be0..85dbb68 100644 --- a/Light/include/lightlib/Database/Migrations/MigrationManager.hpp +++ b/brazier/include/brazier/Database/Migrations/MigrationManager.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -31,7 +31,7 @@ #include "../SQLSchemaBuilder.hpp" #include "../../vendor/Debug/Logger.hpp" -namespace lightlib { +namespace brazier { class MigrationManager { private: diff --git a/Light/include/lightlib/Database/Migrations/Migrations.hpp b/brazier/include/brazier/Database/Migrations/Migrations.hpp similarity index 79% rename from Light/include/lightlib/Database/Migrations/Migrations.hpp rename to brazier/include/brazier/Database/Migrations/Migrations.hpp index 2974c4b..8523616 100644 --- a/Light/include/lightlib/Database/Migrations/Migrations.hpp +++ b/brazier/include/brazier/Database/Migrations/Migrations.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -25,7 +25,7 @@ #include #include -namespace lightlib { +namespace brazier { class Migration { using Handler = std::function; diff --git a/Light/include/lightlib/Database/Migrations/migration_migrations_table.hpp b/brazier/include/brazier/Database/Migrations/migration_migrations_table.hpp similarity index 76% rename from Light/include/lightlib/Database/Migrations/migration_migrations_table.hpp rename to brazier/include/brazier/Database/Migrations/migration_migrations_table.hpp index 21783a0..05d8586 100644 --- a/Light/include/lightlib/Database/Migrations/migration_migrations_table.hpp +++ b/brazier/include/brazier/Database/Migrations/migration_migrations_table.hpp @@ -2,27 +2,27 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once #include "BaseMigration.hpp" -namespace lightlib { +namespace brazier { class MigrationMigrationsCreate : public BaseMigration { public: diff --git a/Light/include/lightlib/Database/Models/Model.hpp b/brazier/include/brazier/Database/Models/Model.hpp similarity index 99% rename from Light/include/lightlib/Database/Models/Model.hpp rename to brazier/include/brazier/Database/Models/Model.hpp index 6db922e..3e3bea2 100644 --- a/Light/include/lightlib/Database/Models/Model.hpp +++ b/brazier/include/brazier/Database/Models/Model.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -34,7 +34,7 @@ #include "../SQLString.hpp" #include "../Collection.hpp" -namespace lightlib { +namespace brazier { using json = nlohmann::json; diff --git a/Light/include/lightlib/Database/Models/ModelQueryBuilder.hpp b/brazier/include/brazier/Database/Models/ModelQueryBuilder.hpp similarity index 90% rename from Light/include/lightlib/Database/Models/ModelQueryBuilder.hpp rename to brazier/include/brazier/Database/Models/ModelQueryBuilder.hpp index 78740fd..4553e2a 100644 --- a/Light/include/lightlib/Database/Models/ModelQueryBuilder.hpp +++ b/brazier/include/brazier/Database/Models/ModelQueryBuilder.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -24,7 +24,7 @@ #include #include -namespace lightlib { +namespace brazier { template class ModelQueryBuilder : public SQLQueryBuilder { diff --git a/Light/include/lightlib/Database/Queue.hpp b/brazier/include/brazier/Database/Queue.hpp similarity index 82% rename from Light/include/lightlib/Database/Queue.hpp rename to brazier/include/brazier/Database/Queue.hpp index 568a9fb..f361975 100644 --- a/Light/include/lightlib/Database/Queue.hpp +++ b/brazier/include/brazier/Database/Queue.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -27,7 +27,7 @@ #include #include "../vendor/Debug/Logger.hpp" -namespace lightlib { +namespace brazier { class Queue { public: diff --git a/Light/include/lightlib/Database/SQLQueryBuilder.hpp b/brazier/include/brazier/Database/SQLQueryBuilder.hpp similarity index 89% rename from Light/include/lightlib/Database/SQLQueryBuilder.hpp rename to brazier/include/brazier/Database/SQLQueryBuilder.hpp index 4c4c46b..f5609ca 100644 --- a/Light/include/lightlib/Database/SQLQueryBuilder.hpp +++ b/brazier/include/brazier/Database/SQLQueryBuilder.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -26,7 +26,7 @@ #include #include -namespace lightlib { +namespace brazier { class SQLQueryBuilder { private: diff --git a/Light/include/lightlib/Database/SQLSchemaBuilder.hpp b/brazier/include/brazier/Database/SQLSchemaBuilder.hpp similarity index 88% rename from Light/include/lightlib/Database/SQLSchemaBuilder.hpp rename to brazier/include/brazier/Database/SQLSchemaBuilder.hpp index fef6b86..03c59d6 100644 --- a/Light/include/lightlib/Database/SQLSchemaBuilder.hpp +++ b/brazier/include/brazier/Database/SQLSchemaBuilder.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -27,7 +27,7 @@ #include #include "Database.hpp" -namespace lightlib { +namespace brazier { class SQLSchemaBuilder { private: diff --git a/Light/include/lightlib/Database/SQLString.hpp b/brazier/include/brazier/Database/SQLString.hpp similarity index 77% rename from Light/include/lightlib/Database/SQLString.hpp rename to brazier/include/brazier/Database/SQLString.hpp index 776b3fe..0ad1cf4 100644 --- a/Light/include/lightlib/Database/SQLString.hpp +++ b/brazier/include/brazier/Database/SQLString.hpp @@ -2,27 +2,27 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once #include #include -namespace lightlib { +namespace brazier { class SQLString { public: diff --git a/Light/include/lightlib/Engine.hpp b/brazier/include/brazier/Engine.hpp similarity index 75% rename from Light/include/lightlib/Engine.hpp rename to brazier/include/brazier/Engine.hpp index 8d06c69..f126a2d 100644 --- a/Light/include/lightlib/Engine.hpp +++ b/brazier/include/brazier/Engine.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -24,7 +24,7 @@ #include #include "vendor/ConfigManager.hpp" -namespace lightlib { +namespace brazier { class Engine { public: static boost::asio::io_context& get_io_context(); @@ -36,5 +36,5 @@ namespace lightlib { static inline boost::asio::io_context* io_ctx_ptr_ = nullptr; }; - inline std::shared_ptr global_config = nullptr; + inline std::shared_ptr global_config = nullptr; } \ No newline at end of file diff --git a/Light/include/lightlib/Filesystem/BaseDriver.hpp b/brazier/include/brazier/Filesystem/BaseDriver.hpp similarity index 90% rename from Light/include/lightlib/Filesystem/BaseDriver.hpp rename to brazier/include/brazier/Filesystem/BaseDriver.hpp index ccc8d2b..ccae9ce 100644 --- a/Light/include/lightlib/Filesystem/BaseDriver.hpp +++ b/brazier/include/brazier/Filesystem/BaseDriver.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -25,7 +25,7 @@ #include #include -namespace lightlib { +namespace brazier { class BaseDriver { public: diff --git a/Light/include/lightlib/Filesystem/FileDriver.hpp b/brazier/include/brazier/Filesystem/FileDriver.hpp similarity index 88% rename from Light/include/lightlib/Filesystem/FileDriver.hpp rename to brazier/include/brazier/Filesystem/FileDriver.hpp index eba5c5f..988959c 100644 --- a/Light/include/lightlib/Filesystem/FileDriver.hpp +++ b/brazier/include/brazier/Filesystem/FileDriver.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -28,7 +28,7 @@ #include #include -namespace lightlib { +namespace brazier { namespace fs = std::filesystem; @@ -60,7 +60,7 @@ namespace lightlib { boost::asio::awaitable copyAsync(const std::string& source, const std::string& destination) override; boost::asio::awaitable moveAsync(const std::string& source, const std::string& destination) override; - std::string getDriverType() const override { return lightlib::File; } + std::string getDriverType() const override { return brazier::File; } bool isAsyncSupported() const override { return true; } }; diff --git a/Light/include/lightlib/Filesystem/Filesystem.hpp b/brazier/include/brazier/Filesystem/Filesystem.hpp similarity index 89% rename from Light/include/lightlib/Filesystem/Filesystem.hpp rename to brazier/include/brazier/Filesystem/Filesystem.hpp index 3e00ff2..aa62c40 100644 --- a/Light/include/lightlib/Filesystem/Filesystem.hpp +++ b/brazier/include/brazier/Filesystem/Filesystem.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -26,7 +26,7 @@ #include #include -namespace lightlib { +namespace brazier { class Filesystem { private: diff --git a/Light/include/lightlib/Filesystem/S3Driver.hpp b/brazier/include/brazier/Filesystem/S3Driver.hpp similarity index 90% rename from Light/include/lightlib/Filesystem/S3Driver.hpp rename to brazier/include/brazier/Filesystem/S3Driver.hpp index cbea71b..f3f4765 100644 --- a/Light/include/lightlib/Filesystem/S3Driver.hpp +++ b/brazier/include/brazier/Filesystem/S3Driver.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -24,7 +24,7 @@ #include #include -namespace lightlib { +namespace brazier { namespace fs = std::filesystem; diff --git a/Light/include/lightlib/Filesystem/StorageManager.hpp b/brazier/include/brazier/Filesystem/StorageManager.hpp similarity index 85% rename from Light/include/lightlib/Filesystem/StorageManager.hpp rename to brazier/include/brazier/Filesystem/StorageManager.hpp index 3bdd53a..4fe1ac4 100644 --- a/Light/include/lightlib/Filesystem/StorageManager.hpp +++ b/brazier/include/brazier/Filesystem/StorageManager.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -26,7 +26,7 @@ #include #include "BaseDriver.hpp" -namespace lightlib { +namespace brazier { class StorageManager { private: diff --git a/Light/include/lightlib/Http b/brazier/include/brazier/Http similarity index 100% rename from Light/include/lightlib/Http rename to brazier/include/brazier/Http diff --git a/Light/include/lightlib/Router/Route.hpp b/brazier/include/brazier/Router/Route.hpp similarity index 87% rename from Light/include/lightlib/Router/Route.hpp rename to brazier/include/brazier/Router/Route.hpp index 473d383..7a6c36e 100644 --- a/Light/include/lightlib/Router/Route.hpp +++ b/brazier/include/brazier/Router/Route.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -35,7 +35,7 @@ using Request = http::request; using Response = http::response; using Params = std::unordered_map; -namespace lightlib { +namespace brazier { class Route { std::regex pathRegex_; diff --git a/Light/include/lightlib/Router/Router.hpp b/brazier/include/brazier/Router/Router.hpp similarity index 84% rename from Light/include/lightlib/Router/Router.hpp rename to brazier/include/brazier/Router/Router.hpp index c12cd3e..0c5dc75 100644 --- a/Light/include/lightlib/Router/Router.hpp +++ b/brazier/include/brazier/Router/Router.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -27,7 +27,7 @@ #include #include "Route.hpp" -namespace lightlib { +namespace brazier { namespace beast = boost::beast; namespace http = beast::http; diff --git a/Light/include/lightlib/Router/RouterRegisterer.hpp b/brazier/include/brazier/Router/RouterRegisterer.hpp similarity index 66% rename from Light/include/lightlib/Router/RouterRegisterer.hpp rename to brazier/include/brazier/Router/RouterRegisterer.hpp index 1375974..2947a98 100644 --- a/Light/include/lightlib/Router/RouterRegisterer.hpp +++ b/brazier/include/brazier/Router/RouterRegisterer.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -25,7 +25,7 @@ #include #include "types.hpp" -namespace lightlib { +namespace brazier { class RouterRegisterer { using Request = http::request; @@ -48,17 +48,17 @@ namespace lightlib { }) #define WS_R(path, controller, handler) \ - lightlib::WebSocketRouter::instance().add_route(path, \ - [controller](std::shared_ptr session, const lightlib::Params& params) { \ + brazier::WebSocketRouter::instance().add_route(path, \ + [controller](std::shared_ptr session, const brazier::Params& params) { \ controller->handler(session, params); \ }) #define WS_MSG(path, controller, handler) \ { \ - lightlib::Params dummy_params; \ - auto* route = lightlib::WebSocketRouter::instance().find_route(path, dummy_params); \ + brazier::Params dummy_params; \ + auto* route = brazier::WebSocketRouter::instance().find_route(path, dummy_params); \ if (route) { \ - route->set_message_handler([controller](const std::string& msg, std::shared_ptr session) { \ + route->set_message_handler([controller](const std::string& msg, std::shared_ptr session) { \ controller->handler(msg, session); \ }); \ } else { \ @@ -67,10 +67,10 @@ namespace lightlib { #define WS_BIN(path, controller, handler) \ { \ - lightlib::Params dummy_params; \ - auto* route = lightlib::WebSocketRouter::instance().find_route(path, dummy_params); \ + brazier::Params dummy_params; \ + auto* route = brazier::WebSocketRouter::instance().find_route(path, dummy_params); \ if (route) { \ - route->set_binary_handler([controller](std::vector&& data, std::shared_ptr session) { \ + route->set_binary_handler([controller](std::vector&& data, std::shared_ptr session) { \ controller->handler(std::move(data), session); \ }); \ } \ @@ -78,10 +78,10 @@ namespace lightlib { #define WS_CLOSE(path, controller, handler) \ { \ - lightlib::Params dummy_params; \ - auto* route = lightlib::WebSocketRouter::instance().find_route(path, dummy_params); \ + brazier::Params dummy_params; \ + auto* route = brazier::WebSocketRouter::instance().find_route(path, dummy_params); \ if (route) { \ - route->set_close_handler([controller](std::shared_ptr session) { \ + route->set_close_handler([controller](std::shared_ptr session) { \ controller->handler(session); \ }); \ } \ @@ -89,36 +89,36 @@ namespace lightlib { #define WS_ERR(path, controller, handler) \ { \ - lightlib::Params dummy_params; \ - auto* route = lightlib::WebSocketRouter::instance().find_route(path, dummy_params); \ + brazier::Params dummy_params; \ + auto* route = brazier::WebSocketRouter::instance().find_route(path, dummy_params); \ if (route) { \ - route->set_error_handler([controller](const std::string& error, std::shared_ptr session) { \ + route->set_error_handler([controller](const std::string& error, std::shared_ptr session) { \ controller->handler(error, session); \ }); \ } \ } #define WS_G_MSG(controller, handler) \ - lightlib::WebSocketRouter::instance().set_global_message_handler( \ - [controller](const std::string& msg, std::shared_ptr session) { \ + brazier::WebSocketRouter::instance().set_global_message_handler( \ + [controller](const std::string& msg, std::shared_ptr session) { \ controller->handler(msg, session); \ }) #define WS_G_BIN(controller, handler) \ - lightlib::WebSocketRouter::instance().set_global_binary_handler( \ - [controller](std::vector&& data, std::shared_ptr session) { \ + brazier::WebSocketRouter::instance().set_global_binary_handler( \ + [controller](std::vector&& data, std::shared_ptr session) { \ controller->handler(std::move(data), session); \ }) #define WS_G_CLOSE(controller, handler) \ - lightlib::WebSocketRouter::instance().set_global_close_handler( \ - [controller](std::shared_ptr session) { \ + brazier::WebSocketRouter::instance().set_global_close_handler( \ + [controller](std::shared_ptr session) { \ controller->handler(session); \ }) #define WS_G_ERR(controller, handler) \ - lightlib::WebSocketRouter::instance().set_global_error_handler( \ - [controller](const std::string& error, std::shared_ptr session) { \ + brazier::WebSocketRouter::instance().set_global_error_handler( \ + [controller](const std::string& error, std::shared_ptr session) { \ controller->handler(error, session); \ }) } \ No newline at end of file diff --git a/Light/include/lightlib/Router/WSRoute.hpp b/brazier/include/brazier/Router/WSRoute.hpp similarity index 90% rename from Light/include/lightlib/Router/WSRoute.hpp rename to brazier/include/brazier/Router/WSRoute.hpp index c50b652..374f5cd 100644 --- a/Light/include/lightlib/Router/WSRoute.hpp +++ b/brazier/include/brazier/Router/WSRoute.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -28,7 +28,7 @@ #include #include "../vendor/WebSocket/WebSocketSession.hpp" -namespace lightlib { +namespace brazier { using Params = std::unordered_map; diff --git a/Light/include/lightlib/Router/WSRouter.hpp b/brazier/include/brazier/Router/WSRouter.hpp similarity index 88% rename from Light/include/lightlib/Router/WSRouter.hpp rename to brazier/include/brazier/Router/WSRouter.hpp index d91f12e..9fa2059 100644 --- a/Light/include/lightlib/Router/WSRouter.hpp +++ b/brazier/include/brazier/Router/WSRouter.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -24,7 +24,7 @@ #include #include -namespace lightlib { +namespace brazier { class WebSocketRouter { public: diff --git a/Light/include/lightlib/Router/types.hpp b/brazier/include/brazier/Router/types.hpp similarity index 79% rename from Light/include/lightlib/Router/types.hpp rename to brazier/include/brazier/Router/types.hpp index 833ceea..3ca3f19 100644 --- a/Light/include/lightlib/Router/types.hpp +++ b/brazier/include/brazier/Router/types.hpp @@ -2,27 +2,27 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once #include -namespace lightlib { +namespace brazier { namespace beast = boost::beast; namespace http = beast::http; diff --git a/Light/include/lightlib/WebSocketServer.hpp b/brazier/include/brazier/WebSocketServer.hpp similarity index 92% rename from Light/include/lightlib/WebSocketServer.hpp rename to brazier/include/brazier/WebSocketServer.hpp index 4235268..4ed3add 100644 --- a/Light/include/lightlib/WebSocketServer.hpp +++ b/brazier/include/brazier/WebSocketServer.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -48,7 +48,7 @@ namespace net = boost::asio; using tcp = net::ip::tcp; using namespace std::chrono_literals; -namespace lightlib { +namespace brazier { class WebSocketServer { private: diff --git a/Light/include/lightlib/server.hpp b/brazier/include/brazier/server.hpp similarity index 90% rename from Light/include/lightlib/server.hpp rename to brazier/include/brazier/server.hpp index a53730e..d9d41c3 100644 --- a/Light/include/lightlib/server.hpp +++ b/brazier/include/brazier/server.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -51,7 +51,7 @@ namespace net = boost::asio; using tcp = net::ip::tcp; using namespace std::chrono_literals; -namespace lightlib { +namespace brazier { class Server { private: diff --git a/Light/include/lightlib/vendor/ConfigManager.hpp b/brazier/include/brazier/vendor/ConfigManager.hpp similarity index 94% rename from Light/include/lightlib/vendor/ConfigManager.hpp rename to brazier/include/brazier/vendor/ConfigManager.hpp index 296affc..763e1c5 100644 --- a/Light/include/lightlib/vendor/ConfigManager.hpp +++ b/brazier/include/brazier/vendor/ConfigManager.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -30,7 +30,7 @@ #include #include "Debug/Logger.hpp" -namespace lightlib { +namespace brazier { using json = nlohmann::json; diff --git a/Light/include/lightlib/vendor/Cryptography/AES.hpp b/brazier/include/brazier/vendor/Cryptography/AES.hpp similarity index 98% rename from Light/include/lightlib/vendor/Cryptography/AES.hpp rename to brazier/include/brazier/vendor/Cryptography/AES.hpp index 08ef1dc..765f911 100644 --- a/Light/include/lightlib/vendor/Cryptography/AES.hpp +++ b/brazier/include/brazier/vendor/Cryptography/AES.hpp @@ -7,7 +7,7 @@ #include #include -namespace lightlib::crypto { +namespace brazier::crypto { class AES256 { public: diff --git a/Light/include/lightlib/vendor/Cryptography/RSA.hpp b/brazier/include/brazier/vendor/Cryptography/RSA.hpp similarity index 89% rename from Light/include/lightlib/vendor/Cryptography/RSA.hpp rename to brazier/include/brazier/vendor/Cryptography/RSA.hpp index fedeff7..35f634c 100644 --- a/Light/include/lightlib/vendor/Cryptography/RSA.hpp +++ b/brazier/include/brazier/vendor/Cryptography/RSA.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -30,7 +30,7 @@ #include #include -namespace lightlib::crypto { +namespace brazier::crypto { class RSA { public: diff --git a/Light/include/lightlib/vendor/Debug/Logger.hpp b/brazier/include/brazier/vendor/Debug/Logger.hpp similarity index 88% rename from Light/include/lightlib/vendor/Debug/Logger.hpp rename to brazier/include/brazier/vendor/Debug/Logger.hpp index 97ad23f..b1ff8bd 100644 --- a/Light/include/lightlib/vendor/Debug/Logger.hpp +++ b/brazier/include/brazier/vendor/Debug/Logger.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -33,7 +33,7 @@ #include #include -namespace lightlib { +namespace brazier { class Logger { private: diff --git a/Light/include/lightlib/vendor/Facades/DatabaseFacade.hpp b/brazier/include/brazier/vendor/Facades/DatabaseFacade.hpp similarity index 74% rename from Light/include/lightlib/vendor/Facades/DatabaseFacade.hpp rename to brazier/include/brazier/vendor/Facades/DatabaseFacade.hpp index 4597e93..071713f 100644 --- a/Light/include/lightlib/vendor/Facades/DatabaseFacade.hpp +++ b/brazier/include/brazier/vendor/Facades/DatabaseFacade.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once diff --git a/Light/include/lightlib/vendor/Facades/Hash.hpp b/brazier/include/brazier/vendor/Facades/Hash.hpp similarity index 89% rename from Light/include/lightlib/vendor/Facades/Hash.hpp rename to brazier/include/brazier/vendor/Facades/Hash.hpp index 438bef1..cdd6070 100644 --- a/Light/include/lightlib/vendor/Facades/Hash.hpp +++ b/brazier/include/brazier/vendor/Facades/Hash.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -38,7 +38,7 @@ #include #include -namespace lightlib { +namespace brazier { class Hash { public: diff --git a/Light/include/lightlib/vendor/Handlers/ENV.hpp b/brazier/include/brazier/vendor/Handlers/ENV.hpp similarity index 79% rename from Light/include/lightlib/vendor/Handlers/ENV.hpp rename to brazier/include/brazier/vendor/Handlers/ENV.hpp index 5157f96..8b2f043 100644 --- a/Light/include/lightlib/vendor/Handlers/ENV.hpp +++ b/brazier/include/brazier/vendor/Handlers/ENV.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -26,7 +26,7 @@ #include #include -namespace lightlib { +namespace brazier { class ENV { public: diff --git a/Light/include/lightlib/vendor/Storage/Storage.hpp b/brazier/include/brazier/vendor/Storage/Storage.hpp similarity index 90% rename from Light/include/lightlib/vendor/Storage/Storage.hpp rename to brazier/include/brazier/vendor/Storage/Storage.hpp index 75476e6..205fb7a 100644 --- a/Light/include/lightlib/vendor/Storage/Storage.hpp +++ b/brazier/include/brazier/vendor/Storage/Storage.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -32,7 +32,7 @@ #include #include -namespace lightlib { +namespace brazier { namespace fs = std::filesystem; diff --git a/Light/include/lightlib/vendor/WebSocket/WebSocketManager.hpp b/brazier/include/brazier/vendor/WebSocket/WebSocketManager.hpp similarity index 87% rename from Light/include/lightlib/vendor/WebSocket/WebSocketManager.hpp rename to brazier/include/brazier/vendor/WebSocket/WebSocketManager.hpp index 8cc27cf..b387566 100644 --- a/Light/include/lightlib/vendor/WebSocket/WebSocketManager.hpp +++ b/brazier/include/brazier/vendor/WebSocket/WebSocketManager.hpp @@ -2,31 +2,31 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once -#include "../include/lightlib/vendor/WebSocket/WebSocketSession.hpp" +#include "../include/brazier/vendor/WebSocket/WebSocketSession.hpp" #include #include #include #include -namespace lightlib { +namespace brazier { class WebSocketManager { public: diff --git a/Light/include/lightlib/vendor/WebSocket/WebSocketSession.hpp b/brazier/include/brazier/vendor/WebSocket/WebSocketSession.hpp similarity index 91% rename from Light/include/lightlib/vendor/WebSocket/WebSocketSession.hpp rename to brazier/include/brazier/vendor/WebSocket/WebSocketSession.hpp index 822df4d..2535f15 100644 --- a/Light/include/lightlib/vendor/WebSocket/WebSocketSession.hpp +++ b/brazier/include/brazier/vendor/WebSocket/WebSocketSession.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -37,7 +37,7 @@ namespace net = boost::asio; namespace http = beast::http; using tcp = net::ip::tcp; -namespace lightlib { +namespace brazier { class WebSocketSession : public std::enable_shared_from_this { public: diff --git a/Light/shaman b/brazier/shaman similarity index 100% rename from Light/shaman rename to brazier/shaman diff --git a/Light/shaman.exe b/brazier/shaman.exe similarity index 100% rename from Light/shaman.exe rename to brazier/shaman.exe diff --git a/Light/src/Code.cpp b/brazier/src/Code.cpp similarity index 86% rename from Light/src/Code.cpp rename to brazier/src/Code.cpp index 60dcd25..022a42f 100644 --- a/Light/src/Code.cpp +++ b/brazier/src/Code.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/App/Http/Helpers/Code.hpp" +#include "../include/brazier/App/Http/Helpers/Code.hpp" -using namespace lightlib; +using namespace brazier; std::string Code::generateRandomCode(size_t length) { const std::string characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; diff --git a/Light/src/ConfigManager.cpp b/brazier/src/ConfigManager.cpp similarity index 96% rename from Light/src/ConfigManager.cpp rename to brazier/src/ConfigManager.cpp index 680b215..87cc108 100644 --- a/Light/src/ConfigManager.cpp +++ b/brazier/src/ConfigManager.cpp @@ -2,27 +2,27 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/vendor/ConfigManager.hpp" -#include "../include/lightlib/Engine.hpp" +#include "../include/brazier/vendor/ConfigManager.hpp" +#include "../include/brazier/Engine.hpp" #include -namespace lightlib { +namespace brazier { void ConfigManager::flattenJson(const std::string& prefix, const json& j, std::unordered_map& output) { @@ -396,7 +396,7 @@ namespace lightlib { void ConfigManager::initGlobal() { - auto configDriver = std::make_shared(); + auto configDriver = std::make_shared(); configDriver->setRootPath("./"); configDriver->initAsync(); @@ -406,7 +406,7 @@ namespace lightlib { void ConfigManager::initGlobal(std::string filepath) { - auto configDriver = std::make_shared(); + auto configDriver = std::make_shared(); configDriver->setRootPath("./"); configDriver->initAsync(); diff --git a/Light/src/Controller.cpp b/brazier/src/Controller.cpp similarity index 84% rename from Light/src/Controller.cpp rename to brazier/src/Controller.cpp index eb0c749..ec53d65 100644 --- a/Light/src/Controller.cpp +++ b/brazier/src/Controller.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/App/Http/Controllers/Controller.hpp" +#include "../include/brazier/App/Http/Controllers/Controller.hpp" -using namespace lightlib; +using namespace brazier; boost::asio::awaitable Controller::show(const Request& req, Response& res, const Params& params) { res.result(http::status::method_not_allowed); diff --git a/Light/src/Cookie.cpp b/brazier/src/Cookie.cpp similarity index 82% rename from Light/src/Cookie.cpp rename to brazier/src/Cookie.cpp index f492a93..daf7963 100644 --- a/Light/src/Cookie.cpp +++ b/brazier/src/Cookie.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/App/Http/Helpers/Cookie.hpp" +#include "../include/brazier/App/Http/Helpers/Cookie.hpp" -using namespace lightlib; +using namespace brazier; std::map Cookie::parseCookies(const std::string& cookieHeader) { std::map cookies; diff --git a/Light/src/Cryptography/AES.cpp b/brazier/src/Cryptography/AES.cpp similarity index 98% rename from Light/src/Cryptography/AES.cpp rename to brazier/src/Cryptography/AES.cpp index cb4997c..a7701e4 100644 --- a/Light/src/Cryptography/AES.cpp +++ b/brazier/src/Cryptography/AES.cpp @@ -1,6 +1,6 @@ -#include "../../include/lightlib/vendor/Cryptography/AES.hpp" +#include "../../include/brazier/vendor/Cryptography/AES.hpp" -using namespace lightlib::crypto; +using namespace brazier::crypto; std::string AES256::generateKey() { return generateRandomBytes(KEY_SIZE); diff --git a/Light/src/Cryptography/RSA.cpp b/brazier/src/Cryptography/RSA.cpp similarity index 97% rename from Light/src/Cryptography/RSA.cpp rename to brazier/src/Cryptography/RSA.cpp index 55d5fae..2b5d283 100644 --- a/Light/src/Cryptography/RSA.cpp +++ b/brazier/src/Cryptography/RSA.cpp @@ -2,30 +2,30 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/vendor/Cryptography/RSA.hpp" +#include "../../include/brazier/vendor/Cryptography/RSA.hpp" #include #include #include #include #include -namespace lightlib::crypto { +namespace brazier::crypto { std::pair RSA::generateKeyPair(int bits) { EVP_PKEY_CTX* ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, nullptr); diff --git a/Light/src/Cryptography/crypt.md b/brazier/src/Cryptography/crypt.md similarity index 90% rename from Light/src/Cryptography/crypt.md rename to brazier/src/Cryptography/crypt.md index 890f6c5..d171ed9 100644 --- a/Light/src/Cryptography/crypt.md +++ b/brazier/src/Cryptography/crypt.md @@ -1,6 +1,6 @@ -# Cryptography in lightlib +# Cryptography in brazier ## Overview -*lightlib* provides a lightweight *RSA* and *DH* implementations for cryptography (encryption & decryption, and key exchange) using 256-bit integers. It does **not** have a keygen, being designed for use with existing *RSA* keys. +*brazier* provides a lightweight *RSA* and *DH* implementations for cryptography (encryption & decryption, and key exchange) using 256-bit integers. It does **not** have a keygen, being designed for use with existing *RSA* keys. ## RSA diff --git a/Light/src/Database/Cache.cpp b/brazier/src/Database/Cache.cpp similarity index 93% rename from Light/src/Database/Cache.cpp rename to brazier/src/Database/Cache.cpp index 730832b..67de031 100644 --- a/Light/src/Database/Cache.cpp +++ b/brazier/src/Database/Cache.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Database/Cache.hpp" +#include "../../include/brazier/Database/Cache.hpp" -using namespace lightlib; +using namespace brazier; redisContext* Cache::context_ = nullptr; diff --git a/Light/src/Database/Database.cpp b/brazier/src/Database/Database.cpp similarity index 93% rename from Light/src/Database/Database.cpp rename to brazier/src/Database/Database.cpp index d9d5901..0b7424b 100644 --- a/Light/src/Database/Database.cpp +++ b/brazier/src/Database/Database.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Database/Database.hpp" +#include "../../include/brazier/Database/Database.hpp" -using namespace lightlib; +using namespace brazier; Database::Database() { std::string db_host = global_config->get("database.host", "localhost"); @@ -44,7 +44,7 @@ Database::~Database() { } } -void lightlib::Database::execute(const std::string& query) { +void brazier::Database::execute(const std::string& query) { Logger::log("SQL Query: " + query, "INFO"); PGresult* res = PQexec(conn_, query.c_str()); @@ -64,7 +64,7 @@ void lightlib::Database::execute(const std::string& query) { PQclear(res); } -void lightlib::Database::transaction(const std::string name) +void brazier::Database::transaction(const std::string name) { std::string sql; if (name.empty()) { @@ -89,7 +89,7 @@ void lightlib::Database::transaction(const std::string name) PQclear(res); } -void lightlib::Database::rollback(const std::string name) +void brazier::Database::rollback(const std::string name) { if (!in_transaction_) { Logger::log("No active transaction to rollback", "WARNING"); @@ -121,7 +121,7 @@ void lightlib::Database::rollback(const std::string name) } } -void lightlib::Database::commit() +void brazier::Database::commit() { PGresult* res = PQexec(conn_, "COMMIT"); Logger::log("Commit transaction", "INFO"); diff --git a/Light/src/Database/Migrations/MigrationManager.cpp b/brazier/src/Database/Migrations/MigrationManager.cpp similarity index 85% rename from Light/src/Database/Migrations/MigrationManager.cpp rename to brazier/src/Database/Migrations/MigrationManager.cpp index c62b150..310a532 100644 --- a/Light/src/Database/Migrations/MigrationManager.cpp +++ b/brazier/src/Database/Migrations/MigrationManager.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../../include/lightlib/Database/Migrations/MigrationManager.hpp" +#include "../../../include/brazier/Database/Migrations/MigrationManager.hpp" -using namespace lightlib; +using namespace brazier; MigrationManager::MigrationManager(Database& db) : db(db) { try { diff --git a/Light/src/Database/Migrations/Migrations.cpp b/brazier/src/Database/Migrations/Migrations.cpp similarity index 73% rename from Light/src/Database/Migrations/Migrations.cpp rename to brazier/src/Database/Migrations/Migrations.cpp index 3d9cf2b..b7320cf 100644 --- a/Light/src/Database/Migrations/Migrations.cpp +++ b/brazier/src/Database/Migrations/Migrations.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../../include/lightlib/Database/Migrations/Migrations.hpp" +#include "../../../include/brazier/Database/Migrations/Migrations.hpp" -using namespace lightlib; +using namespace brazier; std::vector> Migration::migrations_; diff --git a/Light/src/Database/Migrations/migration_migrations_table.cpp b/brazier/src/Database/Migrations/migration_migrations_table.cpp similarity index 76% rename from Light/src/Database/Migrations/migration_migrations_table.cpp rename to brazier/src/Database/Migrations/migration_migrations_table.cpp index 1b71c23..ea857e3 100644 --- a/Light/src/Database/Migrations/migration_migrations_table.cpp +++ b/brazier/src/Database/Migrations/migration_migrations_table.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../../include/lightlib/Database/Migrations/migration_migrations_table.hpp" +#include "../../../include/brazier/Database/Migrations/migration_migrations_table.hpp" -using namespace lightlib; +using namespace brazier; std::vector MigrationMigrationsCreate::up() { SQLSchemaBuilder builder("migrations"); diff --git a/Light/src/Database/Queue.cpp b/brazier/src/Database/Queue.cpp similarity index 92% rename from Light/src/Database/Queue.cpp rename to brazier/src/Database/Queue.cpp index 5ee6ae2..a7f4293 100644 --- a/Light/src/Database/Queue.cpp +++ b/brazier/src/Database/Queue.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Database/Queue.hpp" +#include "../../include/brazier/Database/Queue.hpp" -using namespace lightlib; +using namespace brazier; redisContext* Queue::context_ = nullptr; diff --git a/Light/src/Database/SQLQueryBuilder.cpp b/brazier/src/Database/SQLQueryBuilder.cpp similarity index 93% rename from Light/src/Database/SQLQueryBuilder.cpp rename to brazier/src/Database/SQLQueryBuilder.cpp index aa27bb6..0784618 100644 --- a/Light/src/Database/SQLQueryBuilder.cpp +++ b/brazier/src/Database/SQLQueryBuilder.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Database/SQLQueryBuilder.hpp" +#include "../../include/brazier/Database/SQLQueryBuilder.hpp" -using namespace lightlib; +using namespace brazier; SQLQueryBuilder::SQLQueryBuilder(const std::string& table) : table(table) {} @@ -62,7 +62,7 @@ SQLQueryBuilder& SQLQueryBuilder::EndGroup() { return *this; } -SQLQueryBuilder& lightlib::SQLQueryBuilder::OrderBy(std::map col_dir) +SQLQueryBuilder& brazier::SQLQueryBuilder::OrderBy(std::map col_dir) { orderByColumns = col_dir; return *this; diff --git a/Light/src/Database/SQLShemaBuilder.cpp b/brazier/src/Database/SQLShemaBuilder.cpp similarity index 91% rename from Light/src/Database/SQLShemaBuilder.cpp rename to brazier/src/Database/SQLShemaBuilder.cpp index 9c01139..5b05f47 100644 --- a/Light/src/Database/SQLShemaBuilder.cpp +++ b/brazier/src/Database/SQLShemaBuilder.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Database/SQLSchemaBuilder.hpp" +#include "../../include/brazier/Database/SQLSchemaBuilder.hpp" -using namespace lightlib; +using namespace brazier; SQLSchemaBuilder::SQLSchemaBuilder(const std::string& table) : table(table) {} diff --git a/Light/src/Database/SQLString.cpp b/brazier/src/Database/SQLString.cpp similarity index 79% rename from Light/src/Database/SQLString.cpp rename to brazier/src/Database/SQLString.cpp index bdfde6b..97ac78b 100644 --- a/Light/src/Database/SQLString.cpp +++ b/brazier/src/Database/SQLString.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Database/SQLString.hpp" +#include "../../include/brazier/Database/SQLString.hpp" -using namespace lightlib; +using namespace brazier; std::string SQLString::EscapeString(PGconn* conn, const std::string& input) { char* escaped = PQescapeLiteral(conn, input.c_str(), input.size()); diff --git a/Light/src/ENV.cpp b/brazier/src/ENV.cpp similarity index 86% rename from Light/src/ENV.cpp rename to brazier/src/ENV.cpp index db2c9a3..9134b00 100644 --- a/Light/src/ENV.cpp +++ b/brazier/src/ENV.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/vendor/Handlers/ENV.hpp" +#include "../include/brazier/vendor/Handlers/ENV.hpp" -using namespace lightlib; +using namespace brazier; bool ENV::initialized = false; const std::string ENV::env_file_path = "./.env"; diff --git a/Light/src/Engine.cpp b/brazier/src/Engine.cpp similarity index 61% rename from Light/src/Engine.cpp rename to brazier/src/Engine.cpp index df04b8e..4f72e23 100644 --- a/Light/src/Engine.cpp +++ b/brazier/src/Engine.cpp @@ -2,27 +2,27 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/Engine.hpp" +#include "../include/brazier/Engine.hpp" -boost::asio::io_context& lightlib::Engine::get_io_context() { - if (!lightlib::Engine::io_ctx_ptr_) { +boost::asio::io_context& brazier::Engine::get_io_context() { + if (!brazier::Engine::io_ctx_ptr_) { throw std::runtime_error("IO context not initialized"); } - return *lightlib::Engine::io_ctx_ptr_; + return *brazier::Engine::io_ctx_ptr_; } \ No newline at end of file diff --git a/Light/src/Filesystem/FileDriver.cpp b/brazier/src/Filesystem/FileDriver.cpp similarity index 94% rename from Light/src/Filesystem/FileDriver.cpp rename to brazier/src/Filesystem/FileDriver.cpp index ddbef3e..3fdeed4 100644 --- a/Light/src/Filesystem/FileDriver.cpp +++ b/brazier/src/Filesystem/FileDriver.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Filesystem/FileDriver.hpp" +#include "../../include/brazier/Filesystem/FileDriver.hpp" -using namespace lightlib; +using namespace brazier; void FileDriver::initAsync(size_t threadCount) { if (!ioPool_) { diff --git a/brazier/src/Filesystem/Filesystem.cpp b/brazier/src/Filesystem/Filesystem.cpp new file mode 100644 index 0000000..8b6507e --- /dev/null +++ b/brazier/src/Filesystem/Filesystem.cpp @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov + * SPDX-License-Identifier: LGPL-3.0-or-later + * + * This file is part of brazier. + * + * brazier is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * brazier is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with brazier; if not, see . + */ + +#include "../../include/brazier/Filesystem/Filesystem.hpp" + +brazier::Filesystem::Filesystem() + : driver_(StorageManager::getInstance().getDefaultDriver()) + , driverName_("default") +{ + if (!driver_) { + throw std::runtime_error("No default driver registered"); + } +} + +brazier::Filesystem::Filesystem(const std::string& name) + : driver_(StorageManager::getInstance().getDriver(name)) + , driverName_(name) +{ + if (!driver_) { + throw std::runtime_error("Driver not found: " + name); + } +} + +brazier::Filesystem::Filesystem(std::shared_ptr driver) + : driver_(driver) + , driverName_("custom") +{ + if (!driver_) { + throw std::runtime_error("Driver is null"); + } +} + +brazier::Filesystem brazier::Filesystem::driver(const std::string& name) { + return brazier::Filesystem(name); +} + +bool brazier::Filesystem::hasDriver(const std::string& name) { + return brazier::StorageManager::getInstance().hasDriver(name); +} + +std::string brazier::Filesystem::getDriverName() const { + return driverName_; +} + +std::string brazier::Filesystem::getDriverType() const { + return driver_->getDriverType(); +} + +void brazier::Filesystem::put(const std::string& path, const std::string& content) { + driver_->put(path, content); +} + +std::string brazier::Filesystem::get(const std::string& path) { + return driver_->get(path); +} + +bool brazier::Filesystem::exists(const std::string& path) const { + return driver_->exists(path); +} + +void brazier::Filesystem::deleteFile(const std::string& path) { + driver_->deleteFile(path); +} + +void brazier::Filesystem::copy(const std::string& source, const std::string& destination) { + driver_->copy(source, destination); +} + +void brazier::Filesystem::move(const std::string& source, const std::string& destination) { + driver_->move(source, destination); +} + +boost::asio::awaitable brazier::Filesystem::putAsync(const std::string& path, const std::string& content) { + co_await driver_->putAsync(path, content); +} + +boost::asio::awaitable brazier::Filesystem::getAsync(const std::string& path) { + co_return co_await driver_->getAsync(path); +} + +boost::asio::awaitable brazier::Filesystem::existsAsync(const std::string& path) const { + co_return co_await driver_->existsAsync(path); +} + +boost::asio::awaitable brazier::Filesystem::deleteFileAsync(const std::string& path) { + co_await driver_->deleteFileAsync(path); +} + +boost::asio::awaitable brazier::Filesystem::copyAsync(const std::string& source, const std::string& destination) { + co_await driver_->copyAsync(source, destination); +} + +boost::asio::awaitable brazier::Filesystem::moveAsync(const std::string& source, const std::string& destination) { + co_await driver_->moveAsync(source, destination); +} + +std::shared_ptr brazier::Filesystem::getDriver() const { + return driver_; +} \ No newline at end of file diff --git a/Light/src/Filesystem/StorageManager.cpp b/brazier/src/Filesystem/StorageManager.cpp similarity index 84% rename from Light/src/Filesystem/StorageManager.cpp rename to brazier/src/Filesystem/StorageManager.cpp index be97e05..98bf61a 100644 --- a/Light/src/Filesystem/StorageManager.cpp +++ b/brazier/src/Filesystem/StorageManager.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Filesystem/StorageManager.hpp" +#include "../../include/brazier/Filesystem/StorageManager.hpp" -using namespace lightlib; +using namespace brazier; StorageManager& StorageManager::getInstance() { static StorageManager instance; diff --git a/Light/src/Hash.cpp b/brazier/src/Hash.cpp similarity index 92% rename from Light/src/Hash.cpp rename to brazier/src/Hash.cpp index a68751a..c163ee3 100644 --- a/Light/src/Hash.cpp +++ b/brazier/src/Hash.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/vendor/Facades/Hash.hpp" +#include "../include/brazier/vendor/Facades/Hash.hpp" -using namespace lightlib; +using namespace brazier; std::vector Hash::generateSalt(int length) { std::vector salt(length); diff --git a/Light/src/HttpClient.cpp b/brazier/src/HttpClient.cpp similarity index 97% rename from Light/src/HttpClient.cpp rename to brazier/src/HttpClient.cpp index 61be3e6..15beb9d 100644 --- a/Light/src/HttpClient.cpp +++ b/brazier/src/HttpClient.cpp @@ -2,26 +2,26 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/App/Http/Helpers/HttpClient.hpp" -#include "../include/lightlib/vendor/Debug/Logger.hpp" +#include "../include/brazier/App/Http/Helpers/HttpClient.hpp" +#include "../include/brazier/vendor/Debug/Logger.hpp" -namespace lightlib { +namespace brazier { HttpClient::HttpClient() : ctx_(ssl::context::tlsv12_client) { ctx_.set_default_verify_paths(); diff --git a/Light/src/Logger.cpp b/brazier/src/Logger.cpp similarity index 93% rename from Light/src/Logger.cpp rename to brazier/src/Logger.cpp index 6426041..7224f06 100644 --- a/Light/src/Logger.cpp +++ b/brazier/src/Logger.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/vendor/Debug/Logger.hpp" +#include "../include/brazier/vendor/Debug/Logger.hpp" -using namespace lightlib; +using namespace brazier; FILE* Logger::logFile = nullptr; std::mutex Logger::logMutex; diff --git a/Light/src/Middleware.cpp b/brazier/src/Middleware.cpp similarity index 76% rename from Light/src/Middleware.cpp rename to brazier/src/Middleware.cpp index 8553628..954a03e 100644 --- a/Light/src/Middleware.cpp +++ b/brazier/src/Middleware.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/App/Http/Middlewares/Middleware.hpp" +#include "../include/brazier/App/Http/Middlewares/Middleware.hpp" -using namespace lightlib; +using namespace brazier; void Middleware::setCors(const Request& req, Response& res) { res.set(http::field::access_control_allow_origin, "http://localhost:3000"); diff --git a/Light/src/MiddlewarePipeline.cpp b/brazier/src/MiddlewarePipeline.cpp similarity index 75% rename from Light/src/MiddlewarePipeline.cpp rename to brazier/src/MiddlewarePipeline.cpp index 0bbfb7f..f833671 100644 --- a/Light/src/MiddlewarePipeline.cpp +++ b/brazier/src/MiddlewarePipeline.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/App/Http/Middlewares/MiddlewarePipeline.hpp" +#include "../include/brazier/App/Http/Middlewares/MiddlewarePipeline.hpp" -using namespace lightlib; +using namespace brazier; MiddlewarePipeline::MiddlewarePipeline(std::vector> chain) { this->chain = chain; diff --git a/Light/src/Router/Route.cpp b/brazier/src/Router/Route.cpp similarity index 88% rename from Light/src/Router/Route.cpp rename to brazier/src/Router/Route.cpp index 7ee2c74..4d4bcd8 100644 --- a/Light/src/Router/Route.cpp +++ b/brazier/src/Router/Route.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Router/Route.hpp" +#include "../../include/brazier/Router/Route.hpp" -using namespace lightlib; +using namespace brazier; Route::Route(const std::string& path, std::function(const Request&, Response&, const Params&)> handler) diff --git a/Light/src/Router/Router.cpp b/brazier/src/Router/Router.cpp similarity index 81% rename from Light/src/Router/Router.cpp rename to brazier/src/Router/Router.cpp index c8f09a1..4994c4d 100644 --- a/Light/src/Router/Router.cpp +++ b/brazier/src/Router/Router.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Router/Router.hpp" +#include "../../include/brazier/Router/Router.hpp" -using namespace lightlib; +using namespace brazier; void Router::add(http::verb method, const std::string& path, std::function(const Request&, Response&, const Params&)> handler) { diff --git a/Light/src/Router/RouterRegisterer.cpp b/brazier/src/Router/RouterRegisterer.cpp similarity index 79% rename from Light/src/Router/RouterRegisterer.cpp rename to brazier/src/Router/RouterRegisterer.cpp index efffe96..c230e73 100644 --- a/Light/src/Router/RouterRegisterer.cpp +++ b/brazier/src/Router/RouterRegisterer.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Router/RouterRegisterer.hpp" +#include "../../include/brazier/Router/RouterRegisterer.hpp" -using namespace lightlib; +using namespace brazier; void RouterRegisterer::init(boost::asio::io_context& io) { #define R(method, path, controller, handler) \ diff --git a/Light/src/Router/WSRoute.cpp b/brazier/src/Router/WSRoute.cpp similarity index 92% rename from Light/src/Router/WSRoute.cpp rename to brazier/src/Router/WSRoute.cpp index 8f953c4..b878d38 100644 --- a/Light/src/Router/WSRoute.cpp +++ b/brazier/src/Router/WSRoute.cpp @@ -2,26 +2,26 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Router/WSRoute.hpp" +#include "../../include/brazier/Router/WSRoute.hpp" #include -namespace lightlib { +namespace brazier { WebSocketRoute::WebSocketRoute(const std::string& path, ConnectHandler handler) : originalPath_(path) diff --git a/Light/src/Router/WSRouter.cpp b/brazier/src/Router/WSRouter.cpp similarity index 88% rename from Light/src/Router/WSRouter.cpp rename to brazier/src/Router/WSRouter.cpp index b22a0d4..b03c040 100644 --- a/Light/src/Router/WSRouter.cpp +++ b/brazier/src/Router/WSRouter.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../../include/lightlib/Router/WSRouter.hpp" +#include "../../include/brazier/Router/WSRouter.hpp" -namespace lightlib { +namespace brazier { WebSocketRouter& WebSocketRouter::instance() { static WebSocketRouter router; diff --git a/Light/src/Server.cpp b/brazier/src/Server.cpp similarity index 88% rename from Light/src/Server.cpp rename to brazier/src/Server.cpp index 48dd83e..39ac386 100644 --- a/Light/src/Server.cpp +++ b/brazier/src/Server.cpp @@ -2,32 +2,32 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/server.hpp" +#include "../include/brazier/server.hpp" -lightlib::Server::Server(const std::string& host, unsigned short port) +brazier::Server::Server(const std::string& host, unsigned short port) : acceptor_(io_, tcp::endpoint(net::ip::make_address(host), port)) , port_(port), host_(host) { acceptor_.set_option(tcp::acceptor::reuse_address(true)); work_guard_ = std::make_unique>(io_.get_executor()); } -bool lightlib::Server::initialize() { +bool brazier::Server::initialize() { try { Logger::init("debug.log"); Logger::registerSignalHandlers(); @@ -37,7 +37,7 @@ bool lightlib::Server::initialize() { for (auto& [name, cfg] : drivers.items()) { if (name == "default") continue; - auto driver = std::make_shared(); + auto driver = std::make_shared(); driver->setRootPath(cfg.value("root", "./")); driver->initAsync(); @@ -62,7 +62,7 @@ bool lightlib::Server::initialize() { } } -void lightlib::Server::run() { +void brazier::Server::run() { try { net::co_spawn(io_, accept_loop(), net::detached); @@ -98,16 +98,16 @@ void lightlib::Server::run() { } } -void lightlib::Server::stop() { +void brazier::Server::stop() { work_guard_.reset(); io_.stop(); Logger::log("Server stopped", "INFO"); } -unsigned short lightlib::Server::getPort() const { return port_; } -const std::string& lightlib::Server::getHost() const { return host_; } +unsigned short brazier::Server::getPort() const { return port_; } +const std::string& brazier::Server::getHost() const { return host_; } -void lightlib::Server::initializeConnections() { +void brazier::Server::initializeConnections() { try { Queue::connect(global_config->get("nosql.host", "127.0.0.1"), global_config->get("nosql.port", 6379)); @@ -133,7 +133,7 @@ void lightlib::Server::initializeConnections() { } } -net::awaitable lightlib::Server::handle_connection(tcp::socket socket) { +net::awaitable brazier::Server::handle_connection(tcp::socket socket) { connection_count_++; try { @@ -186,7 +186,7 @@ net::awaitable lightlib::Server::handle_connection(tcp::socket socket) { res.version(req.version()); res.keep_alive(keep_alive); res.set(http::field::connection, keep_alive ? "keep-alive" : "close"); - res.set(http::field::server, "lightlib"); + res.set(http::field::server, "brazier"); co_await Router::handle_request(req, res); @@ -225,7 +225,7 @@ net::awaitable lightlib::Server::handle_connection(tcp::socket socket) { co_return; } -net::awaitable lightlib::Server::accept_loop() { +net::awaitable brazier::Server::accept_loop() { for (;;) { tcp::socket socket = co_await acceptor_.async_accept(net::use_awaitable); net::co_spawn(io_, handle_connection(std::move(socket)), net::detached); diff --git a/Light/src/SmtpClient.cpp b/brazier/src/SmtpClient.cpp similarity index 87% rename from Light/src/SmtpClient.cpp rename to brazier/src/SmtpClient.cpp index b7ce2fd..434f2c5 100644 --- a/Light/src/SmtpClient.cpp +++ b/brazier/src/SmtpClient.cpp @@ -2,27 +2,27 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/App/Http/Helpers/SmtpClient.hpp" -#include "../include/lightlib/App/Http/Helpers/Code.hpp" +#include "../include/brazier/App/Http/Helpers/SmtpClient.hpp" +#include "../include/brazier/App/Http/Helpers/Code.hpp" #include -lightlib::SmtpClient::~SmtpClient() { +brazier::SmtpClient::~SmtpClient() { std::ranges::fill(this->username, 0); std::ranges::fill(this->password, 0); this->username.clear(); @@ -31,7 +31,7 @@ lightlib::SmtpClient::~SmtpClient() { this->password.shrink_to_fit(); } -lightlib::SmtpClient::SmtpClient() +brazier::SmtpClient::SmtpClient() : io_ctx_(Engine::get_io_context()), ssl_ctx_(ssl::context::tls_client) { this->host = ENV::get("S_HOST"); @@ -41,7 +41,7 @@ lightlib::SmtpClient::SmtpClient() this->password = ENV::get("SMTP_PASSWORD"); } -boost::asio::awaitable lightlib::SmtpClient::send(const std::string& recipient, const std::string& message, const std::string& sender_name ) { +boost::asio::awaitable brazier::SmtpClient::send(const std::string& recipient, const std::string& message, const std::string& sender_name ) { try { tcp::resolver resolver(io_ctx_); auto endpoints = resolver.resolve(this->smtp_host, this->port); @@ -117,7 +117,7 @@ boost::asio::awaitable lightlib::SmtpClient::send(const std::string& recipi } } -boost::asio::awaitable lightlib::SmtpClient::read_response( +boost::asio::awaitable brazier::SmtpClient::read_response( ssl::stream& socket, const int expected_code ) { @@ -159,7 +159,7 @@ boost::asio::awaitable lightlib::SmtpClient::read_response( co_return; } -boost::asio::awaitable lightlib::SmtpClient::write_line( +boost::asio::awaitable brazier::SmtpClient::write_line( ssl::stream& socket, const std::string& line ) { diff --git a/Light/src/Storage.cpp b/brazier/src/Storage.cpp similarity index 94% rename from Light/src/Storage.cpp rename to brazier/src/Storage.cpp index bac5321..9b3b501 100644 --- a/Light/src/Storage.cpp +++ b/brazier/src/Storage.cpp @@ -2,26 +2,26 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/vendor/Storage/Storage.hpp" +#include "../include/brazier/vendor/Storage/Storage.hpp" #include -namespace lightlib { +namespace brazier { Storage& Storage::getInstance() { static Storage instance; diff --git a/Light/src/Validator.cpp b/brazier/src/Validator.cpp similarity index 83% rename from Light/src/Validator.cpp rename to brazier/src/Validator.cpp index 1dba154..bd86bae 100644 --- a/Light/src/Validator.cpp +++ b/brazier/src/Validator.cpp @@ -2,23 +2,23 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/App/Http/Helpers/Validator.hpp" -using namespace lightlib; +#include "../include/brazier/App/Http/Helpers/Validator.hpp" +using namespace brazier; bool Validator::password(const std::string& password) { return passwordError(password).empty(); diff --git a/Light/src/WebSocketManager.cpp b/brazier/src/WebSocketManager.cpp similarity index 92% rename from Light/src/WebSocketManager.cpp rename to brazier/src/WebSocketManager.cpp index 72567b8..c248424 100644 --- a/Light/src/WebSocketManager.cpp +++ b/brazier/src/WebSocketManager.cpp @@ -2,26 +2,26 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/vendor/WebSocket/WebSocketManager.hpp" -#include "../include/lightlib/vendor/Debug/Logger.hpp" +#include "../include/brazier/vendor/WebSocket/WebSocketManager.hpp" +#include "../include/brazier/vendor/Debug/Logger.hpp" -namespace lightlib { +namespace brazier { WebSocketManager& WebSocketManager::instance() { static WebSocketManager instance; diff --git a/Light/src/WebSocketServer.cpp b/brazier/src/WebSocketServer.cpp similarity index 96% rename from Light/src/WebSocketServer.cpp rename to brazier/src/WebSocketServer.cpp index 6961e08..044c4ab 100644 --- a/Light/src/WebSocketServer.cpp +++ b/brazier/src/WebSocketServer.cpp @@ -2,26 +2,26 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/WebSocketServer.hpp" -#include "../include/lightlib/vendor/Debug/Logger.hpp" +#include "../include/brazier/WebSocketServer.hpp" +#include "../include/brazier/vendor/Debug/Logger.hpp" -namespace lightlib { +namespace brazier { WebSocketServer::WebSocketServer(const std::string& host, unsigned short port) : acceptor_(io_, tcp::endpoint(net::ip::make_address(host), port)) diff --git a/Light/src/WebSocketSession.cpp b/brazier/src/WebSocketSession.cpp similarity index 94% rename from Light/src/WebSocketSession.cpp rename to brazier/src/WebSocketSession.cpp index 1a8b168..a38e765 100644 --- a/Light/src/WebSocketSession.cpp +++ b/brazier/src/WebSocketSession.cpp @@ -2,30 +2,30 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ -#include "../include/lightlib/vendor/WebSocket/WebSocketSession.hpp" -#include "../include/lightlib/vendor/Debug/Logger.hpp" +#include "../include/brazier/vendor/WebSocket/WebSocketSession.hpp" +#include "../include/brazier/vendor/Debug/Logger.hpp" #include #include #include #include -namespace lightlib { +namespace brazier { static std::atomic session_counter{ 0 }; static thread_local std::mt19937_64 rng(std::random_device{}()); diff --git a/Light/tests/main.cpp b/brazier/tests/main.cpp similarity index 68% rename from Light/tests/main.cpp rename to brazier/tests/main.cpp index e30ff55..e615024 100644 --- a/Light/tests/main.cpp +++ b/brazier/tests/main.cpp @@ -2,25 +2,25 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #include "main.h" -std::shared_ptr g_test_server; +std::shared_ptr g_test_server; std::atomic g_server_ready{ false }; std::thread g_server_thread; int port_global; @@ -49,11 +49,11 @@ bool WaitForServer(int port, int max_attempts = 30) { int main(int argc, char** argv) { try { testing::InitGoogleTest(&argc, argv); - lightlib::ConfigManager::initGlobal("config_test.json"); - lightlib::global_config->setAutoSave(false); + brazier::ConfigManager::initGlobal("config_test.json"); + brazier::global_config->setAutoSave(false); - std::string server_host = lightlib::global_config->get("server.host", "127.0.0.1"); - int server_port = lightlib::global_config->get("server.port", 3502); + std::string server_host = brazier::global_config->get("server.host", "127.0.0.1"); + int server_port = brazier::global_config->get("server.port", 3502); if (server_host == "0.0.0.0") { server_host = "127.0.0.1"; @@ -62,27 +62,27 @@ int main(int argc, char** argv) { host_global = server_host; port_global = server_port; - g_test_server = std::make_shared(server_host, server_port); + g_test_server = std::make_shared(server_host, server_port); g_server_thread = std::thread([]() { try { if (!g_test_server->initialize()) { - lightlib::Logger::log("Failed to initialize test server", "ERROR"); + brazier::Logger::log("Failed to initialize test server", "ERROR"); g_server_ready = false; return; } g_server_ready = true; - lightlib::Logger::log("Test server initialized successfully", "INFO"); + brazier::Logger::log("Test server initialized successfully", "INFO"); g_test_server->run(); } catch (const std::exception& e) { - lightlib::Logger::log("Server error: " + std::string(e.what()), "ERROR"); + brazier::Logger::log("Server error: " + std::string(e.what()), "ERROR"); g_server_ready = false; } }); if (!WaitForServer(server_port)) { - lightlib::Logger::log("Server failed to start within timeout", "ERROR"); + brazier::Logger::log("Server failed to start within timeout", "ERROR"); return -1; } @@ -99,7 +99,7 @@ int main(int argc, char** argv) { } catch (const std::exception& e) { - lightlib::Logger::log("Exception: " + std::string(e.what()), "ERROR"); + brazier::Logger::log("Exception: " + std::string(e.what()), "ERROR"); return -1; } } \ No newline at end of file diff --git a/Light/tests/main.h b/brazier/tests/main.h similarity index 65% rename from Light/tests/main.h rename to brazier/tests/main.h index a35525c..79e4ee8 100644 --- a/Light/tests/main.h +++ b/brazier/tests/main.h @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -25,12 +25,12 @@ #include #include #include -#include "../include/lightlib/Core" -#include "../include/lightlib/DB" -#include "../include/lightlib/Http" -#include "../include/lightlib/Engine.hpp" +#include "../include/brazier/Core" +#include "../include/brazier/DB" +#include "../include/brazier/Http" +#include "../include/brazier/Engine.hpp" -extern std::shared_ptr g_test_server; +extern std::shared_ptr g_test_server; extern std::atomic g_server_ready; extern std::thread g_server_thread; diff --git a/brazier/tests/unit/configuration/config_test.cpp b/brazier/tests/unit/configuration/config_test.cpp new file mode 100644 index 0000000..a13370a --- /dev/null +++ b/brazier/tests/unit/configuration/config_test.cpp @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov + * SPDX-License-Identifier: LGPL-3.0-or-later + * + * This file is part of brazier. + * + * brazier is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * brazier is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with brazier; if not, see . + */ + +#include +#include +#include "../../../include/brazier/Core" + +TEST(ConfigTest, LoadConfig) { + brazier::ConfigManager::initGlobal(); + bool is_nullptr = brazier::global_config == nullptr; + + EXPECT_FALSE(is_nullptr); +} + +TEST(ConfigTest, GetConfigValue) { + brazier::ConfigManager::initGlobal("config_test.json"); + std::string value = brazier::global_config->get("app_name", "default_app"); + EXPECT_EQ(value, "brazierApp"); +} + +TEST(ConfigTest, SetConfigValue) { + brazier::ConfigManager::initGlobal("config_test.json"); + brazier::global_config->set("app_name", "NewLightApp"); + + std::string value = brazier::global_config->get("app_name", "default_app"); + + EXPECT_EQ(value, "NewLightApp"); +} + +TEST(ConfigTest, RemoveConfigValue) { + brazier::ConfigManager::initGlobal("config_test.json"); + brazier::global_config->remove("app_name"); + std::string value = brazier::global_config->get("app_name", "default_app"); + + EXPECT_EQ(value, "default_app"); +} + +TEST(ConfigTest, HasConfigValue) { + brazier::ConfigManager::initGlobal("config_test.json"); + brazier::global_config->remove("app_name"); + bool has_value = brazier::global_config->has("app_name"); + + EXPECT_FALSE(has_value); +} + +TEST(ConfigTest, GetKeysWithPrefix) { + brazier::ConfigManager::initGlobal("config_test.json"); + brazier::global_config->set("server.host", "0.0.0.0"); + brazier::global_config->set("server.port", 3502); + nlohmann::json keys = brazier::global_config->getNestedJson("server"); + + EXPECT_EQ(keys["host"], "0.0.0.0"); + EXPECT_EQ(keys["port"], 3502); +} + +TEST(ConfigTest, ClearConfig) { + brazier::ConfigManager::initGlobal("config_test.json"); + brazier::global_config->clear(); + std::string value = brazier::global_config->get("app_name", "default_app"); + + EXPECT_EQ(value, "default_app"); +} + +TEST(ConfigTest, ReloadConfig) { + brazier::ConfigManager::initGlobal("config_test.json"); + brazier::global_config->set("app_name", "TempApp"); + brazier::global_config->reload(); + std::string value = brazier::global_config->get("app_name", "default_app"); + + EXPECT_EQ(value, "brazierApp"); +} \ No newline at end of file diff --git a/Light/tests/unit/filesystem/test_file_driver_async.cpp b/brazier/tests/unit/filesystem/test_file_driver_async.cpp similarity index 88% rename from Light/tests/unit/filesystem/test_file_driver_async.cpp rename to brazier/tests/unit/filesystem/test_file_driver_async.cpp index a4bef7e..27624af 100644 --- a/Light/tests/unit/filesystem/test_file_driver_async.cpp +++ b/brazier/tests/unit/filesystem/test_file_driver_async.cpp @@ -2,26 +2,26 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #include #include #include -#include "../../../include/lightlib/Filesystem/FileDriver.hpp" +#include "../../../include/brazier/Filesystem/FileDriver.hpp" #include "test_utils.hpp" namespace fs = std::filesystem; @@ -30,7 +30,7 @@ class FileDriverTest : public TestBase { protected: void SetUp() override { root_ = createTempDir(); - driver_ = std::make_shared(); + driver_ = std::make_shared(); driver_->setRootPath(root_.string()); } @@ -41,7 +41,7 @@ class FileDriverTest : public TestBase { } fs::path root_; - std::shared_ptr driver_; + std::shared_ptr driver_; }; class FileDriverAsyncTest : public FileDriverTest { @@ -92,7 +92,7 @@ TEST_F(FileDriverAsyncTest, MoveAsync) { } TEST_F(FileDriverAsyncTest, AsyncWithoutInitThrows) { - auto freshDriver = std::make_shared(); + auto freshDriver = std::make_shared(); freshDriver->setRootPath(root_.string()); EXPECT_THROW(runAsyncVoid(freshDriver->putAsync("any", "data")), std::runtime_error); EXPECT_THROW(runAsync(freshDriver->getAsync("any")), std::runtime_error); diff --git a/Light/tests/unit/filesystem/test_file_driver_sync.cpp b/brazier/tests/unit/filesystem/test_file_driver_sync.cpp similarity index 90% rename from Light/tests/unit/filesystem/test_file_driver_sync.cpp rename to brazier/tests/unit/filesystem/test_file_driver_sync.cpp index 701c287..a16852e 100644 --- a/Light/tests/unit/filesystem/test_file_driver_sync.cpp +++ b/brazier/tests/unit/filesystem/test_file_driver_sync.cpp @@ -2,26 +2,26 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #include #include #include -#include "../../../include/lightlib/Filesystem/FileDriver.hpp" +#include "../../../include/brazier/Filesystem/FileDriver.hpp" #include "test_utils.hpp" namespace fs = std::filesystem; @@ -30,7 +30,7 @@ class FileDriverTest : public TestBase { protected: void SetUp() override { root_ = createTempDir(); - driver_ = std::make_shared(); + driver_ = std::make_shared(); driver_->setRootPath(root_.string()); } @@ -41,7 +41,7 @@ class FileDriverTest : public TestBase { } fs::path root_; - std::shared_ptr driver_; + std::shared_ptr driver_; }; TEST_F(FileDriverTest, SetRootPathCreatesDirectory) { diff --git a/Light/tests/unit/filesystem/test_filesystem.cpp b/brazier/tests/unit/filesystem/test_filesystem.cpp similarity index 73% rename from Light/tests/unit/filesystem/test_filesystem.cpp rename to brazier/tests/unit/filesystem/test_filesystem.cpp index 6472ac3..370af32 100644 --- a/Light/tests/unit/filesystem/test_filesystem.cpp +++ b/brazier/tests/unit/filesystem/test_filesystem.cpp @@ -2,27 +2,27 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #include #include -#include "../../../include/lightlib/Filesystem/Filesystem.hpp" -#include "../../../include/lightlib/Filesystem/FileDriver.hpp" -#include "../../../include/lightlib/Filesystem/StorageManager.hpp" +#include "../../../include/brazier/Filesystem/Filesystem.hpp" +#include "../../../include/brazier/Filesystem/FileDriver.hpp" +#include "../../../include/brazier/Filesystem/StorageManager.hpp" #include "test_utils.hpp" namespace fs = std::filesystem; @@ -31,10 +31,10 @@ class FilesystemTest : public TestBase { protected: void SetUp() override { tempRoot_ = createTempDir(); - driver_ = std::make_shared(); + driver_ = std::make_shared(); driver_->setRootPath(tempRoot_.string()); driver_->initAsync(2); - auto& mgr = lightlib::StorageManager::getInstance(); + auto& mgr = brazier::StorageManager::getInstance(); for (const auto& name : mgr.getDriverNames()) { mgr.unregisterDriver(name); } @@ -44,7 +44,7 @@ class FilesystemTest : public TestBase { void TearDown() override { fs::remove_all(tempRoot_); - auto& mgr = lightlib::StorageManager::getInstance(); + auto& mgr = brazier::StorageManager::getInstance(); for (const auto& name : mgr.getDriverNames()) { mgr.unregisterDriver(name); } @@ -52,11 +52,11 @@ class FilesystemTest : public TestBase { } fs::path tempRoot_; - std::shared_ptr driver_; + std::shared_ptr driver_; }; TEST_F(FilesystemTest, DefaultConstructor) { - lightlib::Filesystem fs; + brazier::Filesystem fs; EXPECT_EQ(fs.getDriverName(), "default"); EXPECT_EQ(fs.getDriverType(), "Filesystem"); fs.put("test.txt", "hello"); @@ -64,17 +64,17 @@ TEST_F(FilesystemTest, DefaultConstructor) { } TEST_F(FilesystemTest, ConstructorWithName) { - lightlib::Filesystem fs("test_driver"); + brazier::Filesystem fs("test_driver"); EXPECT_EQ(fs.getDriverName(), "test_driver"); fs.put("named.txt", "content"); EXPECT_TRUE(driver_->exists("named.txt")); } TEST_F(FilesystemTest, ConstructorWithDriver) { - auto customDriver = std::make_shared(); + auto customDriver = std::make_shared(); auto customRoot = createTempDir(); customDriver->setRootPath(customRoot.string()); - lightlib::Filesystem fs(customDriver); + brazier::Filesystem fs(customDriver); EXPECT_EQ(fs.getDriverName(), "custom"); fs.put("custom.txt", "data"); EXPECT_TRUE(customDriver->exists("custom.txt")); @@ -82,19 +82,19 @@ TEST_F(FilesystemTest, ConstructorWithDriver) { } TEST_F(FilesystemTest, StaticDriverFactory) { - auto fs = lightlib::Filesystem::driver("test_driver"); + auto fs = brazier::Filesystem::driver("test_driver"); EXPECT_EQ(fs.getDriverName(), "test_driver"); fs.put("factory.txt", "test"); EXPECT_TRUE(driver_->exists("factory.txt")); } TEST_F(FilesystemTest, StaticHasDriver) { - EXPECT_TRUE(lightlib::Filesystem::hasDriver("test_driver")); - EXPECT_FALSE(lightlib::Filesystem::hasDriver("non_existent")); + EXPECT_TRUE(brazier::Filesystem::hasDriver("test_driver")); + EXPECT_FALSE(brazier::Filesystem::hasDriver("non_existent")); } TEST_F(FilesystemTest, MethodsDelegate) { - lightlib::Filesystem fs("test_driver"); + brazier::Filesystem fs("test_driver"); fs.put("delegate.txt", "delegated"); EXPECT_TRUE(driver_->exists("delegate.txt")); EXPECT_EQ(fs.get("delegate.txt"), "delegated"); @@ -112,7 +112,7 @@ TEST_F(FilesystemTest, MethodsDelegate) { } TEST_F(FilesystemTest, AsyncMethods) { - lightlib::Filesystem fs("test_driver"); + brazier::Filesystem fs("test_driver"); const std::string path = "async_fs.txt"; const std::string content = "async fs"; runAsyncVoid(fs.putAsync(path, content)); @@ -125,19 +125,19 @@ TEST_F(FilesystemTest, AsyncMethods) { } TEST_F(FilesystemTest, ConstructorDefaultNoDriverThrows) { - auto& mgr = lightlib::StorageManager::getInstance(); + auto& mgr = brazier::StorageManager::getInstance(); for (const auto& name : mgr.getDriverNames()) { mgr.unregisterDriver(name); } - EXPECT_THROW(lightlib::Filesystem fs, std::runtime_error); + EXPECT_THROW(brazier::Filesystem fs, std::runtime_error); } TEST_F(FilesystemTest, ConstructorWithNameNotFoundThrows) { - EXPECT_THROW(lightlib::Filesystem fs("unknown_driver"), std::runtime_error); + EXPECT_THROW(brazier::Filesystem fs("unknown_driver"), std::runtime_error); } TEST_F(FilesystemTest, GetDriverReturnsNonNull) { - lightlib::Filesystem fs("test_driver"); + brazier::Filesystem fs("test_driver"); auto driver = fs.getDriver(); EXPECT_NE(driver, nullptr); EXPECT_EQ(driver, driver_); diff --git a/Light/tests/unit/filesystem/test_storage_manager.cpp b/brazier/tests/unit/filesystem/test_storage_manager.cpp similarity index 68% rename from Light/tests/unit/filesystem/test_storage_manager.cpp rename to brazier/tests/unit/filesystem/test_storage_manager.cpp index 69cf895..4994f4c 100644 --- a/Light/tests/unit/filesystem/test_storage_manager.cpp +++ b/brazier/tests/unit/filesystem/test_storage_manager.cpp @@ -2,38 +2,38 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #include #include -#include "../../../include/lightlib/Filesystem/StorageManager.hpp" -#include "../../../include/lightlib/Filesystem/FileDriver.hpp" +#include "../../../include/brazier/Filesystem/StorageManager.hpp" +#include "../../../include/brazier/Filesystem/FileDriver.hpp" class StorageManagerTest : public ::testing::Test { protected: void SetUp() override { - auto& mgr = lightlib::StorageManager::getInstance(); + auto& mgr = brazier::StorageManager::getInstance(); for (const auto& name : mgr.getDriverNames()) { mgr.unregisterDriver(name); } } void TearDown() override { - auto& mgr = lightlib::StorageManager::getInstance(); + auto& mgr = brazier::StorageManager::getInstance(); for (const auto& name : mgr.getDriverNames()) { mgr.unregisterDriver(name); } @@ -41,8 +41,8 @@ class StorageManagerTest : public ::testing::Test { }; TEST_F(StorageManagerTest, RegisterAndGetDriver) { - auto& mgr = lightlib::StorageManager::getInstance(); - auto driver = std::make_shared(); + auto& mgr = brazier::StorageManager::getInstance(); + auto driver = std::make_shared(); const std::string name = "test_driver"; mgr.registerDriver(name, driver); auto retrieved = mgr.getDriver(name); @@ -51,13 +51,13 @@ TEST_F(StorageManagerTest, RegisterAndGetDriver) { } TEST_F(StorageManagerTest, GetNonExistentThrows) { - auto& mgr = lightlib::StorageManager::getInstance(); + auto& mgr = brazier::StorageManager::getInstance(); EXPECT_THROW(mgr.getDriver("non_existent"), std::runtime_error); } TEST_F(StorageManagerTest, UnregisterDriver) { - auto& mgr = lightlib::StorageManager::getInstance(); - auto driver = std::make_shared(); + auto& mgr = brazier::StorageManager::getInstance(); + auto driver = std::make_shared(); const std::string name = "to_unregister"; mgr.registerDriver(name, driver); EXPECT_TRUE(mgr.hasDriver(name)); @@ -67,8 +67,8 @@ TEST_F(StorageManagerTest, UnregisterDriver) { } TEST_F(StorageManagerTest, SetDefaultDriver) { - auto& mgr = lightlib::StorageManager::getInstance(); - auto driver = std::make_shared(); + auto& mgr = brazier::StorageManager::getInstance(); + auto driver = std::make_shared(); const std::string name = "default_driver"; mgr.registerDriver(name, driver); mgr.setDefaultDriver(name); @@ -77,12 +77,12 @@ TEST_F(StorageManagerTest, SetDefaultDriver) { } TEST_F(StorageManagerTest, SetDefaultNonExistentThrows) { - auto& mgr = lightlib::StorageManager::getInstance(); + auto& mgr = brazier::StorageManager::getInstance(); EXPECT_THROW(mgr.setDefaultDriver("missing"), std::runtime_error); } TEST_F(StorageManagerTest, GetDefaultWhenNotSetThrows) { - auto& mgr = lightlib::StorageManager::getInstance(); + auto& mgr = brazier::StorageManager::getInstance(); for (const auto& name : mgr.getDriverNames()) { mgr.unregisterDriver(name); } @@ -90,9 +90,9 @@ TEST_F(StorageManagerTest, GetDefaultWhenNotSetThrows) { } TEST_F(StorageManagerTest, GetDriverNames) { - auto& mgr = lightlib::StorageManager::getInstance(); - auto d1 = std::make_shared(); - auto d2 = std::make_shared(); + auto& mgr = brazier::StorageManager::getInstance(); + auto d1 = std::make_shared(); + auto d2 = std::make_shared(); mgr.registerDriver("one", d1); mgr.registerDriver("two", d2); auto names = mgr.getDriverNames(); @@ -102,9 +102,9 @@ TEST_F(StorageManagerTest, GetDriverNames) { } TEST_F(StorageManagerTest, RegisterOverwritesExisting) { - auto& mgr = lightlib::StorageManager::getInstance(); - auto d1 = std::make_shared(); - auto d2 = std::make_shared(); + auto& mgr = brazier::StorageManager::getInstance(); + auto d1 = std::make_shared(); + auto d2 = std::make_shared(); mgr.registerDriver("same", d1); mgr.registerDriver("same", d2); auto retrieved = mgr.getDriver("same"); @@ -112,7 +112,7 @@ TEST_F(StorageManagerTest, RegisterOverwritesExisting) { } TEST_F(StorageManagerTest, UnregisterNonExistentDoesNothing) { - auto& mgr = lightlib::StorageManager::getInstance(); + auto& mgr = brazier::StorageManager::getInstance(); EXPECT_FALSE(mgr.hasDriver("missing")); EXPECT_NO_THROW(mgr.unregisterDriver("missing")); EXPECT_FALSE(mgr.hasDriver("missing")); diff --git a/Light/tests/unit/filesystem/test_utils.hpp b/brazier/tests/unit/filesystem/test_utils.hpp similarity index 87% rename from Light/tests/unit/filesystem/test_utils.hpp rename to brazier/tests/unit/filesystem/test_utils.hpp index d8865cc..be4380e 100644 --- a/Light/tests/unit/filesystem/test_utils.hpp +++ b/brazier/tests/unit/filesystem/test_utils.hpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #pragma once @@ -38,7 +38,7 @@ class TestBase : public ::testing::Test { static std::random_device rd; static std::mt19937 gen(rd()); static std::uniform_int_distribution<> dist(100000, 999999); - auto tempRoot = fs::temp_directory_path() / ("lightlib_test_" + std::to_string(dist(gen))); + auto tempRoot = fs::temp_directory_path() / ("brazier_test_" + std::to_string(dist(gen))); fs::create_directories(tempRoot); return tempRoot; } diff --git a/Light/tests/unit/routing/routing_test.cpp b/brazier/tests/unit/routing/routing_test.cpp similarity index 90% rename from Light/tests/unit/routing/routing_test.cpp rename to brazier/tests/unit/routing/routing_test.cpp index d47f205..73a9564 100644 --- a/Light/tests/unit/routing/routing_test.cpp +++ b/brazier/tests/unit/routing/routing_test.cpp @@ -2,20 +2,20 @@ * Copyright (c) 2026 Kirill Sergeev, Nikolay Sugonyako, Andrey Agarkov, Gleb Safyannikov * SPDX-License-Identifier: LGPL-3.0-or-later * - * This file is part of lightlib. + * This file is part of brazier. * - * lightlib is free software; you can redistribute it and/or modify + * brazier is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * lightlib is distributed in the hope that it will be useful, + * brazier is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with lightlib; if not, see . + * along with brazier; if not, see . */ #include @@ -27,16 +27,16 @@ #include #include #include -#include "../../../include/lightlib/Core" -#include "../../../include/lightlib/Http" +#include "../../../include/brazier/Core" +#include "../../../include/brazier/Http" #include "main.h" namespace beast = boost::beast; namespace http = beast::http; -using namespace lightlib; +using namespace brazier; -class TestController : public lightlib::Controller { +class TestController : public brazier::Controller { public: using Request = http::request; using Response = http::response; @@ -109,12 +109,12 @@ TEST_F(RoutingTest, AddRouteAndGet) { std::this_thread::sleep_for(std::chrono::milliseconds(200)); - lightlib::HttpClient client; + brazier::HttpClient client; client.set_verify_ssl(false); client.set_timeout(std::chrono::seconds(10)); try { - auto response = RunAsync([&]() -> boost::asio::awaitable { + auto response = RunAsync([&]() -> boost::asio::awaitable { co_return co_await client.get(base_url + "/test"); }); @@ -132,12 +132,12 @@ TEST_F(RoutingTest, JsonResponse) { std::string port = std::to_string(port_global); std::string base_url = "http://" + host + ":" + port; - lightlib::HttpClient client; + brazier::HttpClient client; client.set_verify_ssl(false); client.set_timeout(std::chrono::seconds(5)); try { - auto response = RunAsync([&]() -> boost::asio::awaitable { + auto response = RunAsync([&]() -> boost::asio::awaitable { co_return co_await client.get(base_url + "/test/json"); }); @@ -158,7 +158,7 @@ TEST_F(RoutingTest, PostWithBody) { std::string port = std::to_string(port_global); std::string base_url = "http://" + host + ":" + port; - lightlib::HttpClient client; + brazier::HttpClient client; client.set_verify_ssl(false); client.set_timeout(std::chrono::seconds(5)); @@ -169,7 +169,7 @@ TEST_F(RoutingTest, PostWithBody) { }; try { - auto response = RunAsync([&]() -> boost::asio::awaitable { + auto response = RunAsync([&]() -> boost::asio::awaitable { co_return co_await client.post(base_url + "/test/echo", request_body); }); @@ -191,12 +191,12 @@ TEST_F(RoutingTest, NotFound) { std::string port = std::to_string(port_global); std::string base_url = "http://" + host + ":" + port; - lightlib::HttpClient client; + brazier::HttpClient client; client.set_verify_ssl(false); client.set_timeout(std::chrono::seconds(5)); try { - auto response = RunAsync([&]() -> boost::asio::awaitable { + auto response = RunAsync([&]() -> boost::asio::awaitable { co_return co_await client.get(base_url + "/nonexistent"); }); @@ -212,14 +212,14 @@ TEST_F(RoutingTest, ResponseTime) { std::string port = std::to_string(port_global); std::string base_url = "http://" + host + ":" + port; - lightlib::HttpClient client; + brazier::HttpClient client; client.set_verify_ssl(false); client.set_timeout(std::chrono::seconds(5)); auto start = std::chrono::steady_clock::now(); try { - auto response = RunAsync([&]() -> boost::asio::awaitable { + auto response = RunAsync([&]() -> boost::asio::awaitable { co_return co_await client.get(base_url + "/test"); }); @@ -239,17 +239,17 @@ TEST_F(RoutingTest, MultipleRequests) { std::string port = std::to_string(port_global); std::string base_url = "http://" + host + ":" + port; - lightlib::HttpClient client; + brazier::HttpClient client; client.set_verify_ssl(false); client.set_timeout(std::chrono::seconds(5)); boost::asio::io_context io_context; - std::vector> futures; + std::vector> futures; for (int i = 0; i < 10; ++i) { auto future = boost::asio::co_spawn( io_context, - [&]() -> boost::asio::awaitable { + [&]() -> boost::asio::awaitable { co_return co_await client.get(base_url + "/test"); }, boost::asio::use_future diff --git a/Light/vcpkg-configuration.json b/brazier/vcpkg-configuration.json similarity index 100% rename from Light/vcpkg-configuration.json rename to brazier/vcpkg-configuration.json diff --git a/Light/vcpkg.json b/brazier/vcpkg.json similarity index 87% rename from Light/vcpkg.json rename to brazier/vcpkg.json index a2ff6f5..a57041a 100644 --- a/Light/vcpkg.json +++ b/brazier/vcpkg.json @@ -1,9 +1,9 @@ { - "name": "lightlib", + "name": "brazier", "version": "0.1.5", "license": "LGPL-3.0-or-later", "description": "Modern C++ MVC framework designed for creating high-performance asynchronous APIs. The framework combines the power of Boost.Asio with modern C++20/23 features", - "homepage": "https://github.com/lev2p1/lightlib", + "homepage": "https://github.com/lev2p1/brazier", "dependencies": [ "boost-config", "boost-asio",