Giter Site home page Giter Site logo

jorod94 / wartable-asset-manager Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 0.0 203 KB

A helper app that I use to manage STL assets in an S3 bucket for my Wartable project, built with Next.js

Home Page: https://wartable.herokuapp.com/

License: Apache License 2.0

JavaScript 0.51% TypeScript 84.72% CSS 14.77%

wartable-asset-manager's Introduction

Wartable Asset Manager

Description

Note: Want to know more about Wartable? Find out here

Wartable Asset Manager is a helper app that I use to manage the models in my 3D tabletop project, Wartable (not open source yet). Since Wartable doesn't have its own assets, the user is supposed to provide their own content URLs. If the user has their assets in an S3 bucket, this app is supposed to make it easier to view and edit its contents, and get the final JSON input to use in Wartable.

These models are in the STL format. This app should let the user see their STL models, upload new ones, delete models (WIP), and rename them (WIP).

Screenshot from 2022-01-09 00-21-38 Screenshot from 2022-01-09 00-31-08

Required Environment Variables

  • S3_UPLOAD_KEY - AWS S3 key credential (separate IAM account recommended)
  • S3_UPLOAD_SECRET - AWS S3 secret credential (separate IAM account recommended)
  • S3_UPLOAD_BUCKET - AWS S3 bucket name, where you keep th e
  • S3_UPLOAD_REGION - AWS region

Required Permissions

Note: ALWAYS use a bucket dedicated ONLY for this purpose, since it should be publicly viewable.

In order to successfully view and manipulate content, your S3 bucket must have some permissions set up.

This app makes use of next-s3-upload, so check out its required permissions in the README, and add "GET" as an AllowedMethod in the CORS setup.

As for the remaining permissions, Wartable requires that your bucket is publicly viewable, so this project assumes that all assets are public and accesses them with a simple GET (again, only keep Wartable assets in this bucket). To make the bucket publicly viewable, add the following bucket policy in your bucket Permissions settings:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::dnd-tabletop-assets/*"
        }
    ]
}

And you settings should be defined like so:

Screenshot from 2022-01-08 20-33-15

Running the project

Install dependencies with npm install.

Run the project in development mode with npm run dev.

Open http://localhost:3000 with your browser to see the project running.

To-do

  • Add proper testing with Cypress
  • Add delete feature
  • Add rename feature
  • Move size limit to env var

wartable-asset-manager's People

Contributors

jorod94 avatar

Stargazers

Tiago Dinis avatar Paulo Araújo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.