Skip to content

decentraland/camera-reel-service

Repository files navigation

Decentraland

Camera Reel Service

The Camera Reel Service is a simple solution designed specifically for uploading and retrieving camera images taken from Decentraland Explorer. This service enables users to capture and store images with additional metadata, providing valuable context to enhance their visual content.

Setup

Before start, make sure you have these installed:

Run

Before running the Camera Reel service you need Postgres and MinIO (local S3) instances, you can start both by running:

$ just run-services

or 

$ docker-compose -f docker-compose.dev.yml up -d

In order to run the Camera Reel service:

$ cargo run

Also, you can run it in watch mode by installing cargo-watch and using the command to run the server:

$ cargo install cargo-watch
$ cargo watch -x 'run'

In order to run the tests:

$ cargo test

Logging

The RUST_LOG environment variable can be used to specify the log level, for example:

$ RUST_LOG=debug cargo run

See these docs to understand the possible values.

API Docs

The utoipa crate is used to generate the OpenAPI Documentation and a UI.

  • {server}/api/docs/ui: Swagger UI with endpoints and schemas
  • {server}/api/docs/openapi.json: OpenAPI json used by the UI

Authentication

Some endpoints may be authenticated based on the environment. The authentication method is the Signed Fetch and follows the ADR-44.

Those endpoints are:

  • POST {server}/api/images/
  • DELETE {server}/api/images/
  • GET {server}/api/users/{address}
  • GET {server}/api/users/{address}/images

There is an upload example, you can run it:

$ cargo run --example upload-image

Database Migrations

To manage database migrations follow SQLX CLI instructions (link)

Architecture

Here is a highlevel architecture overview that can help to understand the project strucuture and components:

Camera Reel service architecture

About

Services for Decentraland In World camera feature

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •