This project requires the following libraries:
To configure the project using CMake, run the following command:
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install -DDECENTRALIZED_ART_BUILD_TESTS=ON-S .: Specifies the source directory.-B build: Specifies the build directory.-DCMAKE_INSTALL_PREFIX=install: Specifies install directory.-DDECENTRALIZED_ART_BUILD_TESTS=ON: Enables tests.
To build the project in Debug Mode, use:
cmake --build build --config DebugThis will compile the project with debugging enabled.
To install project in Debug Mode, use:
cmake --build build --config Debug --target installThis will install the project with debugging enabled.
./build/Debug/DecentralisedArtServer.exeThis section describes the available API endpoints for the server backend.
β οΈ All protected routes require authentication via a secureaccess_tokencookie. After login, this cookie is automatically included in requests by the browser.
Returns CORS headers for the simple HTML interface endpoint.
- Authentication: β Public
Returns the simple HTML interface to interact with the server.
- Response Type:
text/html - Authentication: β Public
Returns a nonce for the specified Ethereum address to use in the login message.
- Params:
address: Ethereum address (e.g.,0x123...)
- Response:
{ "nonce": "string" }- Authentication: β Public
Verifies the signed nonce and sets an authentication cookie (access_token).
- Request Body(JSON):
{
"address": "0x...",
"message": "Login nonce: ...",
"signature": "0x..."
}-
Response:
200 OK:Authentication successful -
Authentication:
- Header: Set-Cookie:
access_token=...; HttpOnly; Secure; SameSite=Strict; Path=/ - Header: Set-Cookie:
refresh_token=...; HttpOnly; Secure; SameSite=Strict; Path=/refresh"
- Header: Set-Cookie:
-
Authentication: β Public
Verifies refresh_token and access_token and generates new access_token.
-
Response:
200 OK:Authentication successful -
Authentication:
- Header: Set-Cookie:
access_token=...; HttpOnly; Secure; SameSite=Strict; Path=/ - Header: Set-Cookie:
refresh_token=...; HttpOnly; Secure; SameSite=Strict; Path=/refresh"
- Header: Set-Cookie:
-
Authentication: β Required
Returns CORS headers for the feature endpoints.
Fetches a feature object by name and version. If version is not given, returns newest feature of given name.
-
Params:
name: String identifierver?: Optional String identifier
-
Response: Feature data
(JSON){ "name": "...", "dimensions": [...] } -
Authentication: β Public
Creates a new feature entry.
-
Request Headers:
Cookiemust includeaccess_token -
Request Body:
JSONpayload describing the feature{ "name": "...", "dimensions": [...] } -
Response:
201 Createdorerror -
Response Body :
{ "name": "...", "version": "1823..." } -
Authentication: β Required
Returns CORS headers for the transformation endpoints.
Fetches a transformation by name and version. If version is not given, returns newest transformation of given name.
-
Params:
name: String identifierver: Optional String identifier
-
Response: Transformation data
(JSON){ "name": "...", "sol_src": "..." } -
Authentication: β Public
Creates a new transformation record.
-
Request Headers:
Cookiemust includeaccess_token -
Request Body:
JSONpayload describing the transformation{ "name": "...", "sol_src": "..." } -
Response:
201 Createdorerror -
Response Body:
{ "name": "...", "version": "1823..." } -
Authentication: β Required
π License:
π¨βπ» Contributors: Sawyer
π‘ Additional Notes: